[Piuparts-commits] rev 583 - in trunk: debian piupartslib

Holger Levsen holger at alioth.debian.org
Thu Dec 24 08:31:14 UTC 2009


Author: holger
Date: 2009-12-24 08:31:13 +0000 (Thu, 24 Dec 2009)
New Revision: 583

Modified:
   trunk/debian/changelog
   trunk/piupartslib/packagesdb.py
Log:
piupartsib/packagesdb.py: automatically break circular dependencies when
there are only circular dependencies left, using a configurable list of
circular depdencies in piuparts.conf (Closes: #526046)
Note that the dependecy resovler is still buggy, the state
waiting-for-dependency-to-be-tested still contains some packages
which failed depends (due to them being dependent on packages with
circular depends). The effect of that is none, other than that
(=waiting-to-be-tested is calculated correctly). This bug was present
before this change.

TODO: make packagesDB.py read list of circular dependen packages from config file

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-12-22 11:16:41 UTC (rev 582)
+++ trunk/debian/changelog	2009-12-24 08:31:13 UTC (rev 583)
@@ -4,6 +4,16 @@
      - report packages which failed due to broken maintainer scripts.
      - visual improvements in the output.
      - ignore udebs and binaries from other archs too.
+  * piupartsib/packagesdb.py: automatically break circular dependencies when
+    there are only circular dependencies left, using a configurable list of
+    circular depdencies in piuparts.conf (Closes: #526046)
+    Note that the dependecy resovler is still buggy, the state
+    waiting-for-dependency-to-be-tested still contains some packages
+    which failed depends (due to them being dependent on packages with
+    circular depends). The effect of that is none, other than that
+    (=waiting-to-be-tested is calculated correctly). This bug was present
+    before this change.
+TODO: make packagesDB.py read config
 
  -- Holger Levsen <holger at debian.org>  Fri, 18 Dec 2009 13:32:16 +0100
 

Modified: trunk/piupartslib/packagesdb.py
===================================================================
--- trunk/piupartslib/packagesdb.py	2009-12-22 11:16:41 UTC (rev 582)
+++ trunk/piupartslib/packagesdb.py	2009-12-24 08:31:13 UTC (rev 583)
@@ -59,7 +59,7 @@
     except TypeError:
       del u  # move on to the next method
     else:
-      return u.keys()   
+      return u.keys()
 
     try:
       t = list(s)
@@ -240,8 +240,7 @@
         "fix-not-yet-tested": "dependency-fix-not-yet-tested",
         "cannot-be-tested": "dependency-cannot-be-tested",
         "waiting-to-be-tested": "waiting-for-dependency-to-be-tested",
-        "waiting-for-dependency-to-be-tested": 
-            "waiting-for-dependency-to-be-tested",
+        "waiting-for-dependency-to-be-tested": "waiting-for-dependency-to-be-tested",
         "dependency-failed-testing": "dependency-failed-testing",
         "dependency-cannot-be-tested": "dependency-cannot-be-tested",
         "dependency-does-not-exist": "dependency-does-not-exist",
@@ -353,10 +352,27 @@
             return state
 
         deps = self._get_recursive_dependencies(package, break_circles=False)
+        # ignore those packages:
+        known_circular_depends =  ['perl', 'perl-modules', 'openjdk-6-jre-headless', 'openjdk-6-jre-lib', 'ca-certificates-java', 'rhino', 'libjline-java', 'java-gcj-compat-headless', 'gij', 'gcj-jre-headless', 'fortune-mod', 'fortunes-min', 'kbd', 'console-common']
+        for pkg in known_circular_depends:
+            if pkg in deps:
+                deps.remove(pkg)
         if package["Package"] in deps:
-            return "circular-dependency"
-            
-        return "unknown"
+            return "circular-dependency" # actually, it's a unknown circular-dependency
+     
+        # treat circular-dependencies as testable (for the part of the circle)
+        state = "unknown" 
+        if package["Package"] in known_circular_depends:
+          for dep in package.dependencies():
+            if dep not in known_circular_depends and self._package_state[dep] not in \
+               ["successfully-tested", "essential-required"]:
+                state = "unknown"
+                break
+            if dep in known_circular_depends and self._package_state[dep] not in \
+               ["failed-testing","dependency-failed-testing"]:
+                state = "waiting-to-be-tested"
+                continue
+        return state
 
     def _compute_package_states(self):
         if self._in_state is not None:




More information about the Piuparts-commits mailing list