mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-01 12:51:43 +00:00
ExcuseFinder: Reduce the number of migration items created
With this change, we reduce the number of migration items creted only to be discarded because the item is not relevant/actionable. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
78d120114f
commit
97abb6f467
@ -548,22 +548,25 @@ class ExcuseFinder(object):
|
|||||||
sources_s = suite.sources
|
sources_s = suite.sources
|
||||||
item_suffix = "_%s" % suite.excuses_suffix if suite.excuses_suffix else ''
|
item_suffix = "_%s" % suite.excuses_suffix if suite.excuses_suffix else ''
|
||||||
for pkg in sources_s:
|
for pkg in sources_s:
|
||||||
if sources_s[pkg].is_fakesrc:
|
src_s_data = sources_s[pkg]
|
||||||
|
if src_s_data.is_fakesrc:
|
||||||
continue
|
continue
|
||||||
# if the source package is already present in the target suite,
|
src_t_data = sources_t.get(pkg)
|
||||||
# check if it should be upgraded for every binary package
|
|
||||||
if pkg in sources_t:
|
if src_t_data is None or apt_pkg.version_compare(src_s_data.version, src_t_data.version) != 0:
|
||||||
|
item = mi_factory.parse_item("%s%s" % (pkg, item_suffix), versioned=False, auto_correct=False)
|
||||||
|
# check if the source package should be upgraded
|
||||||
|
if should_upgrade_src(item):
|
||||||
|
actionable_items_add(item.name)
|
||||||
|
else:
|
||||||
|
# package has same version in source and target suite; check if any of the
|
||||||
|
# binaries have changed on the various architectures
|
||||||
for arch in architectures:
|
for arch in architectures:
|
||||||
item = mi_factory.parse_item("%s/%s%s" % (pkg, arch, item_suffix),
|
item = mi_factory.parse_item("%s/%s%s" % (pkg, arch, item_suffix),
|
||||||
versioned=False, auto_correct=False)
|
versioned=False, auto_correct=False)
|
||||||
if should_upgrade_srcarch(item):
|
if should_upgrade_srcarch(item):
|
||||||
actionable_items_add(item.name)
|
actionable_items_add(item.name)
|
||||||
|
|
||||||
item = mi_factory.parse_item("%s%s" % (pkg, item_suffix), versioned=False, auto_correct=False)
|
|
||||||
# check if the source package should be upgraded
|
|
||||||
if should_upgrade_src(item):
|
|
||||||
actionable_items_add(item.name)
|
|
||||||
|
|
||||||
# process the `remove' hints, if the given package is not yet in actionable_items
|
# process the `remove' hints, if the given package is not yet in actionable_items
|
||||||
for hint in self.hints['remove']:
|
for hint in self.hints['remove']:
|
||||||
src = hint.package
|
src = hint.package
|
||||||
|
Loading…
x
Reference in New Issue
Block a user