Browse Source

compute_groups: rename badly named source_name

When the item is a cruft removal item, the variable contains the binary name,
not the source name. So rename it to item_package and set source_name, to the
source in both cases.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
devuan-deployment
Ivo De Decker 1 year ago
parent
commit
e3af8993be
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      britney2/migration.py

+ 5
- 4
britney2/migration.py View File

@@ -92,7 +92,7 @@ class MigrationManager(object):
any data structure.
"""
# local copies for better performances
source_name = item.package
item_package = item.package
target_suite = self.suite_info.target_suite
binaries_t = target_suite.binaries

@@ -100,6 +100,7 @@ class MigrationManager(object):

# remove all binary packages (if the source already exists)
if item.architecture == 'source' or not item.is_removal:
source_name = item_package
if source_name in target_suite.sources:
rms, smoothbins = self._compute_removals(item, allow_smooth_updates, removals)
else:
@@ -109,9 +110,9 @@ class MigrationManager(object):
# single binary removal; used for clearing up after smooth
# updates but not supported as a manual hint
else:
assert source_name in binaries_t[item.architecture]
pkg_id = binaries_t[item.architecture][source_name].pkg_id
source_name = binaries_t[item.architecture][source_name].source
assert item_package in binaries_t[item.architecture]
pkg_id = binaries_t[item.architecture][item_package].pkg_id
source_name = binaries_t[item.architecture][item_package].source
rms = {pkg_id}
smoothbins = set()



Loading…
Cancel
Save