Browse Source

Check version of cruft removal item

If the cruft removal item has a different version than the binary currently in
testing, then the cruft item was replaced since it was added, or it was added
in error. In this case, the item should not be processed.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
devuan-deployment
Ivo De Decker 1 year ago
parent
commit
7fdbfcbeb2
2 changed files with 15 additions and 4 deletions
  1. +9
    -4
      britney.py
  2. +6
    -0
      britney2/migration.py

+ 9
- 4
britney.py View File

@@ -878,10 +878,15 @@ class Britney(object):
target_suite.check_suite_source_pkg_consistency('iter_packages after commit')
nuninst_last_accepted = nuninst_after
for cruft_item in new_cruft:
_, updates, rms, _ = mm.compute_groups(cruft_item)
result = (cruft_item, frozenset(updates), frozenset(rms))
group_info[cruft_item] = result
worklist.extend([x] for x in new_cruft)
try:
_, updates, rms, _ = mm.compute_groups(cruft_item)
result = (cruft_item, frozenset(updates), frozenset(rms))
group_info[cruft_item] = result
worklist.append([cruft_item])
except MigrationConstraintException as e:
output_logger.info(
" got exception adding cruft item %s to list: %s" %
(cruft_item.uvname, repr(e)))
rescheduled_packages.extend(maybe_rescheduled_packages)
maybe_rescheduled_packages.clear()
else:


+ 6
- 0
britney2/migration.py View File

@@ -112,6 +112,12 @@ class MigrationManager(object):
else:
assert item_package in binaries_t[item.architecture]
pkg_id = binaries_t[item.architecture][item_package].pkg_id
binary, ver, parch = pkg_id
if ver != item.version:
raise MigrationConstraintException(
"trying cruft removal item %s, while %s has %s/%s on %s" % (
item, target_suite.name,
binary, ver, parch))
source_name = binaries_t[item.architecture][item_package].source
rms = {pkg_id}
smoothbins = set()


Loading…
Cancel
Save