diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-05-22 18:56:40 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-05-23 17:58:42 +0200 |
commit | 04a020d7a217d6b5af86c048c2974760053b8079 (patch) | |
tree | dd07954a2327cb2c00a19292ccd1562e18c18205 /test/integration/test-explore-or-groups-in-markinstall | |
parent | 9d0a37e9cf644f99666b60e5a1ca5131fd0c6519 (diff) |
Reset candidate version explicitly for internal state-keeping
For a (partially) installed package like the one MarkInstall operates on
at the moment we want to discard the candidate from, we have to first
remove the package from the internal state keeping to have proper broken
counts and such and only then reset the candidate version which is a
trivial operation in comparison.
Take a look at the testcase: Now, what is the problem? Correct,
git:i386. Didn't see that coming, right? It is M-A:foreign so apt tries
to switch the architecture of git here (which is pointless, it knows
that this won't work, but lets fix that in another commit) will
eventually realize that it can't install it and wants to discard the
candidate of git:i386 first removing the broken indication like it
should, removing the install flag and then reapplies the broken
indication: Expect it doesn't as it wants to do that over the candidate
version which the package no longer had so seemingly nothing is broken.
It is a bit of a hairball to figure out which commit it is exactly that
is wrong here as they are all influencing each other a bit, but >= 2.1
is an acceptable ballpark. Bisect says 57df273 but that is mostly a lie.
Closes: #961266
Diffstat (limited to 'test/integration/test-explore-or-groups-in-markinstall')
-rwxr-xr-x | test/integration/test-explore-or-groups-in-markinstall | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/integration/test-explore-or-groups-in-markinstall b/test/integration/test-explore-or-groups-in-markinstall index e24145fd8..ba3376cf6 100755 --- a/test/integration/test-explore-or-groups-in-markinstall +++ b/test/integration/test-explore-or-groups-in-markinstall @@ -70,6 +70,7 @@ The following additional packages will be installed: The following NEW packages will be installed: foo-${1}-level${level} okay 0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded." apt install foo-${1}-level${level} -s + if [ "$level" = '0' ]; then NOT=2; else NOT=1; fi testsuccessheadequal 9 "Reading package lists... Building dependency tree... The following additional packages will be installed: @@ -78,7 +79,7 @@ The following NEW packages will be installed: foo-${1}-upgrade-level${level} The following packages will be upgraded: upgrade -1 upgraded, 1 newly installed, 0 to remove and $((2-${level})) not upgraded." apt install foo-${1}-upgrade-level${level} -s +1 upgraded, 1 newly installed, 0 to remove and $NOT not upgraded." apt install foo-${1}-upgrade-level${level} -s done testsuccessheadequal 7 "Reading package lists... @@ -137,7 +138,7 @@ if $TEST_WITH_APTITUDE; then testsuccesstailequal 6 'The following packages have been kept back: bad-upgrade-level1 No packages will be installed, upgraded, or removed. -0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded. +0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Would download/install/remove packages.' aptitude install bad-upgrade-level1 -sy # aptitude does not show the kept back message in this caseā¦ |