mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-18 05:51:32 +00:00
suiteloader: Handle NBS
If we have this situation - Binary in target taken over by new source - Not cleaned up yet - New source updated in source suite We can have *three* copies of a source package visible to britney at once. Handle this case by recording the source package a pkgid was seen in before.
This commit is contained in:
parent
3988d700d3
commit
dc98eda37a
@ -293,6 +293,8 @@ class DebMirrorLikeSuiteContentLoader(SuiteContentLoader):
|
|||||||
if packages is None:
|
if packages is None:
|
||||||
packages = {}
|
packages = {}
|
||||||
|
|
||||||
|
added_old_binaries = {}
|
||||||
|
|
||||||
all_binaries = self._all_binaries
|
all_binaries = self._all_binaries
|
||||||
|
|
||||||
tag_file = apt_pkg.TagFile(filename)
|
tag_file = apt_pkg.TagFile(filename)
|
||||||
@ -317,7 +319,15 @@ class DebMirrorLikeSuiteContentLoader(SuiteContentLoader):
|
|||||||
continue
|
continue
|
||||||
old_pkg_id = old_pkg_data.pkg_id
|
old_pkg_id = old_pkg_data.pkg_id
|
||||||
old_src_binaries = srcdist[old_pkg_data.source].binaries
|
old_src_binaries = srcdist[old_pkg_data.source].binaries
|
||||||
old_src_binaries.remove(old_pkg_id)
|
|
||||||
|
prev_src = added_old_binaries.get(old_pkg_id, old_pkg_data.source)
|
||||||
|
ps = srcdist[prev_src]
|
||||||
|
ps.binaries.remove(old_pkg_id)
|
||||||
|
try:
|
||||||
|
del added_old_binaries[old_pkg_id]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
# This may seem weird at first glance, but the current code rely
|
# This may seem weird at first glance, but the current code rely
|
||||||
# on this behaviour to avoid issues like #709460. Admittedly it
|
# on this behaviour to avoid issues like #709460. Admittedly it
|
||||||
# is a special case, but Britney will attempt to remove the
|
# is a special case, but Britney will attempt to remove the
|
||||||
@ -326,6 +336,7 @@ class DebMirrorLikeSuiteContentLoader(SuiteContentLoader):
|
|||||||
# and the version, so it is not particularly resilient.
|
# and the version, so it is not particularly resilient.
|
||||||
if pkg_id not in old_src_binaries:
|
if pkg_id not in old_src_binaries:
|
||||||
old_src_binaries.add(pkg_id)
|
old_src_binaries.add(pkg_id)
|
||||||
|
added_old_binaries[pkg_id] = old_pkg_data.source
|
||||||
|
|
||||||
# Merge Pre-Depends with Depends and Conflicts with
|
# Merge Pre-Depends with Depends and Conflicts with
|
||||||
# Breaks. Britney is not interested in the "finer
|
# Breaks. Britney is not interested in the "finer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user