Improves installed package detection on debian-based

Instead of relying only on the exit code of dpkg query, we check that
the status is installed for sure.

This prevents situations where the package was not properly installed,
and has a status like "install ok not-installed".
This commit is contained in:
Bruno Tavares 2015-09-27 13:31:03 -03:00
parent 790f5b41ee
commit a0bb7e160d

View File

@ -3,7 +3,7 @@ kickstart.package.installed() {
} }
kickstart.package.installed.apt-get() { kickstart.package.installed.apt-get() {
kickstart.mute dpkg -s "$*" dpkg -s "$*" | kickstart.stream.contains "Status: install ok installed"
} }
kickstart.package.installed.brew() { kickstart.package.installed.brew() {