From: Ian Kelling Date: Sun, 30 Jun 2019 19:23:32 +0000 (-0400) Subject: false positive for checking if already installed X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=853cf1c194ece72289d3e317d5436e73b39d50df;p=distro-functions false positive for checking if already installed --- diff --git a/src/package-manager-abstractions b/src/package-manager-abstractions index f66a762..2c291e8 100644 --- a/src/package-manager-abstractions +++ b/src/package-manager-abstractions @@ -72,7 +72,7 @@ elif command -v apt-get &>/dev/null; then fi } pi() { - if dpkg -s -- "$@" &>/dev/null; then + if dpkg -s -- "$@" | grep -Fx "Status: install ok installed" &>/dev/null; then return 0 fi while fuser /var/lib/dpkg/lock &>/dev/null; do sleep 1; done