Ignore stderr from pkg-map

The latest update to package-install captures both stderr and stdout
from pkg-map, unfortunately, pkg-map has a 'missing-ok' option
which causes it to print an error message on stderr.
The result is that package-install tries to look for packages named
"Missing", "package", "name", etc.

Change-Id: I86b3b71a64b29d533b42fd0cae020e8ecf22cac2
Closes-bug: 1402085
This commit is contained in:
Abel Lopez 2014-12-12 15:36:33 -08:00
parent 2dfb931d95
commit da7787069d

View File

@ -55,14 +55,14 @@ def main():
try:
map_output = subprocess.check_output(
pkg_map_args, stderr=subprocess.STDOUT)
pkg_map_args)
except subprocess.CalledProcessError as e:
if e.returncode == 1:
if args.noop:
pkgs.append(pkg)
continue
else:
print("pkg-map failed with error %s" % e.output)
print("pkg-map failed")
sys.exit(1)
elif e.returncode == 2:
pkgs.append(pkg)