[Piuparts-devel] Bug#718544: reports packages installed when they weren't

Andreas Beckmann anbe at debian.org
Fri Jan 10 02:37:43 UTC 2014


> On Mittwoch, 18. Dezember 2013, Julien Cristau wrote:
>> diff --git a/piuparts.py b/piuparts.py
>> index 9134924..4d357ea 100644
>> --- a/piuparts.py
>> +++ b/piuparts.py
>> @@ -1202,6 +1202,13 @@ class Chroot:
>>                  self.run(["dpkg", "-i"] + tmp_files, ignore_errors=True)
>>                  self.run(apt_get_install)
>>
>> +            retcode, output = self.run(["dpkg-query", "-f", "${Package}
>> ${Status}\n", "-W"] + [os.path.basename(f).split('_')[0] for f in
>> package_files]) +            for line in output.splitlines():
>> +                pkg, desired, whatever, status = line.split()
>> +                if status != 'installed':
>> +                    logging.error("Installation of %s failed", pkg)
>> +                    panic()

(half-)NACK: this fixes only part of the problem,
install_packages_by_name() needs to be handled as well.
And we should add a known_problem report for this, too.


Andreas



More information about the Piuparts-devel mailing list