From 7fb9f58bb8a2f515d3965fd81f9f747b8e4604f2 Mon Sep 17 00:00:00 2001 From: Fabio Tranchitella Date: Sat, 12 Jan 2008 19:19:26 +0000 Subject: [PATCH] So well, so good: the excuses are very close to the one generated by the original Britney. Still a few differences, which in my opinion are bugs in the old one; I don't want to implement those bugs. Full stop. --- britney.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/britney.py b/britney.py index e48ad17..6026ff0 100644 --- a/britney.py +++ b/britney.py @@ -1036,6 +1036,8 @@ class Britney: if self.hints['block'].has_key('-' + pkg): excuse.addhtml("Not touching package, as requested by %s (contact debian-release " "if update is needed)" % self.hints['block']['-' + pkg]) + excuse.addhtml("Not considered") + self.excuses.append(excuse) return False excuse.addhtml("Valid candidate") @@ -1247,8 +1249,9 @@ class Britney: days_old = self.date_now - self.dates[src][1] min_days = self.MINDAYS[urgency] - if self.hints["age-days"].has_key(src) and (self.hints["age-days"][src][0] == "-" or \ - self.same_source(source_u[VERSION], hints["age-days"][src][0])): + age_days_hint = self.hints["age-days"].get(src) + if age_days_hint is not None and (age_days_hint[0] == "-" or \ + self.same_source(source_u[VERSION], age_days_hint[0])): excuse.addhtml("Overriding age needed from %d days to %d by %s" % (min_days, int(self.hints["age-days"][src][2]), self.hints["age-days"][src][1])) min_days = int(self.hints["age-days"][src][2]) @@ -1337,7 +1340,7 @@ class Britney: if len(old_bugs) > 0: excuse.addhtml("Updating %s fixes old bugs: %s" % (pkg, ", ".join( ["#%s" % (a, a) for a in old_bugs]))) - if len(old_bugs) > len(newb) and len(newb) > 0: + if len(old_bugs) > len(new_bugs) and len(new_bugs) > 0: excuse.addhtml("%s introduces new bugs, so still ignored (even " "though it fixes more than it introduces, whine at debian-release)" % pkg)