[Piuparts-commits] [piuparts] 12/12: p: only warn on broken symlinks after installing the dependencies

Holger Levsen holger at layer-acht.org
Mon Mar 13 12:39:53 UTC 2017


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

holger pushed a commit to branch develop
in repository piuparts.

commit 07fb8228a76e7a0009cf156425b9686a2f163358
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Mar 12 04:59:49 2017 +0100

    p: only warn on broken symlinks after installing the dependencies
    
    there are no custom scripts at this point that could fix up things
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 debian/changelog | 2 ++
 piuparts.py      | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e37e4e4..bf8d1ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ piuparts (0.77) UNRELEASED; urgency=medium
     - Refactor internal handling of reference chroot state.
     - Do not run custom scripts before/after installing fake essential
       packages.
+    - Only warn on broken symlinks found between installing the dependencies
+      of the package to be tested and installing the package itself.
   * piupartslib/packagesdb.py:
     - Add new state "outdated" to ignore packages if a dependency distro
       already has a newer version.  (Closes: #856846)
diff --git a/piuparts.py b/piuparts.py
index e7dfbd5..76ec2a0 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1670,7 +1670,7 @@ class Chroot:
                 return True
         return False
 
-    def check_for_broken_symlinks(self):
+    def check_for_broken_symlinks(self, warn_only=None):
         """Check that all symlinks in chroot are non-broken."""
         if not settings.check_broken_symlinks:
             return
@@ -1691,7 +1691,7 @@ class Chroot:
                         target = "<unknown>"
                     broken.append("%s -> %s" % (name, target))
         if broken:
-            if settings.warn_broken_symlinks:
+            if settings.warn_broken_symlinks or warn_only:
                 logging.error("WARN: Broken symlinks:\n%s" %
                               indent_string("\n".join(broken)))
             else:
@@ -2508,7 +2508,7 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
             chroot_state_with_deps = chroot.get_state_meta_data()
 
     chroot.check_for_no_processes()
-    chroot.check_for_broken_symlinks()
+    chroot.check_for_broken_symlinks(warn_only=True)  # warn only since no scripts could fix up things after installing the dependencies
 
     chroot.install_packages(package_files, packages, with_scripts=False)
 

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