[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-659-gbb7344d

Andreas Beckmann debian at abeckmann.de
Mon Jun 4 12:29:03 UTC 2012


The following commit has been merged in the develop branch:
commit 65078cca785bec9b9cc53b385fc171bd6ca0806a
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jun 3 15:19:21 2012 +0200

    lib/db: simplify blocking count
    
    Consider any combination of 2 error states between a package
    and its rdeps for the blocking count.
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index a6553dd..14d9518 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -79,6 +79,7 @@ piuparts (0.45) UNRELEASED; urgency=low
     - Stop using static known_circular_depends.
     - Compute dependency cycles and test packages on such cycles if all
       non-circular dependencies are satisfied.
+    - Consider any combination of two error states for the blocking count.
   * piuparts-master.py:
     - Remove known_circular_depends handling.
   * piuparts-slave.py:
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 89d642e..4ba2023 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -609,6 +609,7 @@ class PackagesDB:
 
         self._find_all_packages()       # populate _packages
         self._compute_package_states()  # populate _package_state
+        error_states = self.get_error_states()
 
         # create a reverse dependency dictionary.
         # entries consist of a one-level list of reverse dependency package names,
@@ -637,24 +638,16 @@ class PackagesDB:
 
             return rrdep_dict
 
-
-        # define which state relationships between and package and reverse dep
-        # constitute a block
-        block_states = [
-            ("dependency-failed-testing", "failed-testing"),
-            ("dependency-cannot-be-tested", "cannot-be-tested"),
-            ]
-
         # calculate all of the rrdeps and block counts
         for pkg_name in self._packages.keys():
             rrdep_list = recurse_rdeps( pkg_name, rdeps, {} ).keys()
-
             self._packages[pkg_name].set_rrdep_count( len(rrdep_list) )
 
-            block_list = [x for x in rrdep_list
-                     if (self._package_state[x], self._package_state[pkg_name])
-                        in block_states]
-
+            if self._package_state[pkg_name] in error_states:
+                block_list = [x for x in rrdep_list
+                              if self._package_state[x] in error_states]
+            else:
+                block_list = []
             self._packages[pkg_name].set_block_count( len(block_list) )
 
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list