Clarify the checks for existing binary packages in doop_source()

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
bzr-import-20160707
Adam D. Barratt 12 years ago
parent c74ee2878b
commit 2ccfc4120c

@ -1932,7 +1932,10 @@ class Britney(object):
key = (binary, parch) key = (binary, parch)
# obviously, added/modified packages are affected # obviously, added/modified packages are affected
if key not in affected: affected.add(key) if key not in affected: affected.add(key)
# if the binary already exists (built from another source) # if the binary already exists in testing, it is currently
# built by another source package. we therefore remove the
# version built by the other source package, after marking
# all of its reverse dependencies as affected
if binary in binaries[parch][0]: if binary in binaries[parch][0]:
# save the old binary package # save the old binary package
undo['binaries'][p] = binaries[parch][0][binary] undo['binaries'][p] = binaries[parch][0][binary]
@ -1947,9 +1950,13 @@ class Britney(object):
if key not in affected: affected.add(key) if key not in affected: affected.add(key)
self.systems[parch].remove_binary(binary) self.systems[parch].remove_binary(binary)
else: else:
# if the binary was previously built by a different # the binary isn't in testing, but it may have been at
# source package in testing, all of the reverse # the start of the current hint and have been removed
# dependencies of the old binary are affected. # by an earlier migration. if that's the case then we
# will have a record of the older instance of the binary
# in the undo information. we can use that to ensure
# that the reverse dependencies of the older binary
# package are also checked.
# reverse dependencies built from this source can be # reverse dependencies built from this source can be
# ignored as their reverse trees are already handled # ignored as their reverse trees are already handled
# by this function # by this function

Loading…
Cancel
Save