Skip to content

Commit

Permalink
Merge pull request containers#8853 from jubalh/gentoo
Browse files Browse the repository at this point in the history
Add support for Gentoo file to package query
  • Loading branch information
openshift-merge-robot authored Dec 30, 2020
2 parents ef12e36 + 904dec2 commit a843832
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libpod/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ func queryPackageVersion(cmdArg ...string) string {
return strings.Trim(output, "\n")
}

func equeryVersion(path string) string {
return queryPackageVersion("/usr/bin/equery", "b", path)
}

func pacmanVersion(path string) string {
return queryPackageVersion("/usr/bin/pacman", "-Qo", path)
}
Expand All @@ -172,7 +176,10 @@ func packageVersion(program string) string {
if out := dpkgVersion(program); out != unknownPackage {
return out
}
return pacmanVersion(program)
if out := pacmanVersion(program); out != unknownPackage {
return out
}
return equeryVersion(program)
}

func programVersion(mountProgram string) (string, error) {
Expand Down

0 comments on commit a843832

Please sign in to comment.