diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-03-13 14:03:42 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-03-13 14:03:42 +0100 |
commit | 86a3007a2211d18444e1a0080e9c645c77d84008 (patch) | |
tree | f346f330efda8696b97fafc2e8b0744748de66b7 /test | |
parent | af20242585a0b4880484c5559edb7d14962918ce (diff) | |
parent | c872b88e8254304dc1f6f1ee421cfbf9c1d0643e (diff) |
cherry pick a bunch of packagemanager.cc ordering fixes
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/skip-avoid-avoiding-breaks-predepends | 21 | ||||
-rwxr-xr-x | test/integration/test-bug-618288-multiarch-same-lockstep | 42 | ||||
-rwxr-xr-x | test/integration/test-conflicts-loop | 11 | ||||
-rwxr-xr-x | test/integration/test-pin-non-existent-package | 20 |
4 files changed, 54 insertions, 40 deletions
diff --git a/test/integration/skip-avoid-avoiding-breaks-predepends b/test/integration/skip-avoid-avoiding-breaks-predepends new file mode 100755 index 000000000..a47e8bc2b --- /dev/null +++ b/test/integration/skip-avoid-avoiding-breaks-predepends @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'native' + +insertinstalledpackage 'looping' 'native' '1' +insertinstalledpackage 'loop1' 'native' '1' 'Depends: loop2 (= 1)' +insertinstalledpackage 'loop2' 'native' '1' 'Depends: loop1 (= 1)' + +buildsimplenativepackage 'looping' 'native' '1.15.7.2' 'stable' 'Breaks: loop2 (<= 1)' +buildsimplenativepackage 'loop1' 'native' '2' 'stable' 'Depends: loop2 (= 2)' +buildsimplenativepackage 'loop2' 'native' '2' 'stable' 'Depends: loop1 (= 2) +Pre-Depends: looping (>= 1.15)' + +setupaptarchive + +aptget dist-upgrade -y -o Debug::pkgOrderList=1 #-qq 2>&1 > /dev/null +testdpkginstalled looping loop1 loop2 diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep index 432431212..fde075172 100755 --- a/test/integration/test-bug-618288-multiarch-same-lockstep +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -16,30 +16,22 @@ buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' setupaptarchive +aptget dist-upgrade -s 2>&1 > output.apt # order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together -testequalor2 'Reading package lists... -Building dependency tree... -The following packages will be upgraded: - apt:i386 apt2 libsame libsame:i386 -4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libsame:i386 [1] (2 unstable [i386]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:amd64 apt:i386 ] -Inst libsame [1] (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] -Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] -Conf apt2 (2 unstable [amd64]) [apt:i386 ] -Inst apt:i386 [1] (2 unstable [i386]) -Conf apt:i386 (2 unstable [i386])' 'Reading package lists... -Building dependency tree... -The following packages will be upgraded: - apt:i386 apt2 libsame libsame:i386 -4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libsame:i386 [1] (2 unstable [i386]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:amd64 apt:i386 ] -Inst libsame [1] (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] -Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] -Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] -Conf apt2 (2 unstable [amd64]) [apt:i386 ] -Inst apt:i386 [1] (2 unstable [i386]) -Conf apt:i386 (2 unstable [i386])' aptget dist-upgrade -s +LS_U_AMD="$(grep -o -n '^Inst libsame ' output.apt | cut -d: -f1)" +LS_U_INT="$(grep -o -n '^Inst libsame:i386 ' output.apt | cut -d: -f1)" +LS_C_AMD="$(grep -o -n '^Conf libsame ' output.apt | cut -d: -f1)" +LS_C_INT="$(grep -o -n '^Conf libsame:i386 ' output.apt | cut -d: -f1)" + +msgtest 'Test if libsame:amd64 unpack before configure' +test "$LS_U_AMD" -lt "$LS_C_AMD" && msgpass || msgfail + +msgtest 'Test if libsame:i386 unpack before configure' +test "$LS_U_INT" -lt "$LS_C_INT" && msgpass || msgfail + +msgtest 'Test if libsame:amd64 unpack is before libsame:i386 configure' +test "$LS_U_AMD" -lt "$LS_C_INT" && msgpass || msgfail + +msgtest 'Test if libsame:i386 unpack is before libsame:amd64 configure' +test "$LS_U_INT" -lt "$LS_C_AMD" && msgpass || msgfail diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop index 7b5724d74..25f005969 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -20,14 +20,15 @@ Building dependency tree... The following packages will be upgraded: openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. - openjdk-6-jre-lib conflicts with openjdk-6-jre - openjdk-6-jre conflicts with openjdk-6-jre-headless - openjdk-6-jre-headless conflicts with openjdk-6-jre + openjdk-6-jre-lib:i386 conflicts with openjdk-6-jre:i386 + openjdk-6-jre:i386 conflicts with openjdk-6-jre-headless:i386 + openjdk-6-jre-headless:i386 conflicts with openjdk-6-jre:i386 Remv openjdk-6-jre [6b16-1.8-0ubuntu1] - openjdk-6-jre-headless conflicts with openjdk-6-jre-lib + openjdk-6-jre-headless:i386 conflicts with openjdk-6-jre-lib:i386 Remv openjdk-6-jre-lib [6b16-1.8-0ubuntu1] Inst openjdk-6-jre-headless [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) - openjdk-6-jre conflicts with openjdk-6-jre-lib + openjdk-6-jre:i386 conflicts with openjdk-6-jre-lib:i386 + openjdk-6-jre:i386 conflicts with openjdk-6-jre-lib:i386 Inst openjdk-6-jre [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) Inst openjdk-6-jre-lib [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) Conf openjdk-6-jre-lib (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) diff --git a/test/integration/test-pin-non-existent-package b/test/integration/test-pin-non-existent-package index c91e77844..35de22115 100755 --- a/test/integration/test-pin-non-existent-package +++ b/test/integration/test-pin-non-existent-package @@ -6,7 +6,7 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" -insertpackage 'unstable' 'apt' 'i386' '0.8.15' +insertpackage 'unstable' 'rapt' 'i386' '0.8.15' insertpackage 'unstable' 'arch' 'i386' '1.0' setupaptarchive @@ -22,40 +22,40 @@ testcandidate() { fi } -testcandidate apt '0.8.15' +testcandidate rapt '0.8.15' testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 testequal 'Reading package lists... Building dependency tree... -0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only -echo 'Package: apt +echo 'Package: rapt Pin: release a=unstable Pin-Priority: -1' > rootdir/etc/apt/preferences -testcandidate apt '(none)' +testcandidate rapt '(none)' testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 testequal 'Reading package lists... Building dependency tree... -0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only echo ' Package: doesntexist Pin: release a=unstable Pin-Priority: 1000' >> rootdir/etc/apt/preferences -testcandidate apt '(none)' +testcandidate rapt '(none)' echo ' -Package: apt +Package: rapt Pin: release a=unstable Pin-Priority: 1000' >> rootdir/etc/apt/preferences -testcandidate apt '(none)' +testcandidate rapt '(none)' testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 testequal 'Reading package lists... Building dependency tree... -0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only echo 'Package: arch:amd64 Pin: release a=unstable |