[Piuparts-commits] [piuparts] 02/06: p: piuparts-depends-dummy.deb: exclude Provides from Conflicts

Holger Levsen holger at moszumanska.debian.org
Wed Feb 5 10:24:37 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 7aafa8a8c5ce60e26fc60815b4c358bf173617f4
Author: Andreas Beckmann <anbe at debian.org>
Date:   Thu Jan 30 18:04:44 2014 +0100

    p: piuparts-depends-dummy.deb: exclude Provides from Conflicts
    
    if the 'master' package the 'dummy' package is created for has
      Conflicts+Provides: virtual
    omit 'virtual' from the Conflicts of the 'dummy' package, otherwise
    it may not be installable, especially if 'master' is installed
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 2 ++
 piuparts.py      | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f22f696..b8691c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ piuparts (0.57) UNRELEASED; urgency=low
       + /etc/shadow.org
     - Create piuparts-depends-dummy.deb with gzip compression for
       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.
   * piupartslib/packagesdb.py:
     - get_best_package_state(): New method that considers successfully tested
       providers of a virtual package if the real package of the same name
diff --git a/piuparts.py b/piuparts.py
index e48f0b7..28c85e7 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -2179,6 +2179,7 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
 
         depends = []
         conflicts = []
+        provides = []
         for control in control_infos:
             if control.get("pre-depends"):
                 depends.extend([x.strip() for x in control["pre-depends"].split(',')])
@@ -2186,6 +2187,11 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
                 depends.extend([x.strip() for x in control["depends"].split(',')])
             if control.get("conflicts"):
                 conflicts.extend([x.strip() for x in control["conflicts"].split(',')])
+            if control.get("provides"):
+                provides.extend([x.strip() for x in control["provides"].split(',')])
+        for provided in provides:
+            if provided in conflicts:
+                conflicts.remove(provided)
         all_depends = ", ".join(depends)
         all_conflicts = ", ".join(conflicts)
         metapackage = make_metapackage("piuparts-depends-dummy",

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