From c8259fcde18ad9e08fffb04bf06ed64b87b1ac6a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Apr 2014 09:04:15 +0200 Subject: fix apt list output for pkgs in dpkg ^rc state Packages in the "deinstall ok config-file" have no candidate or instaleld version. So they must be special cased in the apt list generation. --- test/integration/test-apt-cli-list | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index 47cfb624a..6fc4bc7f6 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -51,3 +51,8 @@ bar/now 1.0 i386 [installed,local] an autogenerated dummy bar=1.0/installed " apt list bar --verbose +# test for dpkg ^rc state +insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files' +testequal "Listing... +conf-only/now 1.0 i386 [residual-config]" apt list conf-only + -- cgit v1.2.3 From d6570f8577a955a6950ef9fe1ee9def401759336 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 9 Apr 2014 16:23:14 +0200 Subject: Notice the user about "apt list -a" when only a single hit if found If the user is using "apt list pattern" and there is only a single hit, notice about "--all-versions" as this is what the user may be interessted in --- test/integration/test-apt-cli-list | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index 47cfb624a..b738bcc66 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -19,12 +19,17 @@ insertinstalledpackage 'bar' 'i386' '1.0' insertinstalledpackage 'foobar' 'i386' '1.0' insertpackage 'unstable' 'foobar' 'i386' '2.0' +insertinstalledpackage 'baz' 'all' '0.1' +insertpackage 'testing' 'baz' 'all' '1.0' +insertpackage 'unstable' 'baz' 'all' '2.0' + setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) testequal "Listing... bar/now 1.0 i386 [installed,local] +baz/unstable 2.0 all [upgradable from: 0.1] foo/unstable 1.0 all foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list @@ -33,12 +38,14 @@ foo/unstable 1.0 all foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*" testequal "Listing... +baz/unstable 2.0 all [upgradable from: 0.1] foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable # FIXME: hm, hm - does it make sense to have this different? shouldn't # we use "installed,upgradable" consitently? testequal "Listing... bar/now 1.0 i386 [installed,local] +baz/now 0.1 all [installed,upgradable to: 2.0] foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed testequal "Listing... @@ -51,3 +58,8 @@ bar/now 1.0 i386 [installed,local] an autogenerated dummy bar=1.0/installed " apt list bar --verbose +# ensure that the users learns about multiple versions too +testequal "Listing... +baz/unstable 2.0 all [upgradable from: 0.1] +N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0 + -- cgit v1.2.3 From 291a386f1e65c40a1acb01a9a5614ad00efc509d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 10 Apr 2014 13:53:28 +0200 Subject: fix test-failure in adt --- test/integration/framework | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 8d8a0becc..3b900a960 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -190,7 +190,13 @@ setupenvironment() { touch var/lib/dpkg/available mkdir -p usr/lib/apt ln -s ${METHODSDIR} usr/lib/apt/methods - ln -s ${BUILDDIRECTORY}/../../debian/apt.conf.autoremove etc/apt/apt.conf.d/01autoremove + # use the autoremove from the BUILDDIRECTORY if its there, otherwise + # system + if [ -e ${BUILDDIRECTORY}/../../debian/apt.conf.autoremove ]; then + ln -s ${BUILDDIRECTORY}/../../debian/apt.conf.autoremove etc/apt/apt.conf.d/01autoremove + else + ln -s /etc/apt/apt.conf.d/01autoremove etc/apt/apt.conf.d/01autoremove + fi cd .. local PACKAGESFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Packages-/' -e 's/^skip-/Packages-/') if [ -f "${TESTDIRECTORY}/${PACKAGESFILE}" ]; then -- cgit v1.2.3 From 4cd4a2e7033a2af214be1d830b56fab719088b7a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Apr 2014 13:33:31 +0200 Subject: consider priorities only for downloadable pkgs in resolver A package which can't be downloaded anymore is very likely dropped from a release and can therefore no longer be 'standard' (or similar). We therefore do not grant points for them anymore and demote them to prio:extra instead which helps other packages breaking them away even if they have a lower priority. The testcase was initially created by Michael Vogt and just amended. --- ...t-ubuntu-bug-1304403-obsolete-priority-standard | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard (limited to 'test/integration') diff --git a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard new file mode 100755 index 000000000..2f2d384e1 --- /dev/null +++ b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard @@ -0,0 +1,48 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'i386' + +# Regression test for LP: #1304403 +# +# The issue here is that libkadm5srv-mit8 (priority standard) is replaced +# by a new libkadm5srv-mit9 and libkbd5-7 breaks on the old -mit8 package. +# The -mit8 package is no longer downloadable (and hence not upgradeable) + +# normal upradable pkg +# (libkdb5-7 that breaks on libkadm5srv-mit8 (<< 1.11+dfsg~) +insertinstalledpackage 'upgradable' 'all' '1.0' '' 'extra' +insertpackage 'unstable' 'upgradable' 'all' '2.0' 'Breaks: not-downloadable (<< 1.1)' 'optional' + +# no longer downloadable pkg (libkadm5srv-mit8, replaced by libkadm5srv-mit9) +# but priority standard pushes it higher +insertinstalledpackage 'not-downloadable' 'all' '1.0' '' 'standard' + +setupaptarchive + +# discourage keeping obsolete high-priority packages … +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + not-downloadable +The following packages will be upgraded: + upgradable +1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv not-downloadable [1.0] +Inst upgradable [1.0] (2.0 unstable [all]) +Conf upgradable (2.0 unstable [all])' aptget -s dist-upgrade + +# … but if it has dependencies we want to keep it as usual +for i in $(seq 1 10); do +insertinstalledpackage "depender$i" 'all' '1.0' 'Depends: not-downloadable' +done + +testequal 'Reading package lists... +Building dependency tree... +The following packages have been kept back: + upgradable +0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.' aptget -s dist-upgrade -- cgit v1.2.3