Less verbose checking of installed packages

This commit is contained in:
Anders Ingemann 2013-09-25 23:46:04 +02:00
parent e740a3b4d8
commit 3993ff23a5

View file

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