[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-102-g4c48ac2

Andreas Beckmann debian at abeckmann.de
Fri Aug 3 08:51:43 UTC 2012


The following commit has been merged in the develop branch:
commit 5497821085d201f892ebb5da1de093fbd5040900
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Jul 20 10:58:46 2012 +0200

    lib/db: treat packages in recycle/ as "unknown"
    
    In recycle mode treat packages with a logfile in recycle/ as "unknown"
    and compute whether they may be tested (if all depends are satisfied).
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 61f4b6f..9e85694 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ piuparts (0.46) UNRELEASED; urgency=low
     - Implement logfile recycling mode:
       + logfiles to be recycled should be hardlinked from pass/, fail/, ... to
         recycle/
+      + treat packages with logfile in recycle/ as initially "unknown" and
+        compute state ("waiting[-for-dependency]-to-be-tested")
   * piuparts-master.py:
     - Accept and discard duplicate log submissions, preventing the slave from
       retrying infinitely.
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 460c65f..4180fa7 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -285,6 +285,7 @@ class PackagesDB:
         self._packages = None
         self._in_state = None
         self._package_state = {}
+        self._recycle_mode = False
         self.set_subdirs(ok="pass", fail="fail", evil="untestable",
                          reserved="reserved", morefail=["bugged", "affected"],
                          recycle="recycle")
@@ -376,6 +377,8 @@ class PackagesDB:
         return circular
 
     def _lookup_package_state(self, package):
+        if self._recycle_mode and self._logdb.log_exists(package, [self._recycle]):
+            return "unknown"
         if self._logdb.log_exists(package, [self._ok]):
             return "successfully-tested"
         if self._logdb.log_exists(package, [self._fail] + self._morefail):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list