diff options
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-apt-cli-list | 18 | ||||
-rwxr-xr-x | test/integration/test-apt-get-source-multisources | 30 | ||||
-rwxr-xr-x | test/integration/test-bug-735967-lib32-to-i386-unavailable | 86 | ||||
-rwxr-xr-x | test/integration/test-bug-737130-multicompress-file-modes | 30 | ||||
-rwxr-xr-x | test/integration/test-bug-multiarch-upgrade | 29 |
5 files changed, 184 insertions, 9 deletions
diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index 8d5df9051..47507aeb8 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -18,30 +18,30 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) testequal "Listing... -bar/now 1.0 [installed,local] i386 +bar/now 1.0 i386 [installed,local] foo/unstable 1.0 all -foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list +foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list testequal "Listing... foo/unstable 1.0 all -foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list "foo*" +foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*" testequal "Listing... -foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list --upgradable +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 [installed,local] i386 -foobar/now 1.0 [installed,upgradable to: 2.0] i386" apt list --installed +bar/now 1.0 i386 [installed,local] +foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed testequal "Listing... -foobar/unstable 2.0 [upgradable from: 1.0] i386 -foobar/now 1.0 [installed,upgradable to: 2.0] i386 +foobar/unstable 2.0 i386 [upgradable from: 1.0] +foobar/now 1.0 i386 [installed,upgradable to: 2.0] " apt list foobar --all-versions testequal "Listing... -bar/now 1.0 [installed,local] i386 +bar/now 1.0 i386 [installed,local] an autogenerated dummy bar=1.0/installed " apt list bar --verbose diff --git a/test/integration/test-apt-get-source-multisources b/test/integration/test-apt-get-source-multisources new file mode 100755 index 000000000..cc759e8c1 --- /dev/null +++ b/test/integration/test-apt-get-source-multisources @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'armhf' + +insertsource 'unstable' 'adduser' 'all' '3.113+nmu3' +insertsource 'stable' 'python-fll' 'all' '0.9.11' + +insertpackage 'unstable' 'adduser' 'all' '3.113+nmu3' +insertpackage 'stable' 'python-fll' 'all' '0.9.11' + +setupaptarchive + +APTARCHIVE=$(readlink -f ./aptarchive) + +HEADER="Reading package lists... +Building dependency tree..." +testequal "$HEADER +Need to get 0 B of source archives. +'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e +'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -qdy --print-uris --dsc-only adduser=3.113 python-fll=0.9.11 + +testequal "$HEADER +Need to get 0 B of source archives. +'file://${APTARCHIVE}/python-fll_0.9.11.dsc' python-fll_0.9.11.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e +'file://${APTARCHIVE}/adduser_3.113+nmu3.dsc' adduser_3.113+nmu3.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -qdy --print-uris --dsc-only python-fll=0.9.11 adduser=3.113 diff --git a/test/integration/test-bug-735967-lib32-to-i386-unavailable b/test/integration/test-bug-735967-lib32-to-i386-unavailable new file mode 100755 index 000000000..4dbe1d25d --- /dev/null +++ b/test/integration/test-bug-735967-lib32-to-i386-unavailable @@ -0,0 +1,86 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'i386' 'amd64' + +insertpackage 'unstable' 'lib32nss-mdns' 'amd64' '0.10-6' 'Depends: libnss-mdns-i386 (= 0.10-6)' +insertpackage 'unstable' 'libnss-mdns' 'amd64,i386' '0.10-6' 'Multi-Arch: same +Breaks: lib32nss-mdns (<< 0.10-6)' +insertpackage 'unstable' 'libnss-mdns-i386' 'i386' '0.10-6' 'Multi-Arch: foreign +Depends: libnss-mdns' + +insertpackage 'unstable' 'foo' 'amd64' '1' 'Depends: libfoo' +insertpackage 'unstable' 'libfoo' 'amd64' '1' 'Depends: libfoo-bin' +insertpackage 'unstable' 'libfoo-bin' 'i386' '0.10-6' 'Multi-Arch: foreign' + +insertinstalledpackage 'lib32nss-mdns' 'amd64' '0.9-1' +insertinstalledpackage 'libnss-mdns' 'amd64' '0.9-1' + +insertinstalledpackage 'i-make-packages-important' 'all' '1' 'Depends: libnss-mdns' + +setupaptarchive --no-update + +# make libnss-mdns-i386 unavailable +configarchitecture 'amd64' +testsuccess aptget update + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + lib32nss-mdns +The following packages will be upgraded: + libnss-mdns +1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv lib32nss-mdns [0.9-1] +Inst libnss-mdns [0.9-1] (0.10-6 unstable [amd64]) +Conf libnss-mdns (0.10-6 unstable [amd64])' aptget dist-upgrade -s + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo : Depends: libfoo but it is not going to be installed +E: Unable to correct problems, you have held broken packages.' aptget install foo -s + +# activate multiarch +configarchitecture 'amd64' 'i386' +testsuccess aptget update + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + libnss-mdns:i386 libnss-mdns-i386:i386 +The following packages will be upgraded: + lib32nss-mdns libnss-mdns +2 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +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 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 + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libfoo libfoo-bin:i386 +The following NEW packages will be installed: + foo libfoo libfoo-bin:i386 +0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded. +Inst libfoo-bin:i386 (0.10-6 unstable [i386]) +Inst libfoo (1 unstable [amd64]) +Inst foo (1 unstable [amd64]) +Conf libfoo-bin:i386 (0.10-6 unstable [i386]) +Conf libfoo (1 unstable [amd64]) +Conf foo (1 unstable [amd64])' aptget install foo -s diff --git a/test/integration/test-bug-737130-multicompress-file-modes b/test/integration/test-bug-737130-multicompress-file-modes new file mode 100755 index 000000000..7df6339a2 --- /dev/null +++ b/test/integration/test-bug-737130-multicompress-file-modes @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +cat >aptarchive/ftparchive.conf <<EOF +Dir { ArchiveDir "$(pwd)/aptarchive"; CacheDir "$(pwd)/aptarchive"; }; +Default { Translation::Compress ". gzip bzip2 xz"; FileMode 0644; }; +tree "dists/sid" { + Sections "main"; + Architectures "i386"; + LongDescription "false"; +}; +EOF +mkdir -p aptarchive/dists/sid/main/binary-i386 +mkdir -p aptarchive/dists/sid/main/i18n +testsuccess aptftparchive generate aptarchive/ftparchive.conf +i18n=aptarchive/dists/sid/main/i18n +for comp in '' .gz .bz2 .xz; do + msgtest 'Test apt-ftparchive file mode is 644 for' "Translation-en$comp" + FILEMODE="$(stat --format %a "$i18n/Translation-en$comp")" + if [ "$FILEMODE" != '644' ]; then + msgfail "Mode was '$FILEMODE'!" + else + msgpass + fi +done diff --git a/test/integration/test-bug-multiarch-upgrade b/test/integration/test-bug-multiarch-upgrade new file mode 100755 index 000000000..dc3725df1 --- /dev/null +++ b/test/integration/test-bug-multiarch-upgrade @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'libcups2' 'amd64' '1' 'Multi-Arch: same' +insertinstalledpackage 'libcups2' 'i386' '1' 'Multi-Arch: same' + +insertpackage 'unstable' 'libcups2' 'amd64' '0' 'Multi-Arch: same' +insertpackage 'unstable' 'libcups2' 'amd64' '2' 'Multi-Arch: same' +insertpackage 'unstable' 'libcups2' 'i386' '0' 'Multi-Arch: same' +insertpackage 'unstable' 'libcups2' 'i386' '2' 'Multi-Arch: same' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libcups2 +The following packages will be upgraded: + libcups2 libcups2:i386 +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 (2 unstable [amd64]) +Conf libcups2:i386 (2 unstable [i386])' aptget install -s libcups2:i386 |