[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-583-ge144d01

Andreas Beckmann debian at abeckmann.de
Fri May 25 12:41:05 UTC 2012


The following commit has been merged in the develop branch:
commit ab594a761ab13328de1e8ad8eec14e0f599d8636
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Mar 21 18:00:19 2012 +0100

    remove known_circular_depends from piuparts.conf handling
    
    since circular dependencies are computed automatically,
    we no longer need to handle them in the config file
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/TODO b/TODO
index cc77b04..aeddea0 100644
--- a/TODO
+++ b/TODO
@@ -148,8 +148,3 @@ Low priority stuff (a.k.a. "nobody's said they must have it now")
   repo. (then later put more broken packages in there and use
   that for testing piuparts)
 
-- read circular depends from /etc/piuparts/circular-depends-*.txt
-  instead of having this infinite string in the config file
-  filename should be configurable, e.g.
-  [section]/circular-depends-file
-
diff --git a/debian/changelog b/debian/changelog
index 5068e2b..d36404e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,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.
+  * Remove known_circular_depends from piuparts.conf handling.
 
   [ Leo Iannacone ]
   * piuparts.py: add --existing-chroot option, specify a directory as source
diff --git a/piuparts-master.py b/piuparts-master.py
index 04bb7f5..2b87052 100644
--- a/piuparts-master.py
+++ b/piuparts-master.py
@@ -54,7 +54,6 @@ class Config(piupartslib.conf.Config):
                 "log-file": None,
                 "packages-url": None,
                 "master-directory": ".",
-                "known_circular_depends": "",
             }, "")
 
 
@@ -112,7 +111,7 @@ class Master(Protocol):
         "successfully-tested",
     )
 
-    def __init__(self, input, output, packages_file, known_circular_depends="", section=None):
+    def __init__(self, input, output, packages_file, section=None):
         Protocol.__init__(self, input, output)
         self._commands = {
             "status": self._status,
@@ -125,15 +124,6 @@ class Master(Protocol):
         self._binary_db = piupartslib.packagesdb.PackagesDB(prefix=section)
         self._binary_db.create_subdirs()
         self._binary_db.read_packages_file(packages_file)
-        my_known_circular_depends = []
-        for kcd in known_circular_depends.split():
-          my_known_circular_depends.append(kcd)
-          logging.debug("circular depends: " + kcd)
-        try:
-          self._binary_db.set_known_circular_depends(my_known_circular_depends)
-          logging.debug("section: "+section+" even more WTF should this ever be logged with section lenny2squeeze...!")
-        except:
-          logging.debug("section: "+section+" a fine dose of WTF. I'm looking forward to the day I understand this. This shouldnt happen and only happens for the lenny2squeeze section, never for squeeze or sid. ")
         self._writeline("hello")
 
     def do_transaction(self):
@@ -226,9 +216,8 @@ def main():
 
         logging.info("Fetching %s" % config["packages-url"])
         packages_file = piupartslib.open_packages_url(config["packages-url"])
-        known_circular_depends = config["known_circular_depends"]
 
-        m = Master(sys.stdin, sys.stdout, packages_file, known_circular_depends, section=section)
+        m = Master(sys.stdin, sys.stdout, packages_file, section=section)
         while m.do_transaction():
             pass
         packages_file.close()
diff --git a/piuparts-report.py b/piuparts-report.py
index 0bec6e3..0c1234d 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -418,8 +418,7 @@ class Config(piupartslib.conf.Config):
                 "sources-url": None,
                 "master-directory": ".",
                 "description": "",
-                "known_circular_depends": "",
-                "max-reserved": 1, 
+                "max-reserved": 1,
             }, "")
 
 
@@ -573,17 +572,11 @@ class Section:
         logging.debug("-------------------------------------------")
         logging.debug("Running section " + self._config.section)
 
-        known_circular_depends = []
-        for kcd in self._config["known_circular_depends"].split():
-          known_circular_depends.append(kcd)
-          #logging.debug("circular depends: " + kcd)
-
         logging.debug("Loading and parsing Packages file")
         logging.info("Fetching %s" % self._config["packages-url"])
         packages_file = piupartslib.open_packages_url(self._config["packages-url"])
         self._binary_db = piupartslib.packagesdb.PackagesDB()
         self._binary_db.read_packages_file(packages_file)
-        self._binary_db.set_known_circular_depends(known_circular_depends)
         packages_file.close()
 
         if self._config["sources-url"]:
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index e7e28d5..cebade5 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -277,10 +277,6 @@ class PackagesDB:
         self._packages_files.append(PackagesFile(input))
         self._packages = None
 
-    def set_known_circular_depends(self, known_circular_depends=[]):
-        self._known_circular_depends = []
-        self._known_circular_depends = list(known_circular_depends)
-
     def _find_all_packages(self):
         if self._packages is None:
             self._packages = {}

-- 
piuparts git repository



More information about the Piuparts-commits mailing list