From 88bc3eeb5e2c887425573b7ca66cdd16c92397f6 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Tue, 2 Aug 2011 18:46:17 +0000 Subject: [PATCH] Avoid marking some valid excuses as impossible. When considering an excuse for pkg1/arch, a dependency on either of pkg2/source or pkg2/arch should be considered acceptable so long as there is a corresponding excuse. Dependencies from pkg1/source to pkg2/arch will still be considered "impossible", as pkg1's excuse does not contain any information regarding the architecture(s) on which its dependency to pkg2 exists. Signed-off-by: Adam D. Barratt --- britney.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/britney.py b/britney.py index 99a4add..3c3a92f 100755 --- a/britney.py +++ b/britney.py @@ -1596,8 +1596,20 @@ class Britney: # invalidate impossible excuses for e in self.excuses: + # parts[0] == package name + # parts[1] == optional architecture + parts = e.name.split('/') for d in e.deps: - if d not in upgrade_me and d not in unconsidered: + ok = False + if d in upgrade_me or d in unconsidered: + ok = True + # if the excuse is for a binNMU, also consider d/$arch as a + # valid excuse + if len(parts) == 2: + bd = '%s/%s' % (d, parts[1]) + if bd in upgrade_me or bd in unconsidered: + ok = True + if not ok: e.addhtml("Impossible dependency: %s -> %s" % (e.name, d)) self.invalidate_excuses(upgrade_me, unconsidered)