[Piuparts-commits] [piuparts] 03/09: lib/db: prefer recycling previously failing logs

Holger Levsen holger at moszumanska.debian.org
Mon Feb 10 13:03:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 828981cfbce0eef7fb9cb3a9eaf7b1d45776a927
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Dec 8 23:03:35 2013 +0100

    lib/db: prefer recycling previously failing logs
    
    unless there are packages blocking others
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piupartslib/packagesdb.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index bbfec62..68b8446 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -697,9 +697,16 @@ class PackagesDB:
         waiting_count = self.waiting_count(p["Package"])
         rdep_chain_len = self.rdep_chain_len(p["Package"])
 
+        if not self._recycle_mode:
+            return (
+                    min(rdep_chain_len, waiting_count),
+                    waiting_count,
+                    )
+
         return (
                 min(rdep_chain_len, waiting_count),
                 waiting_count,
+                not self._logdb.log_exists(p, [self._ok]),  # prefer problematic logs
                 )
 
     def _find_packages_ready_for_testing(self):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list