[Piuparts-commits] [piuparts] 02/02: p: check the status of the packages after installing .debs

Holger Levsen holger at moszumanska.debian.org
Sun Feb 9 18:20:16 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 169d36e0460e8b78eb6f4454aaf00cca7a91979c
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sat Feb 8 21:45:14 2014 +0100

    p: check the status of the packages after installing .debs
    
    and fail if they are not installed
    
    do not abort if installation of piuparts-depends-dummy.deb failed,
    too many failures
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 2 ++
 piuparts.py      | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6a4c85c..e59c42d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,8 @@ piuparts (0.57) UNRELEASED; urgency=low
       installability with older dpkg versions.
     - Exclude virtual packages provided by the real package (but not the dummy
       package) from the Conflicts of piuparts-depends-dummy.deb.
+    - Check the status of the packages after installing the supplied .debs.
+      Based on an initial patch by Julien Cristau.  (Closes: #718544, #736743)
   * piupartslib/packagesdb.py:
     - load_alternate_versions_from_packages_urls(): New method to load
       alternate version numbers from a different set of URLs (e.g.
diff --git a/piuparts.py b/piuparts.py
index ff94957..d212093 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1098,6 +1098,10 @@ class Chroot:
                 self.run(["dpkg", "-i"] + tmp_files, ignore_errors=True)
                 self.run(apt_get_install)
 
+            if not self.is_installed(unqualify(packages)):
+                logging.error("Could not install %s.", " ".join(unqualify(packages)))
+                panic()
+
             logging.info ("Installation of %s ok", tmp_files)
 
             if with_scripts:
@@ -2218,6 +2222,11 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
 
         # Install the metapackage
         chroot.install_package_files([metapackage], with_scripts=False)
+        if not chroot.is_installed(["piuparts-depends-dummy"]):
+            logging.error("Installation of piuparts-depends-dummy FAILED")
+            # FIXME: too many failures
+            # panic()
+
         # Now remove it
         metapackagename = os.path.basename(metapackage)[:-4]
         chroot.purge_packages([metapackagename])

-- 
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