From d3930f8716f439c229cd3d11813823d847a2ecff Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 3 Jul 2016 13:57:25 +0200 Subject: pass --force-remove-essential to dpkg only if needed APT (usually) knows which package is essential or not, so we can avoid passing this force flag to dpkg unconditionally if the user hasn't chosen a non-default essential handling obscuring the information. --- test/integration/test-essential-force-loopbreak | 3 +++ test/integration/test-ubuntu-bug-761175-remove-purge | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'test') diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak index 6f7d99cb6..f585e9c42 100755 --- a/test/integration/test-essential-force-loopbreak +++ b/test/integration/test-essential-force-loopbreak @@ -43,6 +43,9 @@ E: Internal Error, Could not early remove sysvinit:$(dpkg --print-architecture) # with enough force however … cp -a dpkg.status.backup rootdir/var/lib/dpkg/status + testsuccess aptget install systemd-sysv -y -t "$1" -o APT::Force-LoopBreak=1 -o Debug::pkgDpkgPm=1 + cp rootdir/tmp/testsuccess.output apt.output + testsuccess grep -- '--force-remove-essential --remove sysvinit' apt.output testsuccess aptget install systemd-sysv -y -t "$1" -o APT::Force-LoopBreak=1 testdpkginstalled 'sysvinit' 'systemd-sysv' } diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge index aae394ad8..6ae1a04e8 100755 --- a/test/integration/test-ubuntu-bug-761175-remove-purge +++ b/test/integration/test-ubuntu-bug-761175-remove-purge @@ -30,6 +30,8 @@ runtests() { testsuccess aptget install compiz-core-${PKG} -t "${RELEASE}" "$@" testdpkginstalled compiz-core-${PKG} + testsuccess aptget remove compiz-core-${PKG} -y "$@" -o Debug::pkgDpkgPm=1 + testfailure grep -- '--force-remove-essential' rootdir/tmp/testsuccess.output testsuccess aptget remove compiz-core-${PKG} -y "$@" testdpkgnotinstalled compiz-core-${PKG} testdpkgstatus 'rc' '1' "compiz-core-${PKG}" @@ -61,6 +63,8 @@ The following packages will be REMOVED: 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Purg compiz-core-${PKG}" aptget purge compiz-core-${PKG} -s "$@" fi + testsuccess aptget purge compiz-core-${PKG} -y "$@" -o Debug::pkgDpkgPm=1 + testfailure grep -- '--force-remove-essential' rootdir/tmp/testsuccess.output testsuccess aptget purge compiz-core-${PKG} -y "$@" echo -n '' > rootdir/var/lib/dpkg/available # dpkg -l < 1.16.2 reads the available file by default, where the package can be found testequalor2 "dpkg-query: no packages found matching compiz-core-${PKG}" "No packages found matching compiz-core-${PKG}." dpkg -l compiz-core-${PKG} -- cgit v1.2.3 From f495992428a396e0f98886c9a761a804aa161c68 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 9 Jun 2016 11:48:16 +0200 Subject: use dpkg --unpack --recursive to avoid long cmdlines Having long commandlines split into two is a huge problem if it happens and additionally if we want to introduce planners which perform less micromanagment its a good idea to leave the details for dpkg to decide. In practice this doesn't work yet unconditionally as a bug is hiding in the ordering code of dpkg, but it works if apt imposes its ordering so this commit allows for now at least to solve the first problem. --- test/integration/test-apt-progress-fd-error | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/test-apt-progress-fd-error b/test/integration/test-apt-progress-fd-error index e66210304..4439c042a 100755 --- a/test/integration/test-apt-progress-fd-error +++ b/test/integration/test-apt-progress-fd-error @@ -19,7 +19,7 @@ setupaptarchive exec 3> apt-progress.log testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3 msgtest 'Ensure correct error message' -testsuccess --nomsg grep "aptarchive/pool/foo2_0.8.15_[^.]\+.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log +testsuccess --nomsg grep "foo2_0.8.15_[^.]\+.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log testsuccess test -s rootdir/var/crash/foo2.0.crash testsuccess grep '^Package: foo2 0.8.15$' rootdir/var/crash/foo2.0.crash -- cgit v1.2.3 From b820fd59c4fe6e3581901eee648e88209be56137 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 3 Jul 2016 14:39:16 +0200 Subject: save and restore selection states before/after calling dpkg dpkg decides certain things on its own based on selections and especially if we want to call --pending on purge/remove actions, we need to ensure a clean slate or otherwise we surprise the user by removing packages we weren't allowed to remove by the user in this run (the selection might be an overarching plan for the not-yet "future"). Ideally dpkg would have some kind of temporal selection interface for this case, but it hasn't, so we make it temporal with the risk of loosing state if we don't manage to restore them. --- test/integration/test-apt-get-autoremove | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove index 17dba9aec..cfee748af 100755 --- a/test/integration/test-apt-get-autoremove +++ b/test/integration/test-apt-get-autoremove @@ -18,6 +18,8 @@ testmarkedauto 'po-debconf' testsuccess aptget remove debhelper -y testdpkgnotinstalled 'debhelper' testdpkginstalled 'po-debconf' 'unrelated' +echo 'unrelated purge' | dpkg --set-selections +testdpkgstatus 'pi' '1' 'unrelated' AUTOREMOVE='apt autoremove' if [ -n "$SUDO_USER" ]; then @@ -49,14 +51,17 @@ testdpkginstalled 'po-debconf' echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove testsuccess aptget autoremove -y testdpkginstalled 'po-debconf' +testdpkgstatus 'pi' '1' 'unrelated' echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove testsuccess aptget autoremove -y testdpkginstalled "po-debconf" +testdpkgstatus 'pi' '1' 'unrelated' rm rootdir/etc/apt/apt.conf.d/00autoremove testsuccess aptget autoremove -y testdpkgnotinstalled 'po-debconf' +testdpkgstatus 'pi' '1' 'unrelated' testmarkedauto sed rootdir/var/log/apt/history.log -e '/^Commandline: / d' \ @@ -71,7 +76,8 @@ Remove: debhelper:i386 (8.0.0) Remove: po-debconf:i386 (1.0.16)' testsuccess aptget install debhelper -y -testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' +testdpkgstatus 'pi' '1' 'unrelated' +testdpkginstalled 'debhelper' 'po-debconf' testsuccess aptmark auto debhelper testmarkedauto 'debhelper' 'po-debconf' @@ -105,9 +111,11 @@ Reading state information... testsuccess aptget autoremove debhelper -y --allow-change-held-packages testdpkgnotinstalled 'po-debconf' 'debhelper' +testdpkgstatus 'pi' '1' 'unrelated' testmarkedauto testsuccess aptget install debhelper --solver apt -y -o Debug::pkgDepCache::Marker=1 testmarkedauto 'po-debconf' +testdpkgstatus 'pi' '1' 'unrelated' insertinstalledpackage 'bar' 'all' '1' 'Depends: foo-provider' insertinstalledpackage 'foo-multi1-1' 'all' '1' 'Provides: foo-provider -- cgit v1.2.3 From e7d4e0cf4f6d79810e4b4e7de505729e759213dd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 8 Jul 2016 09:40:46 +0200 Subject: select remove/purge packages early on for dpkg Telling dpkg early on that we are going to remove these packages later helps it with auto-deconfiguration decisions and its another area where a planner can ignore the nitty gritty details and let dpkg decide the course of action if there are no special requirements. --- test/integration/test-bug-673536-pre-depends-breaks-loop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop index bf3d2e2eb..a4cf66973 100755 --- a/test/integration/test-bug-673536-pre-depends-breaks-loop +++ b/test/integration/test-bug-673536-pre-depends-breaks-loop @@ -11,7 +11,7 @@ buildsimplenativepackage 'advanced' 'native' '2' 'unstable' 'Pre-Depends: basic' buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common' buildsimplenativepackage 'common' 'native' '2~conflict' 'unstable-conflict' 'Conflicts: advanced (<= 1)' -buildsimplenativepackage 'common' 'native' '2~break' 'unstable-break' 'Conflicts: advanced (<= 1)' +buildsimplenativepackage 'common' 'native' '2~break' 'unstable-break' 'Breaks: advanced (<= 1)' setupaptarchive -- cgit v1.2.3 From 7ec343309b7bc6001b465c870609b3c570026149 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 21 Jul 2016 18:46:34 +0200 Subject: don't purge directly, but remove and do purge at the end If we want a package to be purged from the system tell dpkg in the ordering (if it has to touch it explicitly) to remove it and cover the purging of the config files at the end with a --purge --pending call. That should help packages move conffiles around between packages correctly even if the user is purging packages directly in big actions like dist-upgrades involving many packages. --- test/integration/test-no-fds-leaked-to-maintainer-scripts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index 56cbff095..a9c198580 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -34,7 +34,7 @@ rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log testsuccess aptget install -y fdleaks -qq < /dev/null checkfdleak() { - msgtest 'Check if fds were not' 'leaked' + msgtest 'Check if fds were not' "leaked: expect $1" if [ "$(grep 'root root' rootdir/tmp/testsuccess.output | wc -l)" = "$1" ]; then msgpass else @@ -73,7 +73,6 @@ checkpurge() { testfileequal 'terminal.log' "$(cat terminal.output)" testequal "startup packages purge -status installed $PKGNAME 1.0 remove $PKGNAME 1.0 status half-configured $PKGNAME 1.0 status half-installed $PKGNAME 1.0 @@ -86,6 +85,7 @@ status config-files $PKGNAME 1.0 status config-files $PKGNAME 1.0 status not-installed $PKGNAME startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log + testequalor2 "dpkg-query: no packages found matching ${PKGNAME}" "No packages found matching ${PKGNAME}." dpkg -l "$PKGNAME" } checkpurge -- cgit v1.2.3 From 83e5cffc2015aa809acac84737756d292d7bf106 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 25 Jul 2016 16:36:53 +0200 Subject: try to avoid removal of crossgraded packages The user has to approve the removal of a crossgraded package as it might be needed to remove it (temporarily) in the process, but in most cases we can happily avoid it and let dpkg unpack over it skipping the remove. This has some effects on progress reporting and how deal with selections through which makes this a tiny bit complicated. --- test/integration/test-crossgrades | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 test/integration/test-crossgrades (limited to 'test') diff --git a/test/integration/test-crossgrades b/test/integration/test-crossgrades new file mode 100755 index 000000000..d412546c1 --- /dev/null +++ b/test/integration/test-crossgrades @@ -0,0 +1,49 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'i386' 'amd64' 'armel' +configdpkgnoopchroot + +buildsimplenativepackage 'unrelated' 'amd64' '1' 'stable' +buildsimplenativepackage 'crosser' 'i386,armel' '1' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'crosser' 'amd64' '2' 'unstable' +setupaptarchive + +singleinstance() { + testsuccess apt install crosser:i386=1 unrelated:amd64 -y --planner $1 + testdpkginstalled 'crosser:i386' 'unrelated' + + testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 + cp -a rootdir/tmp/testsuccess.output crosser.output + testfailure grep -- '--remove.*crosser.*' crosser.output + testfailure grep -- '--purge' crosser.output + testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1 + testdpkgnotinstalled 'crosser:i386' 'unrelated' + testdpkginstalled 'crosser:amd64' + + testsuccess apt purge crosser:amd64 -y --planner $1 + testdpkgnotinstalled 'crosser:amd64' +} +singleinstance 'internal' +singleinstance 'apt' + +multiinstance() { + testsuccess apt install crosser:i386=1 crosser:armel=1 unrelated:amd64 -y --planner $1 + testdpkginstalled 'crosser:i386' 'crosser:armel' 'unrelated' + + testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 + cp -a rootdir/tmp/testsuccess.output crosser.output + testsuccess grep -- '--remove.*crosser.*' crosser.output + testsuccess grep -- '--purge' crosser.output + testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1 + testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'unrelated' + testdpkginstalled 'crosser:amd64' + + testsuccess apt purge crosser:amd64 -y --planner $1 + testdpkgnotinstalled 'crosser:amd64' +} +multiinstance 'internal' -- cgit v1.2.3 From 28557f94578602f9ce0011501a2259bd98ab0688 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 28 Jul 2016 09:13:24 +0200 Subject: disable explicit configuration of all packages at the end With b4450f1dd6bca537e60406b2383ab154a3e1485f we dropped what we calculated here later on and now that we don't need it in the meantime either we can just skip the busy work by default and expect dpkg to do the right thing dropping also our little "last explicit configures" removal trick introduced in b4450f1dd6bca537e60406b2383ab154a3e1485f. This enables the last of a bunch of previously experimental options, some of them existing still, but are very special and hence not really worth documenting anymore (especially as it would need to be rewritten now entirely) which is why the documentation is nearly completely dropped. The order of configuration stanzas in the simulation code changes slightly as it isn't concerning itself with finding the 'right' order, but any order is valid anyhow as long as the entire set happens in the same call. --- .../test-allow-scores-for-all-dependency-types | 8 +- ...bug-712116-dpkg-pre-install-pkgs-hook-multiarch | 86 +++++++++++++--------- .../test-bug-735967-lib32-to-i386-unavailable | 6 +- .../test-bug-740843-versioned-up-down-breaks | 16 ++-- .../test-bug-lp1562402-nomark-removals-as-keep | 4 +- test/integration/test-bug-multiarch-upgrade | 4 +- test/integration/test-dpkg-assert-multi-arch | 2 +- .../test-external-installation-planner-protocol | 7 +- .../test-ignore-provides-if-versioned-breaks | 2 +- .../test-ignore-provides-if-versioned-conflicts | 2 +- .../test-no-fds-leaked-to-maintainer-scripts | 6 +- ...prevent-markinstall-multiarch-same-versionscrew | 8 +- ...ight-loop-configure-with-unpacking-new-packages | 16 ++-- 13 files changed, 92 insertions(+), 75 deletions(-) (limited to 'test') diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types index 1a08f2ed2..9b300b7a7 100755 --- a/test/integration/test-allow-scores-for-all-dependency-types +++ b/test/integration/test-allow-scores-for-all-dependency-types @@ -55,8 +55,8 @@ The following packages will be upgraded: Remv libdb5.1-dev [5.1.29-7] [libdb-dev:amd64 ] Inst libdb-dev [5.1.7] (5.3.0 unversioned [amd64]) [] Inst libdb5.3-dev (5.3.28-3 unversioned [amd64]) -Conf libdb5.3-dev (5.3.28-3 unversioned [amd64]) -Conf libdb-dev (5.3.0 unversioned [amd64])' aptget dist-upgrade -st unversioned +Conf libdb-dev (5.3.0 unversioned [amd64]) +Conf libdb5.3-dev (5.3.28-3 unversioned [amd64])' aptget dist-upgrade -st unversioned testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... @@ -70,8 +70,8 @@ The following packages will be upgraded: Remv libdb5.1-dev [5.1.29-7] [libdb-dev:amd64 ] Inst libdb-dev [5.1.7] (5.3.0 versioned [amd64]) [] Inst libdb5.3-dev (5.3.28-3 versioned [amd64]) -Conf libdb5.3-dev (5.3.28-3 versioned [amd64]) -Conf libdb-dev (5.3.0 versioned [amd64])' aptget dist-upgrade -st versioned +Conf libdb-dev (5.3.0 versioned [amd64]) +Conf libdb5.3-dev (5.3.28-3 versioned [amd64])' aptget dist-upgrade -st versioned cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status insertinstalledpackage 'foo' 'amd64' '1' diff --git a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch index a15ac06ed..d9fd3d30d 100755 --- a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch +++ b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch @@ -48,33 +48,42 @@ DPkg::Tools::options::\"./${hook}-v${1}.sh\"::Version \"$1\";" > rootdir/etc/apt observehook() { rm -f ${hook}-v2.list ${hook}-v3.list msgtest 'Observe hooks while' "$*" - testsuccess --nomsg aptget "$@" -y --allow-downgrades + testsuccess --nomsg aptget "$@" -y --allow-downgrades --planner $planner + # different planners have different orders – we don't care in this test here + if [ -e ${hook}-v2.list ]; then + sort < ${hook}-v2.list > ${hook}-v2.list.new + mv ${hook}-v2.list.new ${hook}-v2.list + fi + if [ -e ${hook}-v3.list ]; then + sort < ${hook}-v3.list > ${hook}-v3.list.new + mv ${hook}-v3.list.new ${hook}-v3.list + fi } testrun() { observehook install stuff -t stable testfileequal "${hook}-v2.list" 'libsame - < 1 **CONFIGURE** -toolkit - < 1 **CONFIGURE** -stuff - < 1 **CONFIGURE**' +stuff - < 1 **CONFIGURE** +toolkit - < 1 **CONFIGURE**' testfileequal "${hook}-v3.list" 'libsame - - none < 1 amd64 same **CONFIGURE** -toolkit - - none < 1 all foreign **CONFIGURE** -stuff - - none < 1 amd64 none **CONFIGURE**' +stuff - - none < 1 amd64 none **CONFIGURE** +toolkit - - none < 1 all foreign **CONFIGURE**' observehook install stuff -t unstable testfileequal "${hook}-v2.list" 'libsame 1 < 2 **CONFIGURE** -toolkit 1 < 2 **CONFIGURE** -stuff 1 < 2 **CONFIGURE**' +stuff 1 < 2 **CONFIGURE** +toolkit 1 < 2 **CONFIGURE**' testfileequal "${hook}-v3.list" 'libsame 1 amd64 same < 2 amd64 same **CONFIGURE** -toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE** -stuff 1 amd64 none < 2 amd64 none **CONFIGURE**' +stuff 1 amd64 none < 2 amd64 none **CONFIGURE** +toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE**' observehook install stuff:i386 -t unstable - testfileequal "${hook}-v2.list" 'stuff 2 > - **REMOVE** -libsame - < 2 **CONFIGURE** -stuff - < 2 **CONFIGURE**' - testfileequal "${hook}-v3.list" 'stuff 2 amd64 none > - - none **REMOVE** -libsame - - none < 2 i386 same **CONFIGURE** -stuff - - none < 2 i386 none **CONFIGURE**' + testfileequal "${hook}-v2.list" 'libsame - < 2 **CONFIGURE** +stuff - < 2 **CONFIGURE** +stuff 2 > - **REMOVE**' + testfileequal "${hook}-v3.list" 'libsame - - none < 2 i386 same **CONFIGURE** +stuff - - none < 2 i386 none **CONFIGURE** +stuff 2 amd64 none > - - none **REMOVE**' observehook remove libsame testfileequal "${hook}-v2.list" 'libsame 2 > - **REMOVE**' @@ -82,30 +91,30 @@ stuff - - none < 2 i386 none **CONFIGURE**' observehook install stuff:i386/stable libsame:i386/stable toolkit/stable testfileequal "${hook}-v2.list" 'libsame 2 > 1 **CONFIGURE** -toolkit 2 > 1 **CONFIGURE** -stuff 2 > 1 **CONFIGURE**' +stuff 2 > 1 **CONFIGURE** +toolkit 2 > 1 **CONFIGURE**' testfileequal "${hook}-v3.list" 'libsame 2 i386 same > 1 i386 same **CONFIGURE** -toolkit 2 amd64 foreign > 1 all foreign **CONFIGURE** -stuff 2 i386 none > 1 i386 none **CONFIGURE**' +stuff 2 i386 none > 1 i386 none **CONFIGURE** +toolkit 2 amd64 foreign > 1 all foreign **CONFIGURE**' observehook install 'libsame:*' - testfileequal "${hook}-v2.list" 'libsame 1 < 2 **CONFIGURE** -libsame - < 2 **CONFIGURE** -toolkit 1 < 2 **CONFIGURE** -stuff 1 < 2 **CONFIGURE**' - testfileequal "${hook}-v3.list" 'libsame 1 i386 same < 2 i386 same **CONFIGURE** -libsame - - none < 2 amd64 same **CONFIGURE** -toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE** -stuff 1 i386 none < 2 i386 none **CONFIGURE**' + testfileequal "${hook}-v2.list" 'libsame - < 2 **CONFIGURE** +libsame 1 < 2 **CONFIGURE** +stuff 1 < 2 **CONFIGURE** +toolkit 1 < 2 **CONFIGURE**' + testfileequal "${hook}-v3.list" 'libsame - - none < 2 amd64 same **CONFIGURE** +libsame 1 i386 same < 2 i386 same **CONFIGURE** +stuff 1 i386 none < 2 i386 none **CONFIGURE** +toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE**' observehook purge stuff:i386 'libsame:*' toolkit testfileequal "${hook}-v2.list" 'libsame 2 > - **REMOVE** -stuff 2 > - **REMOVE** libsame 2 > - **REMOVE** +stuff 2 > - **REMOVE** toolkit 2 > - **REMOVE**' testfileequal "${hook}-v3.list" 'libsame 2 amd64 same > - - none **REMOVE** -stuff 2 i386 none > - - none **REMOVE** libsame 2 i386 same > - - none **REMOVE** +stuff 2 i386 none > - - none **REMOVE** toolkit 2 amd64 foreign > - - none **REMOVE**' observehook install confpkg @@ -127,10 +136,17 @@ toolkit 2 amd64 foreign > - - none **REMOVE**' dpkg -l confpkg 2>/dev/null | grep -q '^rc' && msgfail || msgpass } -enablehookversion 2 -enablehookversion 3 -testrun +runwithplanner() +{ + msgmsg 'Running with planner' "$1" + planner="$1" + enablehookversion 2 + enablehookversion 3 + testrun + + enablehookversion 2 13 + enablehookversion 3 13 + testrun +} -enablehookversion 2 13 -enablehookversion 3 13 -testrun +runwithplanner 'apt' diff --git a/test/integration/test-bug-735967-lib32-to-i386-unavailable b/test/integration/test-bug-735967-lib32-to-i386-unavailable index 290df8a3f..3b705d5f9 100755 --- a/test/integration/test-bug-735967-lib32-to-i386-unavailable +++ b/test/integration/test-bug-735967-lib32-to-i386-unavailable @@ -71,10 +71,10 @@ Inst lib32nss-mdns [0.9-1] (0.10-6 unstable [amd64]) [] Inst libnss-mdns [0.9-1] (0.10-6 unstable [amd64]) [] Inst libnss-mdns:i386 (0.10-6 unstable [i386]) [] Inst libnss-mdns-i386:i386 (0.10-6 unstable [i386]) -Conf libnss-mdns:i386 (0.10-6 unstable [i386]) +Conf lib32nss-mdns (0.10-6 unstable [amd64]) Conf libnss-mdns (0.10-6 unstable [amd64]) -Conf libnss-mdns-i386:i386 (0.10-6 unstable [i386]) -Conf lib32nss-mdns (0.10-6 unstable [amd64])' aptget dist-upgrade -s +Conf libnss-mdns:i386 (0.10-6 unstable [i386]) +Conf libnss-mdns-i386:i386 (0.10-6 unstable [i386])' aptget dist-upgrade -s testsuccessequal 'Reading package lists... Building dependency tree... diff --git a/test/integration/test-bug-740843-versioned-up-down-breaks b/test/integration/test-bug-740843-versioned-up-down-breaks index 143175cca..69adceffd 100755 --- a/test/integration/test-bug-740843-versioned-up-down-breaks +++ b/test/integration/test-bug-740843-versioned-up-down-breaks @@ -33,11 +33,11 @@ Inst libgl1-foo-glx:i386 [1] (2 stable [i386]) [foo-driver:amd64 on libgl1-foo-g Inst foo-driver [1] (2 stable [amd64]) [] Inst libfoo:i386 [1] (2 stable [i386]) [libfoo:amd64 on libfoo:i386] [libfoo:i386 on libfoo:amd64] [libfoo:amd64 ] Inst libfoo [1] (2 stable [amd64]) -Conf libfoo:i386 (2 stable [i386]) -Conf libfoo (2 stable [amd64]) -Conf libgl1-foo-glx:i386 (2 stable [i386]) Conf libgl1-foo-glx (2 stable [amd64]) -Conf foo-driver (2 stable [amd64])' 'Reading package lists... +Conf libgl1-foo-glx:i386 (2 stable [i386]) +Conf foo-driver (2 stable [amd64]) +Conf libfoo:i386 (2 stable [i386]) +Conf libfoo (2 stable [amd64])' 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: @@ -48,10 +48,10 @@ Inst libgl1-foo-glx:i386 [1] (2 stable [i386]) [foo-driver:amd64 on libgl1-foo-g Inst foo-driver [1] (2 stable [amd64]) [] Inst libfoo:i386 [1] (2 stable [i386]) [libfoo:amd64 on libfoo:i386] [libfoo:i386 on libfoo:amd64] [libfoo:amd64 ] Inst libfoo [1] (2 stable [amd64]) -Conf libfoo:i386 (2 stable [i386]) -Conf libfoo (2 stable [amd64]) -Conf libgl1-foo-glx:i386 (2 stable [i386]) Conf libgl1-foo-glx (2 stable [amd64]) -Conf foo-driver (2 stable [amd64])' aptget dist-upgrade -s +Conf libgl1-foo-glx:i386 (2 stable [i386]) +Conf foo-driver (2 stable [amd64]) +Conf libfoo:i386 (2 stable [i386]) +Conf libfoo (2 stable [amd64])' aptget dist-upgrade -s testsuccess aptget dist-upgrade -y -o Debug::pkgPackageManager=1 -o Debug::pkgOrderList=1 diff --git a/test/integration/test-bug-lp1562402-nomark-removals-as-keep b/test/integration/test-bug-lp1562402-nomark-removals-as-keep index 05f43701d..6e8225aa4 100755 --- a/test/integration/test-bug-lp1562402-nomark-removals-as-keep +++ b/test/integration/test-bug-lp1562402-nomark-removals-as-keep @@ -33,7 +33,7 @@ Inst maas-region-controller [2.0.0~alpha3+bzr4810-0ubuntu1] (2.0.0~alpha4+bzr484 Remv maas-region-controller-min [2.0.0~alpha3+bzr4810-0ubuntu1] [] Inst maas-common [2.0.0~alpha3+bzr4810-0ubuntu1] (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [all]) [] Inst maas-region-api (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [amd64]) +Conf maas-region-controller (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [all]) Conf maas-common (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [all]) -Conf maas-region-api (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [amd64]) -Conf maas-region-controller (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [all])' \ +Conf maas-region-api (2.0.0~alpha4+bzr4843-0ubuntu1~xenial2 unstable [amd64])' \ aptget dist-upgrade -s diff --git a/test/integration/test-bug-multiarch-upgrade b/test/integration/test-bug-multiarch-upgrade index cb5159c05..38e70531e 100755 --- a/test/integration/test-bug-multiarch-upgrade +++ b/test/integration/test-bug-multiarch-upgrade @@ -25,5 +25,5 @@ The following packages will be upgraded: 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Inst libcups2 [1] (2 unstable [amd64]) [libcups2:amd64 on libcups2:i386] [libcups2:i386 on libcups2:amd64] [libcups2:i386 ] Inst libcups2:i386 [1] (2 unstable [i386]) -Conf libcups2:i386 (2 unstable [i386]) -Conf libcups2 (2 unstable [amd64])' aptget install -s libcups2:i386 +Conf libcups2 (2 unstable [amd64]) +Conf libcups2:i386 (2 unstable [i386])' aptget install -s libcups2:i386 diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch index 678038cf2..a99f320b3 100755 --- a/test/integration/test-dpkg-assert-multi-arch +++ b/test/integration/test-dpkg-assert-multi-arch @@ -17,7 +17,7 @@ setupaptarchive testqualifier() { msgtest 'Test with' $1 'for correct qualifier mode' $2 #aptget install $1 -qq -o Debug::pkgDPkgPM=1 || true - aptget install $1 -qq -o Debug::pkgDPkgPM=1 -o Dpkg::ExplicitLastConfigure=1 > testqualifier.output 2>&1 || true + aptget install $1 -qq -o Debug::pkgDPkgPM=1 -o Dpkg::ExplicitLastConfigure=1 -o PackageManager::Configure=all > testqualifier.output 2>&1 || true GIVEN="$(grep -v -- '--unpack' testqualifier.output | sed -ne 's/^.*--[rpc][^ ]* \([^ ]*\).*$/\1/p')" if [ "$GIVEN" = "$2" ]; then msgpass diff --git a/test/integration/test-external-installation-planner-protocol b/test/integration/test-external-installation-planner-protocol index bd3c99c32..8d80930bc 100755 --- a/test/integration/test-external-installation-planner-protocol +++ b/test/integration/test-external-installation-planner-protocol @@ -45,9 +45,7 @@ Planner: internal' head -n 6 "$EIPPLOG" aptinternalplanner < "$EIPPLOG" > planner.log || true testsuccessequal 'Remove: 6 Unpack: 2 -Unpack: 4 -Configure: 2 -Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log +Unpack: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log rm -f "$EIPPLOG" testsuccess aptget install foo -s --reinstall @@ -59,8 +57,7 @@ Architectures: amd64 ReInstall: foo:amd64 Planner: internal' head -n 5 "$EIPPLOG" aptinternalplanner < "$EIPPLOG" > planner.log || true -testsuccessequal 'Unpack: 4 -Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log +testsuccessequal 'Unpack: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log rm -f "$EIPPLOG" testsuccess aptget purge foo -s diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks index 8c3750acf..ebcbecf47 100755 --- a/test/integration/test-ignore-provides-if-versioned-breaks +++ b/test/integration/test-ignore-provides-if-versioned-breaks @@ -144,7 +144,7 @@ Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) Inst foo-same-breaker-3 (1.0 unstable [i386]) Inst foo-same-provider (1.0 unstable [i386]) -Conf foo-same:amd64 (4.0 unstable [amd64]) Conf foo-same (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) Conf foo-same-breaker-3 (1.0 unstable [i386]) Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts index 839609431..3243cfb51 100755 --- a/test/integration/test-ignore-provides-if-versioned-conflicts +++ b/test/integration/test-ignore-provides-if-versioned-conflicts @@ -144,7 +144,7 @@ Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) Inst foo-same-breaker-3 (1.0 unstable [i386]) Inst foo-same-provider (1.0 unstable [i386]) -Conf foo-same:amd64 (4.0 unstable [amd64]) Conf foo-same (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) Conf foo-same-breaker-3 (1.0 unstable [i386]) Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index a9c198580..21b394055 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -72,11 +72,15 @@ checkpurge() { tail -n +3 rootdir/var/log/apt/term.log | head -n -1 > terminal.log testfileequal 'terminal.log' "$(cat terminal.output)" - testequal "startup packages purge + testequal "startup packages remove +status installed $PKGNAME 1.0 remove $PKGNAME 1.0 status half-configured $PKGNAME 1.0 status half-installed $PKGNAME 1.0 status config-files $PKGNAME 1.0 +status config-files $PKGNAME 1.0 +startup packages purge +remove $PKGNAME 1.0 purge $PKGNAME 1.0 status config-files $PKGNAME 1.0 status config-files $PKGNAME 1.0 diff --git a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew index a46f2292a..a45c0d55d 100755 --- a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew +++ b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew @@ -59,10 +59,10 @@ Inst fine-installed [1] (2 unstable [amd64]) [fine-installed:amd64 on fine-insta Inst fine-installed:i386 [1] (2 unstable [i386]) Inst out-of-sync-gone-foreign [1] (2 unstable [amd64]) Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386]) -Conf fine:i386 (2 unstable [i386]) Conf fine (2 unstable [amd64]) -Conf fine-installed:i386 (2 unstable [i386]) +Conf fine:i386 (2 unstable [i386]) Conf fine-installed (2 unstable [amd64]) +Conf fine-installed:i386 (2 unstable [i386]) Conf out-of-sync-gone-foreign (2 unstable [amd64]) Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1 @@ -89,10 +89,10 @@ Inst fine-installed [1] (3 experimental [amd64]) [fine-installed:amd64 on fine-i Inst fine-installed:i386 [1] (3 experimental [i386]) Inst out-of-sync-gone-foreign [1] (2 unstable [amd64]) Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386]) -Conf fine:i386 (3 experimental [i386]) Conf fine (3 experimental [amd64]) -Conf fine-installed:i386 (3 experimental [i386]) +Conf fine:i386 (3 experimental [i386]) Conf fine-installed (3 experimental [amd64]) +Conf fine-installed:i386 (3 experimental [i386]) Conf out-of-sync-gone-foreign (2 unstable [amd64]) Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1 diff --git a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages index 7fcf16ed5..09953e943 100755 --- a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages +++ b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages @@ -39,11 +39,11 @@ Inst libreoffice-style-galaxy [3] (4 sid [amd64]) [libreoffice-common:amd64 on l Inst libreoffice-core [3] (4 sid [amd64]) [libreoffice-core:amd64 on libreoffice-common:amd64] [libreoffice-common:amd64 on libreoffice-core:amd64] [libreoffice-common:amd64 on libreoffice-style-galaxy:amd64] [libreoffice-common:amd64 ] Inst libreoffice-common [3] (4 sid [all]) [] Inst ure (4 sid [amd64]) -Conf ure (4 sid [amd64]) -Conf libreoffice-common (4 sid [all]) -Conf libreoffice-core (4 sid [amd64]) +Conf libreoffice (4 sid [amd64]) Conf libreoffice-style-galaxy (4 sid [amd64]) -Conf libreoffice (4 sid [amd64])' 'Reading package lists... +Conf libreoffice-core (4 sid [amd64]) +Conf libreoffice-common (4 sid [all]) +Conf ure (4 sid [amd64])' 'Reading package lists... Building dependency tree... Calculating upgrade... The following NEW packages will be installed: @@ -56,8 +56,8 @@ Inst libreoffice-style-galaxy [3] (4 sid [amd64]) [libreoffice-common:amd64 on l Inst libreoffice-core [3] (4 sid [amd64]) [libreoffice-common:amd64 on libreoffice-core:amd64] [libreoffice-common:amd64 on libreoffice-style-galaxy:amd64] [libreoffice-core:amd64 on libreoffice-common:amd64] [libreoffice-common:amd64 ] Inst libreoffice-common [3] (4 sid [all]) [] Inst ure (4 sid [amd64]) -Conf ure (4 sid [amd64]) -Conf libreoffice-common (4 sid [all]) -Conf libreoffice-core (4 sid [amd64]) +Conf libreoffice (4 sid [amd64]) Conf libreoffice-style-galaxy (4 sid [amd64]) -Conf libreoffice (4 sid [amd64])' aptget dist-upgrade -s +Conf libreoffice-core (4 sid [amd64]) +Conf libreoffice-common (4 sid [all]) +Conf ure (4 sid [amd64])' aptget dist-upgrade -s -- cgit v1.2.3