diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-08-11 01:36:23 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-08-11 01:36:23 +0200 |
commit | 0a7370ca91289db3d23d72aeac397edfe3dfb75b (patch) | |
tree | a268cee713cb295851634d3a4a91c7283b564952 /test/integration | |
parent | 6b3ddbd059c403efeb40d81c29f2cae6e8f5b1bf (diff) | |
parent | 28557f94578602f9ce0011501a2259bd98ab0688 (diff) |
Merge branch 'feature/apt-dpkg-comm'
Diffstat (limited to 'test/integration')
19 files changed, 160 insertions, 79 deletions
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-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 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 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 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-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' 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-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-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 56cbff095..21b394055 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 @@ -72,12 +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 <none> 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 <none> purge $PKGNAME 1.0 <none> status config-files $PKGNAME 1.0 status config-files $PKGNAME 1.0 @@ -86,6 +89,7 @@ status config-files $PKGNAME 1.0 status config-files $PKGNAME 1.0 status not-installed $PKGNAME <none> 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 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-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} 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 |