From e62aa1dd8099aeb8bb667253ca22c56b93f521d1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 29 Jan 2014 23:02:51 +0100 Subject: pkgTagFile: if we have seen the end, do not try to see more Asking for more via Step() will notice that we are done with the file already and will result in a fail, which means we can't find the last sections anymore (which is especially painful if we haven't moved at all as in the testcase we haven't even looked at one of the sources leading to a strange behaviour) Reported-By: Niall Walsh --- test/integration/test-apt-get-source-multisources | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 test/integration/test-apt-get-source-multisources (limited to 'test') 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 -- cgit v1.2.3 From 4afa7d18b37661996d188959ba7917824e1545d3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 31 Jan 2014 08:57:34 +0100 Subject: show "status" in apt list last --- test/integration/test-apt-cli-list | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') 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 -- cgit v1.2.3 From 0dfc7eef47519bd6b48ceaa4341b72ec40560988 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Feb 2014 10:18:16 +0100 Subject: Fix multiarch package upgrade issue When checking for negative dependencies in MarkInstall() ensure that only dependencies that are relevant (i.e. getting installed) are checked. --- test/integration/test-bug-multiarch-upgrade | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 test/integration/test-bug-multiarch-upgrade (limited to 'test') 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 -- cgit v1.2.3 From 446551c8ffd2c9cb9dcd707c94590e73009f7dd9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 Feb 2014 00:13:10 +0100 Subject: discard impossible candidates in MarkInstall If a (Pre-)Depends can't be satisfied there is no point in keeping the candidate as is as it is impossible to find a solution for it, so we can just as well reset the candidate to the currently installed version. We avoid trying to install this impossible candidate later on this way. Closes: #735967 --- .../test-bug-735967-lib32-to-i386-unavailable | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 test/integration/test-bug-735967-lib32-to-i386-unavailable (limited to 'test') 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 -- cgit v1.2.3 From cc130d7114425cc6f8c315e6cbc68be2cb4d3c38 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 30 Jan 2014 14:08:08 +0000 Subject: multicompress with externals sets wrong file modes Copy from the bug description: After we upgraded the Ubuntu master archive from lucid to precise, we noticed that Translation-en.bz2 was being written with mode 0600 rather than 0644, which broke our mirroring. This is no longer reproducible as such in unstable because apt now links against libbz2, but it's still reproducible with xz; it happens because multicompress fchmods one end of the compression pipe in this case rather than the target file. [Original testcase slightly modified to comply with house-style] Closes: 737130 --- .../test-bug-737130-multicompress-file-modes | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 test/integration/test-bug-737130-multicompress-file-modes (limited to 'test') 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 <