Ivo De Decker
69c94caa01
Add source_name return value to compute_groups
...
When the item is a single binary cruft removal, the source name is different
from the package. compute_groups has this info anyway, so just pass it on as a
returm value.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
6 years ago
Niels Thykier
179faeb23b
Update some comments to match a renamed method
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
7d758760d1
MigrationManager: _transaction is a stack; not a queue
...
Correct the return value of current_transaction that treated the
_transaction field incorrectly as a queue rather than a stack like
everything else. This completely broke the ability to commit and
rollback child transactions (correctly). Fortunately, it could only
trigger on a "hint"-hint.
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
a5352d353b
Simplify undo code handling sources
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
59ae7e3d68
Optimize out "nvirtual" member of undo items
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
5642a90449
Rename _compute_groups to compute_groups
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
33ba41c76e
Split out a _compute_removals from _compute_groups
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
d3b391aed1
MigrationManager: Precompute a set of all architectures
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
89fcccba13
MigrationManager: Create a is_nuninst_worse
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
aa6dd4a0f3
Extract a compute eqv_set function
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
a95565c0e8
Split migrate_item_to_target_suite into two
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
57ded55674
Remove dead assignment
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
c7dbd95c0b
Have MigrationManager keep track of active transaction
...
This leaves callers with only having to track the transaction they
need to care about (if any).
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
4803065e1a
Move (and rename) try_migration to the MigrationManager
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
28c7a052fa
Move to MM and rename doop_source to apply_item_to_target_suite
...
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago
Niels Thykier
4ae6a34a27
Move _compute_groups to a new MigrationManager class
...
Other migration methods are expected to follow in future commits.
Signed-off-by: Niels Thykier <niels@thykier.net>
6 years ago