Hint to allow smooth update, even if the section isn't allowed in the
configuration.
Note that this takes the source name and the source version IN TESTING
of the binaries that must be allowed to stay around to allow a smooth
update.
The optimizations relies on assumptions that are not valid with the
allow-uninst that has not been corrected. When these assumptions, we
end up with invalid nuninst counters.
Signed-off-by: Niels Thykier <niels@thykier.net>
When an allow-uninst hint is added for an unversioned binary package, items
are allowed to migrate, even if they make that binary package uninstallable
(on the architecture specified in the hint, if one was specified, or on all
architectures otherwise).
Using this hint should avoid using force-hint to allow specific breakage.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
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>
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>
The recent code changes made use remove from the "binaries" field in
SourcePackages. Lists are not particularly optimized for this kind
of removal and we have a few source packages with a lot of binary
packages (e.g. libreoffice, gcc-X-cross{,-ports}) that might trip
poor performance.
Signed-off-by: Niels Thykier <niels@thykier.net>
When an item is migrated to the target suite, always create a new
SourcePackage object with a separate binaries list (independent from the list
in the source suite). That list is updated for every binary that is added,
updated or removed. This should ensure consistent source package information
in the target suite.
The undo code doesn't need to be updated for this, because the old
SourcePackage object is put back on undo, with the old binary list.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
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>
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>