[Piuparts-commits] rev 767 - in trunk: . piupartslib

Holger Levsen holger at alioth.debian.org
Sat Nov 13 21:18:54 UTC 2010


Author: holger
Date: 2010-11-13 21:18:53 +0000 (Sat, 13 Nov 2010)
New Revision: 767

Modified:
   trunk/piuparts-master.py
   trunk/piupartslib/packagesdb.py
Log:
still trying to understand why it works for two thirds of the loop...

Modified: trunk/piuparts-master.py
===================================================================
--- trunk/piuparts-master.py	2010-11-13 20:32:04 UTC (rev 766)
+++ trunk/piuparts-master.py	2010-11-13 21:18:53 UTC (rev 767)
@@ -113,7 +113,7 @@
         "successfully-tested",
     )
 
-    def __init__(self, input, output, packages_file, known_circular_depends=[], section=None):
+    def __init__(self, input, output, packages_file, known_circular_depends="", section=None):
         Protocol.__init__(self, input, output)
         self._commands = {
             "reserve": self._reserve,
@@ -125,7 +125,12 @@
         self._binary_db = piupartslib.packagesdb.PackagesDB(prefix=section)
         self._binary_db.create_subdirs()
         self._binary_db.read_packages_file(packages_file)
-        self._binary_db.set_known_circular_depends(known_circular_depends)
+        my_known_circular_depends = []
+        for kcd in known_circular_depends.split():
+          my_known_circular_depends.append(kcd)
+          logging.debug("circular depends: " + kcd)
+
+        self._binary_db.set_known_circular_depends(my_known_circular_depends)
         self._writeline("hello")
 
     def do_transaction(self):
@@ -197,12 +202,7 @@
         logging.info("Fetching %s" % config["packages-url"])
         packages_file = piupartslib.open_packages_url(config["packages-url"])
 
-        known_circular_depends = []
-        for kcd in config["known_circular_depends"].split():
-          known_circular_depends.append(kcd)
-          logging.debug("circular depends: " + kcd)
-
-        m = Master(sys.stdin, sys.stdout, packages_file, known_circular_depends, section=section)
+        m = Master(sys.stdin, sys.stdout, packages_file, config["known_circular_depends"], section=section)
         packages_file.close()
         while m.do_transaction():
             pass

Modified: trunk/piupartslib/packagesdb.py
===================================================================
--- trunk/piupartslib/packagesdb.py	2010-11-13 20:32:04 UTC (rev 766)
+++ trunk/piupartslib/packagesdb.py	2010-11-13 21:18:53 UTC (rev 767)
@@ -245,7 +245,6 @@
     }
 
     def __init__(self, logdb=None, prefix=None):
-        #FIXME: I think the prefix code is unused...
         self.prefix = prefix
         self._packages_files = []
         self._ready_for_testing = None




More information about the Piuparts-commits mailing list