diff --git a/libpod/util.go b/libpod/util.go index 307caa8c5c..51fe604278 100644 --- a/libpod/util.go +++ b/libpod/util.go @@ -149,6 +149,14 @@ func queryPackageVersion(cmdArg ...string) string { cmd := exec.Command(cmdArg[0], cmdArg[1:]...) if outp, err := cmd.Output(); err == nil { output = string(outp) + if cmdArg[0] == "/usr/bin/dpkg" { + r := strings.Split(output, ": ") + queryFormat := `${Package}_${Version}_${Architecture}` + cmd = exec.Command("/usr/bin/dpkg-query", "-f", queryFormat, "-W", r[0]) + if outp, err := cmd.Output(); err == nil { + output = string(outp) + } + } } if cmdArg[0] == "/sbin/apk" { prefix := cmdArg[len(cmdArg)-1] + " is owned by "