mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-10 14:07:29 +00:00
britney.py: Fix a regression in nuninst counting for hints
In the rare case that a hint removed an uninstallable binary, the binary could still be included in the nuninst counter. Regression introduced in a46dd88. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
30d686164c
commit
666dd187e4
13
britney.py
13
britney.py
@ -2147,8 +2147,7 @@ class Britney(object):
|
|||||||
nobreakall_arches = self.options.nobreakall_arches.split()
|
nobreakall_arches = self.options.nobreakall_arches.split()
|
||||||
binaries_t = self.binaries['testing']
|
binaries_t = self.binaries['testing']
|
||||||
check_packages = partial(self._check_packages, binaries_t)
|
check_packages = partial(self._check_packages, binaries_t)
|
||||||
# Deep copy nuninst (in case the hint is undone)
|
nuninst = {}
|
||||||
nuninst = {k:v.copy() for k,v in self.nuninst_orig.iteritems()}
|
|
||||||
|
|
||||||
|
|
||||||
for item in hinted_packages:
|
for item in hinted_packages:
|
||||||
@ -2165,6 +2164,16 @@ class Britney(object):
|
|||||||
if lundo is not None:
|
if lundo is not None:
|
||||||
lundo.append((undo,item))
|
lundo.append((undo,item))
|
||||||
|
|
||||||
|
# deep copy nuninst (in case the hint is undone)
|
||||||
|
# NB: We do this *after* updating testing and we have to filter out
|
||||||
|
# removed binaries. Otherwise, uninstallable binaries that were
|
||||||
|
# removed by the hint would still be counted.
|
||||||
|
for arch in self.options.architectures:
|
||||||
|
nuninst_arch = self.nuninst_orig[arch]
|
||||||
|
nuninst_arch_all = self.nuninst_orig[arch + '+all']
|
||||||
|
nuninst[arch] = set(x for x in nuninst_arch if x in binaries_t[arch])
|
||||||
|
nuninst[arch + '+all'] = set(x for x in nuninst_arch_all if x in binaries_t[arch])
|
||||||
|
|
||||||
for arch in self.options.architectures:
|
for arch in self.options.architectures:
|
||||||
if arch not in nobreakall_arches:
|
if arch not in nobreakall_arches:
|
||||||
skip_archall = True
|
skip_archall = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user