[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.47-41-ga9fc1b0

Andreas Beckmann debian at abeckmann.de
Fri Nov 30 11:20:17 UTC 2012


The following commit has been merged in the master branch:
commit 610da121d96b9fbb7388fa701343d239773f48ff
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Oct 5 19:51:50 2012 +0200

    p-m: enable recycling as early as possible
    
    recycling must be enabled before the real db gets initialized
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 4d87518..85fff3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ piuparts (0.48) UNRELEASED; urgency=low
   [ Andreas Beckmann ]
   * piuparts.py:
   * piuparts-master.py:
+    - Enable recycling before initializing the real package db.
   * piuparts-slave.py:
   * piuparts-report.py:
 
diff --git a/piuparts-master.py b/piuparts-master.py
index 6b0cec1..e680c2e 100644
--- a/piuparts-master.py
+++ b/piuparts-master.py
@@ -148,13 +148,13 @@ class Master(Protocol):
         self._package_databases = {}
         self._load_package_database(self._section)
         self._binary_db = self._package_databases[self._section]
-        if self._recycle_mode:
-            self._binary_db.enable_recycling()
 
     def _load_package_database(self, section):
         config = Config(section=section, defaults_section="global")
         config.read(CONFIG_FILE)
         db = piupartslib.packagesdb.PackagesDB(prefix=section)
+        if self._recycle_mode and self._section == section:
+            db.enable_recycling()
         self._package_databases[section] = db
         logging.info("Fetching %s" % config.get_packages_url())
         packages_file = piupartslib.open_packages_url(config.get_packages_url())

-- 
piuparts git repository



More information about the Piuparts-commits mailing list