From 822d847c119f6b0f87b4cdc73a65df4de1a55b67 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 4 Aug 2014 22:32:15 +0200 Subject: [PATCH] britney.py: Skip lundo maintenance in non-hint recurse runs There are no uses of "lundo" left for a non-hint recurse run (i.e. the "main run"), so there is no point in building it. The "lundo"-list is still used in the recurse run of a "hint"-hint. Signed-off-by: Niels Thykier --- britney.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/britney.py b/britney.py index 986213a..e8e46f4 100755 --- a/britney.py +++ b/britney.py @@ -1915,7 +1915,7 @@ class Britney(object): return (adds, rms, set(smoothbins.itervalues())) - def doop_source(self, item, hint_undo=[], removals=frozenset()): + def doop_source(self, item, hint_undo=None, removals=frozenset()): """Apply a change to the testing distribution as requested by `pkg` An optional list of undo actions related to packages processed earlier @@ -2048,7 +2048,7 @@ class Britney(object): affected.update(get_reverse_tree(j, parch)) old_version = old_pkg_data[VERSION] inst_tester.remove_testing_binary(binary, old_version, parch) - else: + elif hint_undo: # the binary isn't in testing, but it may have been at # the start of the current hint and have been removed # by an earlier migration. if that's the case then we @@ -2205,9 +2205,6 @@ class Britney(object): dependencies = self.dependencies check_packages = partial(self._check_packages, binaries) - if lundo is None: - lundo = [] - self.output_write("recur: [%s] %s %d/%d\n" % ("", ",".join(x.uvname for x in selected), len(packages), len(extra))) # loop on the packages (or better, actions) @@ -2261,7 +2258,8 @@ class Britney(object): # check if the action improved the uninstallability counters if better: - lundo.append((undo, item)) + if lundo is not None: + lundo.append((undo, item)) selected.append(item) packages.extend(extra) extra = []