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 <adam@adam-barratt.org.uk>
master
Adam D. Barratt 13 years ago
parent ed745af789
commit ef71f0e33a

@ -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("/")

Loading…
Cancel
Save