summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2021-03-06 14:12:01 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2021-04-25 16:25:57 +0200
commitf90b892e6acc0ca725811ef0dd9be3fed66c444f (patch)
treec018dde822d51d8d624216eecf0c08d122be7850 /test
parent408f4e0d32d11d3f7b7ec0e27fe8cf73cad23a6c (diff)
Count uninstallable packages in "not upgraded"
If a first step of the solver can figure out that a package is uninstallable it might reset the candidate so that later steps are prevented from exploring this dead end. While that helps the resolver it can confuse the display of the found solution as this will include an incorrect count of packages not upgraded in this solution. It was possible before, but happens a fair bit more with the April/May resolver changes last year so finally doing proper counting is a good idea. Sadly this is a bit harder than just getting the number first and than subtracting the packages we upgraded from it as the user can influence candidates via the command line and a package which could be upgraded, but is removed instead shouldn't count as not upgraded as we clearly did something with it. So we keep a list of packages instead of a number which also help in the upgrade cmds as those want to show the list. Closes: #981535
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-explore-or-groups-in-markinstall19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/integration/test-explore-or-groups-in-markinstall b/test/integration/test-explore-or-groups-in-markinstall
index ba3376cf6..b88105b6b 100755
--- a/test/integration/test-explore-or-groups-in-markinstall
+++ b/test/integration/test-explore-or-groups-in-markinstall
@@ -70,7 +70,6 @@ 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:
@@ -79,7 +78,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 $NOT not upgraded." apt install foo-${1}-upgrade-level${level} -s
+1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded." apt install foo-${1}-upgrade-level${level} -s
done
testsuccessheadequal 7 "Reading package lists...
@@ -93,6 +92,22 @@ The following NEW packages will be installed:
checkfoos 'd' 'Depends'
checkfoos 'r' 'Recommends'
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Calculating upgrade...
+The following NEW packages will be installed:
+ foo-d-upgrade-level2 (1)
+The following packages have been kept back:
+ bad-upgrade-level0 (1 => 2)
+ bad-upgrade-level1 (1 => 2)
+The following packages will be upgraded:
+ upgrade (1 => 2)
+1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
+Inst upgrade [1] (2 unstable [all])
+Inst foo-d-upgrade-level2 (1 unstable [all])
+Conf upgrade (2 unstable [all])
+Conf foo-d-upgrade-level2 (1 unstable [all])' apt full-upgrade foo-d-upgrade-level2 -sV
+
TEST_WITH_APTITUDE=false
msgtest 'Check if aptitude is available for additional tests'
if dpkg-checkbuilddeps -d 'aptitude' /dev/null >/dev/null 2>&1; then