From e47201d0f24564c9da426b7673302b95d02fb820 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Tue, 1 Mar 2011 23:40:32 +0000 Subject: [PATCH] Correctly handle uninstallable arch:all to installable arch:any moves If the package was previously arch:all and uninstallable and has moved to being architecture-dependent, becoming installable in the process, then it will not be in the architecture-dependent uninstallability set; we therefore should try removing it from that set. --- britney.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/britney.py b/britney.py index efa63bf..ecbb5e1 100755 --- a/britney.py +++ b/britney.py @@ -2241,7 +2241,14 @@ class Britney: to_check.append(p) broken.remove(p) if not (skip_archall and binaries[arch][0][p][ARCHITECTURE] == 'all'): - nuninst[arch].remove(p) + # if the package was previously arch:all and uninstallable + # and has moved to being architecture-dependent, becoming + # installable in the process then it will not be in the + # architecture-dependent uninstallability set; therefore, + # don't try removing it + if p in nuninst[arch]: + nuninst[arch].remove(p) + # broken packages (second round, reverse dependencies of the first round) while to_check: @@ -2259,7 +2266,13 @@ class Britney: broken.remove(p) to_check.append(p) if not (skip_archall and binaries[arch][0][p][ARCHITECTURE] == 'all'): - nuninst[arch].remove(p) + # if the package was previously arch:all and uninstallable + # and has moved to being architecture-dependent, becoming + # installable in the process then it will not be in the + # architecture-dependent uninstallability set; therefore, + # don't try removing it + if p in nuninst[arch]: + nuninst[arch].remove(p) # if we are processing hints, go ahead if hint: