[Piuparts-commits] [piuparts] 04/06: p: only ignore 'dpkg -i' failures due to dependency errors

Holger Levsen holger at moszumanska.debian.org
Mon Aug 10 08:43:13 UTC 2015


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

holger pushed a commit to branch develop
in repository piuparts.

commit 7c46aeb573485602512540975a87ecfb84fac1b4
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Aug 10 00:23:28 2015 +0200

    p: only ignore 'dpkg -i' failures due to dependency errors
    
    only ignore "dependency problems - leaving unconfigured" for now
    (since that can be fixed by a subsequent "apt-get -yf install")
    and fail on e.g. "package architecture (i386) does not match system (amd64)"
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 2 ++
 piuparts.py      | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index e403393..29133c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ piuparts (0.65) UNRELEASED; urgency=medium
       chroot that are not removed after the test. These are available during
       purge and for checking against mistreatment.
     - Increase permitted command output volume from 3 MB to 4 MB (for daptup).
+    - Only ignore 'dpkg -i' failures that can be fixed by 'apt-get -f
+      install'.  (Closes: #794628)
   * piuparts.conf.anbe: Add some more example sections.
   * piupartslib/packagesdb.py:
     - Put package in 'dependency-does-not-exist' state if a pass/ log exists
diff --git a/piuparts.py b/piuparts.py
index 3c067df..d1b2f25 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1154,7 +1154,13 @@ class Chroot:
             if settings.list_installed_files:
                 pre_info = self.save_meta_data()
 
-            self.run(["dpkg", "-i"] + tmp_files, ignore_errors=True)
+            (ret, out) = self.run(["dpkg", "-i"] + tmp_files, ignore_errors=True)
+            if ret != 0:
+                if "dependency problems - leaving unconfigured" in out:
+                    pass
+                else:
+                    logging.error("Installation failed")
+                    panic()
 
             if settings.list_installed_files:
                 self.list_installed_files(pre_info, self.save_meta_data())

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