summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-30 15:57:55 +0100
committerGitHub <noreply@github.com>2020-12-30 15:57:55 +0100
commita84383297c470436169bbaac06a721e0faafbeb8 (patch)
tree8f6ecd863ee790b4c33dae870dd31f300e9c7ae5 /libpod
parentef12e36df0f8d72b52e43844cfb8e471f795ee02 (diff)
parent904dec2164bee3d5276fe061c779fedebe6515af (diff)
downloadpodman-a84383297c470436169bbaac06a721e0faafbeb8.tar.gz
podman-a84383297c470436169bbaac06a721e0faafbeb8.tar.bz2
podman-a84383297c470436169bbaac06a721e0faafbeb8.zip
Merge pull request #8853 from jubalh/gentoo
Add support for Gentoo file to package query
Diffstat (limited to 'libpod')
-rw-r--r--libpod/util.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/libpod/util.go b/libpod/util.go
index 8faf665e7..bf9bf2542 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -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)
}
@@ -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) {