From ef71f0e33a7c3d8ef223ec9ad5e9843777e68133 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Wed, 4 May 2011 18:45:11 +0000 Subject: [PATCH] When undoing a hint, remove new binaries before re-adding those removed If new binary packages are removed from the system afer the original packages have been re-introduced, a binary package which has moved between source packages may be removed entirely. See Debian bug #624716 for more details. Signed-off-by: Adam D. Barratt --- britney.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/britney.py b/britney.py index 7dd6e6e..b129d06 100755 --- a/britney.py +++ b/britney.py @@ -2483,6 +2483,7 @@ class Britney: del self.sources['testing'][k[1:]] else: self.sources['testing'][k] = undo['sources'][k] + for (undo, pkg, pkg_name, suite) in lundo: # undo the changes (new binaries) if pkg[0] != '-' and pkg_name in self.sources[suite]: for p in self.sources[suite][pkg_name][BINARIES]: @@ -2491,6 +2492,7 @@ class Britney: del self.binaries['testing'][arch][0][binary] self.systems[arch].remove_binary(binary) + for (undo, pkg, pkg_name, suite) in lundo: # undo the changes (binaries) for p in undo['binaries'].keys(): binary, arch = p.split("/") @@ -2499,6 +2501,7 @@ class Britney: self.systems[arch].remove_binary(binary[1:]) else: self.binaries['testing'][arch][0][binary] = undo['binaries'][p] + for (undo, pkg, pkg_name, suite) in lundo: # undo the changes (virtual packages) for p in undo['nvirtual']: j, arch = p.split("/")