diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-30 15:57:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 15:57:55 +0100 |
commit | a84383297c470436169bbaac06a721e0faafbeb8 (patch) | |
tree | 8f6ecd863ee790b4c33dae870dd31f300e9c7ae5 /libpod | |
parent | ef12e36df0f8d72b52e43844cfb8e471f795ee02 (diff) | |
parent | 904dec2164bee3d5276fe061c779fedebe6515af (diff) | |
download | podman-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.go | 9 |
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) { |