Fix missing package check

`dpkg-query -W parted` exits with 0 even if it is not installed
This commit is contained in:
Anders Ingemann 2013-10-27 09:24:07 +01:00
parent a07e02cfcc
commit 1b5a1e0579

View file

@ -14,7 +14,7 @@ class CheckPackages(Task):
from subprocess import CalledProcessError
for package in info.host_packages:
try:
log_check_call(['/usr/bin/dpkg-query', '-W', package])
log_check_call(['/usr/bin/dpkg-query', '-s', package])
except CalledProcessError:
msg = "The package ``{0}\'\' is not installed".format(package)
raise TaskError(msg)