In Debian, the same override is applied to both suites and they are
always consistent. It's not the case in Kali, we keep the value from
Debian when we import the package in britney's source distribution, but
if the same version is already present in the target distribution, it
keeps its original section (dating back to its initial import). In those
situations, the code will fail with an error like this one:
E: [2018-12-28T19:57:57+0000] - Mismatch found coinor-libdylp0 1.6.0-1.1 amd64 differs
I: [2018-12-28T19:57:57+0000] - ... section libs != science
[...]
ValueError: Inconsistent / Unsupported data set
Commit 7efa865a04 which was supposed to
move code around introduced the check on this field. Prior to this, the
section was not checked. Since the section only has an impact on which
packages take part to the smooth updates feature, the impact of such a
mismatch is negligible so I simply dropped that check.
This is useful to run tests with the data files from a specific point in time,
without changes due to ageing when the test runs later.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
Have the transaction code verify that there is at most one active
child at the time and no one is using the parent while child is
active. This is how the code is intended to be used and also the
code almost certainly does not work otherwise.
The new code does not cover commiting/rolling back a parent before a
child but that is already covered by the existing code (it will
trigger when child transaction is rolled back/committed or when
leaving the contextmanager from start_transaction).
This would have caught 7d758760d1
immediately with an assertion error.
Signed-off-by: Niels Thykier <niels@thykier.net>
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>
The should_upgrade_srcarch method only needs _compute_groups for the
purpose of computing smooth update candidates. In the concrete case,
it is rather simple to inline that part directly (and fold away
irrelevant code).
This also enables us to rewrite _compute_groups to accept an migration
item as all remaining callers simply unfold the migration item into
the arguments required by _compute_groups. This change will come in a
future commit.
Signed-off-by: Niels Thykier <niels@thykier.net>
This makes it more explicit that we are not using the value for
anything (and its name did not match it content due to a mistake
in 5d49a41204).
Signed-off-by: Niels Thykier <niels@thykier.net>
Attempt the removal of the old libraries from smooth updates during every hint
run. In some cases, the removal needs to happen during the hint run for the
hint to succeed.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
The "skip" value was a hack to support keeping cruft out of testing
while not breaking the undo code. With new the undo code
(a05a249e04), britney can now handle
this cause without the "skip" value and it has therefore out-lived its
purpose.
Signed-off-by: Niels Thykier <niels@thykier.net>
When we try to compute_groups for a group which has a source or a binary with
a lower version than testing, throw an exception. In the cases where this can
happen, the exception is caught. In other cases, it is not and it serves as an
assert.
This can only happen when there are multiple candidates (from multiple suites)
changing the same source or binary.
This should fix the ordering issues tested in these tests:
- tpu-unstable-binnmu
- binnmu-tpu
- tpu-with-unstable-binnmu
With this change, it should be possible to accept binNMUs from *pu again.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
The issue with an implicit rollback is that the caller has no idea
whether it should invoke rollback or not if an exception occurs.
Signed-off-by: Niels Thykier <niels@thykier.net>
This isolates the undo handling in the new transaction object and in
doop_source, which currently generates the undo items. This commit
will be a stepping stone to rewriting the undo handling.
Signed-off-by: Niels Thykier <niels@thykier.net>
When calculating smooth updateable binaries, filter out cruft binaries from
unstable, because they will not be part of the set of packages that britney
will try to migrate to testing.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
Support for binNMUs from *pu is currently broken, so disable it for now.
see https://bugs.debian.org/916209 for more info.
Signed-off-by: Ivo De Decker <ivodd@debian.org>
The parsing of migration items should also look for the suite name in the
architecture part. This fixes the parsing for migration items like
some-src/amd64_tpu and some-src/amd64_tpu/1.0-1
Signed-off-by: Ivo De Decker <ivodd@debian.org>