[Piuparts-commits] [piuparts] 01/01: piuparts.py: Check the installation status of the packages after installing them. Thanks to Julien Cristau for the patch! (Closes: #718544)

Holger Levsen holger at moszumanska.debian.org
Tue Jan 21 12:22:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 3176cd3f0850198b84ead847cedd25b364c8b828
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Jan 21 13:22:00 2014 +0100

    piuparts.py: Check the installation status of the packages after installing them. Thanks to Julien Cristau for the patch! (Closes: #718544)
---
 debian/changelog | 4 ++++
 piuparts.py      | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 87abd2e..696c30b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,10 @@ piuparts (0.57) UNRELEASED; urgency=low
     - Mark essential-required as obsolete and hide it.
   * Add more piuparts exceptions.
 
+  [ Holger Levsen ]
+  * piuparts.py: Check the installation status of the packages after
+    installing them. Thanks to Julien Cristau for the patch! (Closes: #718544)
+
  -- Holger Levsen <holger at debian.org>  Fri, 10 Jan 2014 01:00:43 +0100
 
 piuparts (0.56) unstable; urgency=low
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()
+
             logging.info ("Installation of %s ok", tmp_files)
 
             if with_scripts:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list