From 4df62de6ea49c29eada5e58764378da1b0ec8648 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 14 Dec 2011 12:32:53 +0100 Subject: * apt-pkg/aptconfiguration.cc: - parse dpkg --print-foreign-architectures correctly in case archs are separated by newline instead of space, too. --- .../test-bug-612958-use-dpkg-multiarch-config | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config index 4f31c3953..18b964636 100755 --- a/test/integration/test-bug-612958-use-dpkg-multiarch-config +++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config @@ -56,4 +56,22 @@ testfail 'dpkg config' 'armel' echo '#! /bin/sh echo "amd64 armel"' > ./dpkg-printer +testpass 'dpkg config' 'i386' +testpass 'dpkg config' 'amd64' +testpass 'dpkg config' 'armel' + +echo '#! /bin/sh +echo "amd64 +armel"' > ./dpkg-printer + +testpass 'dpkg config' 'i386' +testpass 'dpkg config' 'amd64' testpass 'dpkg config' 'armel' + +echo '#! /bin/sh +echo "amd64 +i386"' > ./dpkg-printer + +testpass 'dpkg config' 'i386' +testpass 'dpkg config' 'amd64' +testfail 'dpkg config' 'armel' -- cgit v1.2.3 From 67b5d3dc34e88e092c8e5f05efc82370a873c80f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Jan 2012 12:40:38 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - redirect out/input of dpkg --assert-multi-arch to /dev/null --- test/integration/test-dpkg-assert-multi-arch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch index b1ec73e18..8be7e0d76 100755 --- a/test/integration/test-dpkg-assert-multi-arch +++ b/test/integration/test-dpkg-assert-multi-arch @@ -14,14 +14,22 @@ setupaptarchive testqualifier() { msgtest 'Test for correct qualifier mode' $2 - GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -- '--configure' | sed -e 's/^.*--configure \([^ ]*\).*$/\1/')" - test "$GIVEN" = "$2" && msgpass || msgfail + GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -e '--configure' -e '^dpkg:' | sed -e 's/^.*--configure \([^ ]*\).*$/\1/')" + if [ "$GIVEN" = "$2" ]; then + msgpass + else + echo + echo "$GIVEN" + msgfail + fi } # non-multiarch or "ubuntus" old multiarchified dpkg echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper echo '#! /bin/sh if echo "$*" | grep -q -- "--assert-multi-arch"; then + echo >&2 'dpkg: Fehler: unbekannte Option --assert-multi-arch' + echo >&1 'dpkg: Info: unbekannte Option --assert-multi-arch' return 2; fi return $*' > ./dpkg-wrapper -- cgit v1.2.3 From 3a5ec3053c00ff5db058f1ddd99bf23591b9a181 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Jan 2012 13:12:14 +0100 Subject: if multi-arch is detected ensure that pkg:all is reported as pkg:all Versions with arch:all are added to the package with the native arch, so we can't rely on Pkg.Arch() for the architecture --- test/integration/test-dpkg-assert-multi-arch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test') diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch index 8be7e0d76..532cfd26a 100755 --- a/test/integration/test-dpkg-assert-multi-arch +++ b/test/integration/test-dpkg-assert-multi-arch @@ -9,6 +9,8 @@ configarchitecture 'amd64' 'i386' buildsimplenativepackage 'native-pkg' 'amd64' '1.0' 'stable' buildsimplenativepackage 'foreign-pkg' 'i386' '0.5' 'stable' 'Multi-Arch: foreign' buildsimplenativepackage 'same-lib' 'amd64,i386' '0.5' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'all-pkg' 'all' '2.0' 'stable' +buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' setupaptarchive @@ -42,9 +44,21 @@ testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386' testqualifier 'same-lib' 'same-lib' testqualifier 'same-lib:amd64' 'same-lib' testqualifier 'same-lib:i386' 'same-lib:i386' +testqualifier 'all-pkg' 'all-pkg' +testqualifier 'all-pkg:amd64' 'all-pkg' +testqualifier 'all-foreign-pkg' 'all-foreign-pkg' +testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg' +insertinstalledpackage 'all-pkg' 'amd64' '1.0' +insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' +testqualifier 'all-pkg' 'all-pkg' +testqualifier 'all-pkg:amd64' 'all-pkg' +testqualifier 'all-foreign-pkg' 'all-foreign-pkg' +testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg' # multiarch dpkg (new interface version) +rm rootdir/var/lib/dpkg/status +touch rootdir/var/lib/dpkg/status echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper echo '#! /bin/sh if echo "$*" | grep -q -- "--assert-multi-arch"; then @@ -59,3 +73,13 @@ testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386' testqualifier 'same-lib' 'same-lib:amd64' testqualifier 'same-lib:amd64' 'same-lib:amd64' testqualifier 'same-lib:i386' 'same-lib:i386' +testqualifier 'all-pkg' 'all-pkg:all' +testqualifier 'all-pkg:amd64' 'all-pkg:all' +testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all' +testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all' +insertinstalledpackage 'all-pkg' 'amd64' '1.0' +insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' +testqualifier 'all-pkg' 'all-pkg:all' +testqualifier 'all-pkg:amd64' 'all-pkg:all' +testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all' +testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all' -- cgit v1.2.3 From 2a2a7ef4dfa9d8fb8118c2e318555438098cdf34 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Jan 2012 18:42:57 +0100 Subject: * apt-pkg/cacheiterators.h: - return the correct version arch for all+foreign, too The flag is interpreted at a few other places in different styles so this commit ensures that the flag check is consistent everywhere (checking for Same in flag style is a bit too much as it isn't used in combination with others anyway, but who knows and just for consistency) --- test/integration/framework | 9 ++++++++- test/integration/test-dpkg-assert-multi-arch | 22 +++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 2ea1844f0..d7526a100 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -25,7 +25,14 @@ msgnwarn() { echo -n "${CWARNING}W: $1${CNORMAL}" >&2; } msgnmsg() { echo -n "${CMSG}$1${CNORMAL}" >&2; } msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}" >&2; } msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}" >&2; } -msgtest() { echo -n "${CINFO}$1 ${CCMD}$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} …${CNORMAL} " >&2; } +msgtest() { + while [ -n "$1" ]; do + echo -n "${CINFO}$1${CCMD} " >&2; + echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " >&2; + shift 2 + done + echo -n "…${CNORMAL} " >&2; +} msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; } msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; } msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; } diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch index 532cfd26a..177d7489b 100755 --- a/test/integration/test-dpkg-assert-multi-arch +++ b/test/integration/test-dpkg-assert-multi-arch @@ -10,13 +10,13 @@ buildsimplenativepackage 'native-pkg' 'amd64' '1.0' 'stable' buildsimplenativepackage 'foreign-pkg' 'i386' '0.5' 'stable' 'Multi-Arch: foreign' buildsimplenativepackage 'same-lib' 'amd64,i386' '0.5' 'stable' 'Multi-Arch: same' buildsimplenativepackage 'all-pkg' 'all' '2.0' 'stable' -buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' +buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' 'Multi-Arch: foreign' setupaptarchive testqualifier() { - msgtest 'Test for correct qualifier mode' $2 - GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -e '--configure' -e '^dpkg:' | sed -e 's/^.*--configure \([^ ]*\).*$/\1/')" + msgtest 'Test with' $1 'for correct qualifier mode' $2 + GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -v -- '--unpack' | sed -e 's/^.*--[^u][^ ]* \([^ ]*\).*$/\1/')" if [ "$GIVEN" = "$2" ]; then msgpass else @@ -49,11 +49,17 @@ testqualifier 'all-pkg:amd64' 'all-pkg' testqualifier 'all-foreign-pkg' 'all-foreign-pkg' testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg' insertinstalledpackage 'all-pkg' 'amd64' '1.0' -insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' +insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign' testqualifier 'all-pkg' 'all-pkg' testqualifier 'all-pkg:amd64' 'all-pkg' testqualifier 'all-foreign-pkg' 'all-foreign-pkg' testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg' +insertinstalledpackage 'always-all-pkg' 'all' '1.0' +insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign' +testqualifier 'all-pkg-' 'all-pkg' +testqualifier 'all-foreign-pkg-' 'all-foreign-pkg' +testqualifier 'always-all-pkg-' 'always-all-pkg' +testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg' # multiarch dpkg (new interface version) @@ -78,8 +84,14 @@ testqualifier 'all-pkg:amd64' 'all-pkg:all' testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all' testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all' insertinstalledpackage 'all-pkg' 'amd64' '1.0' -insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' +insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign' testqualifier 'all-pkg' 'all-pkg:all' testqualifier 'all-pkg:amd64' 'all-pkg:all' testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all' testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all' +insertinstalledpackage 'always-all-pkg' 'all' '1.0' +insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign' +testqualifier 'all-pkg-' 'all-pkg:amd64' +testqualifier 'all-foreign-pkg-' 'all-foreign-pkg:amd64' +testqualifier 'always-all-pkg-' 'always-all-pkg:all' +testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg:all' -- cgit v1.2.3 From 18aea9e6c38ec0397e546563b8a54a99b431028b Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 20 Jan 2012 01:34:31 +0100 Subject: * test/libapt/globalerror_test.cc: - errno 0 has a different strerror on hurd, so generate the expected message dynamically instead of hardcoding 'Success' (Closes: #656530) --- test/libapt/globalerror_test.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index 5d27414f9..72044d493 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -3,9 +3,12 @@ #include "assert.h" #include #include +#include int main(int argc,char *argv[]) { + std::string const textOfErrnoZero(strerror(0)); + equals(_error->empty(), true); equals(_error->PendingError(), false); equals(_error->Notice("%s Notice", "A"), false); @@ -80,7 +83,7 @@ int main(int argc,char *argv[]) equals(_error->PendingError(), true); equals(_error->PopMessage(text), true); equals(_error->PendingError(), false); - equals(text, "Something horrible happend 2 times - errno (0: Success)"); + equals(text, std::string("Something horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")")); equals(_error->empty(), true); std::string longText; @@ -92,7 +95,7 @@ int main(int argc,char *argv[]) equals(_error->Errno("errno", "%s horrible %s %d times", longText.c_str(), "happend", 2), false); equals(_error->PopMessage(text), true); - equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: Success)")); + equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")")); equals(_error->Warning("Репозиторий не обновлён и будут %d %s", 4, "test"), false); equals(_error->PopMessage(text), false); -- cgit v1.2.3 From 809cf6d22a9bb72061aedf2670c78b57d9da6999 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Jan 2012 02:00:48 +0100 Subject: * test/libapt/run-tests: - hurd doesn't have dmesg yet and we don't really need it either, so use with $0 a more stable data source for hashsumming --- test/libapt/run-tests | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test') diff --git a/test/libapt/run-tests b/test/libapt/run-tests index 5fff4ecca..d4341412d 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -67,11 +67,9 @@ do "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak" \ "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-ast_DE" elif [ $name = "HashSums${EXT}" ]; then - TMP="$(mktemp)" - dmesg > $TMP + TMP="$(readlink -f "./${0}")" echo -n "Testing with \033[1;35m${name}\033[0m ... " LD_LIBRARY_PATH=${LDPATH} ${testapp} $TMP $(md5sum $TMP | cut -d' ' -f 1) $(sha1sum $TMP | cut -d' ' -f 1) $(sha256sum $TMP | cut -d' ' -f 1) $(sha512sum $TMP | cut -d' ' -f 1) && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m" - rm $TMP continue elif [ $name = "CompareVersion${EXT}" ]; then tmppath="${DIR}/versions.lst" -- cgit v1.2.3 From 737c7a7b854aa833d75994b67619c5852aa2085d Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sun, 29 Jan 2012 13:24:17 +0100 Subject: * cmdline/apt-get.cc: - for cross-build-dependencies M-A: none should be DEB_HOST_ARCH, not DEB_BUILD_ARCH (Closes: #646288) --- .../test-bug-632221-cross-dependency-satisfaction | 87 ++++++++++++++++------ 1 file changed, 63 insertions(+), 24 deletions(-) (limited to 'test') diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction index 4299f052f..30df48604 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -6,43 +6,51 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' 'armel' -insertinstalledpackage 'build-essential' 'all' '11.5' +insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' -insertpackage 'unstable' 'doxygen' 'amd64,armel' '1.0' +insertpackage 'unstable' 'doxygen' 'amd64,armel' '1.0' 'Multi-Arch: foreign' insertpackage 'unstable' 'libc6' 'amd64,armel' '1.0' 'Multi-Arch: same' insertpackage 'unstable' 'libc6-dev' 'amd64,armel' '1.0' 'Depends: libc6 Multi-Arch: same' +insertpackage 'unstable' 'libfwibble1' 'amd64,armel' '1.0' 'Depends: libc6 +Multi-Arch: same' +insertpackage 'unstable' 'libfwibble-dev' 'amd64,armel' '1.0' 'Depends: libfwibble1' insertpackage 'unstable' 'cool' 'amd64,armel' '1.0' 'Multi-Arch: allowed' insertpackage 'unstable' 'amdboot' 'amd64' '1.0' insertpackage 'unstable' 'foreigner' 'amd64,armel' '1.0' 'Multi-Arch: foreign' -insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner' +insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev' setupaptarchive testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: - amdboot cool doxygen foreigner libc6 libc6-dev -0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. + amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1 +0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Inst amdboot (1.0 unstable [amd64]) Inst cool (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst foreigner (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [amd64]) Inst libc6-dev (1.0 unstable [amd64]) +Inst libfwibble1 (1.0 unstable [amd64]) +Inst libfwibble-dev (1.0 unstable [amd64]) Conf amdboot (1.0 unstable [amd64]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf foreigner (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) -Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s +Conf libc6-dev (1.0 unstable [amd64]) +Conf libfwibble1 (1.0 unstable [amd64]) +Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot cool doxygen foreigner libc6 libc6:armel libc6-dev libc6-dev:armel -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + libfwibble-dev:armel libfwibble1:armel +0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Inst amdboot (1.0 unstable [amd64]) Inst cool (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) @@ -51,6 +59,8 @@ Inst libc6 (1.0 unstable [amd64]) Inst libc6:armel (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [amd64]) Inst libc6-dev:armel (1.0 unstable [armel]) +Inst libfwibble1:armel (1.0 unstable [armel]) +Inst libfwibble-dev:armel (1.0 unstable [armel]) Conf amdboot (1.0 unstable [amd64]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) @@ -58,34 +68,41 @@ Conf foreigner (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf libc6:armel (1.0 unstable [armel]) Conf libc6-dev (1.0 unstable [amd64]) -Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel +Conf libc6-dev:armel (1.0 unstable [armel]) +Conf libfwibble1:armel (1.0 unstable [armel]) +Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel configarchitecture 'armel' 'amd64' testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: - amdboot:amd64 cool doxygen foreigner libc6 libc6-dev -0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. + amdboot:amd64 cool doxygen foreigner libc6 libc6-dev libfwibble-dev + libfwibble1 +0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst foreigner (1.0 unstable [armel]) Inst libc6 (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [armel]) +Inst libfwibble1 (1.0 unstable [armel]) +Inst libfwibble-dev (1.0 unstable [armel]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf foreigner (1.0 unstable [armel]) Conf libc6 (1.0 unstable [armel]) -Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s +Conf libc6-dev (1.0 unstable [armel]) +Conf libfwibble1 (1.0 unstable [armel]) +Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64 - libc6-dev -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 +0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) @@ -94,6 +111,8 @@ Inst libc6:amd64 (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [armel]) Inst libc6-dev:amd64 (1.0 unstable [amd64]) Inst libc6-dev (1.0 unstable [armel]) +Inst libfwibble1:amd64 (1.0 unstable [amd64]) +Inst libfwibble-dev:amd64 (1.0 unstable [amd64]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) @@ -101,7 +120,9 @@ Conf foreigner (1.0 unstable [armel]) Conf libc6:amd64 (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [amd64]) -Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64 +Conf libc6-dev (1.0 unstable [armel]) +Conf libfwibble1:amd64 (1.0 unstable [amd64]) +Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64 configarchitecture 'amd64' 'armel' @@ -111,34 +132,43 @@ insertinstalledpackage 'foreigner' 'armel' '0.5' testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: - amdboot doxygen libc6 libc6-dev -0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded. + amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 +0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. Inst amdboot (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [amd64]) Inst libc6-dev (1.0 unstable [amd64]) +Inst libfwibble1 (1.0 unstable [amd64]) +Inst libfwibble-dev (1.0 unstable [amd64]) Conf amdboot (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) -Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s +Conf libc6-dev (1.0 unstable [amd64]) +Conf libfwibble1 (1.0 unstable [amd64]) +Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot doxygen libc6 libc6:armel libc6-dev libc6-dev:armel -0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. + libfwibble-dev:armel libfwibble1:armel +0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. Inst amdboot (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [amd64]) Inst libc6:armel (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [amd64]) Inst libc6-dev:armel (1.0 unstable [armel]) +Inst libfwibble1:armel (1.0 unstable [armel]) +Inst libfwibble-dev:armel (1.0 unstable [armel]) Conf amdboot (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf libc6:armel (1.0 unstable [armel]) Conf libc6-dev (1.0 unstable [amd64]) -Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel +Conf libc6-dev:armel (1.0 unstable [armel]) +Conf libfwibble1:armel (1.0 unstable [armel]) +Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel configarchitecture 'armel' 'amd64' @@ -148,36 +178,45 @@ Building dependency tree... The following packages will be REMOVED: cool:amd64 The following NEW packages will be installed: - amdboot:amd64 cool doxygen libc6 libc6-dev -0 upgraded, 5 newly installed, 1 to remove and 1 not upgraded. + amdboot:amd64 cool doxygen libc6 libc6-dev libfwibble-dev libfwibble1 +0 upgraded, 7 newly installed, 1 to remove and 1 not upgraded. Remv cool:amd64 [0.5] Inst amdboot:amd64 (1.0 unstable [amd64]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst libc6 (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [armel]) +Inst libfwibble1 (1.0 unstable [armel]) +Inst libfwibble-dev (1.0 unstable [armel]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf libc6 (1.0 unstable [armel]) -Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s +Conf libc6-dev (1.0 unstable [armel]) +Conf libfwibble1 (1.0 unstable [armel]) +Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev -0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. + libfwibble-dev:amd64 libfwibble1:amd64 +0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [armel]) Inst libc6:amd64 (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [armel]) Inst libc6-dev:amd64 (1.0 unstable [amd64]) Inst libc6-dev (1.0 unstable [armel]) +Inst libfwibble1:amd64 (1.0 unstable [amd64]) +Inst libfwibble-dev:amd64 (1.0 unstable [amd64]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [armel]) Conf libc6:amd64 (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [amd64]) -Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64 +Conf libc6-dev (1.0 unstable [armel]) +Conf libfwibble1:amd64 (1.0 unstable [amd64]) +Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64 -- cgit v1.2.3 From 898c29256f034c5f8a06b90e5740b54046acf0e2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 29 Jan 2012 13:54:40 +0100 Subject: add a very simple testcases for the previous commited fix for Breaks handling in algorithms.cc by Colin Watson --- .../test-bug-657695-resolver-breaks-on-virtuals | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 test/integration/test-bug-657695-resolver-breaks-on-virtuals (limited to 'test') diff --git a/test/integration/test-bug-657695-resolver-breaks-on-virtuals b/test/integration/test-bug-657695-resolver-breaks-on-virtuals new file mode 100755 index 000000000..e9b27cfcd --- /dev/null +++ b/test/integration/test-bug-657695-resolver-breaks-on-virtuals @@ -0,0 +1,51 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'xserver-xorg-core' 'amd64' '2:1.7.6-2ubuntu7.10' +for i in $(seq 1 50); do + insertinstalledpackage "xserver-xorg-video-driver$i" 'amd64' '1.0' 'Provides: xserver-xorg-video-6' +done + +insertpackage 'unstable' 'xserver-xorg-core' 'amd64' '2:1.11.3-0ubuntu9' 'Breaks: xserver-xorg-video-6' + + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + xserver-xorg-video-driver1 xserver-xorg-video-driver10 + xserver-xorg-video-driver11 xserver-xorg-video-driver12 + xserver-xorg-video-driver13 xserver-xorg-video-driver14 + xserver-xorg-video-driver15 xserver-xorg-video-driver16 + xserver-xorg-video-driver17 xserver-xorg-video-driver18 + xserver-xorg-video-driver19 xserver-xorg-video-driver2 + xserver-xorg-video-driver20 xserver-xorg-video-driver21 + xserver-xorg-video-driver22 xserver-xorg-video-driver23 + xserver-xorg-video-driver24 xserver-xorg-video-driver25 + xserver-xorg-video-driver26 xserver-xorg-video-driver27 + xserver-xorg-video-driver28 xserver-xorg-video-driver29 + xserver-xorg-video-driver3 xserver-xorg-video-driver30 + xserver-xorg-video-driver31 xserver-xorg-video-driver32 + xserver-xorg-video-driver33 xserver-xorg-video-driver34 + xserver-xorg-video-driver35 xserver-xorg-video-driver36 + xserver-xorg-video-driver37 xserver-xorg-video-driver38 + xserver-xorg-video-driver39 xserver-xorg-video-driver4 + xserver-xorg-video-driver40 xserver-xorg-video-driver41 + xserver-xorg-video-driver42 xserver-xorg-video-driver43 + xserver-xorg-video-driver44 xserver-xorg-video-driver45 + xserver-xorg-video-driver46 xserver-xorg-video-driver47 + xserver-xorg-video-driver48 xserver-xorg-video-driver49 + xserver-xorg-video-driver5 xserver-xorg-video-driver50 + xserver-xorg-video-driver6 xserver-xorg-video-driver7 + xserver-xorg-video-driver8 xserver-xorg-video-driver9 +The following packages will be upgraded: + xserver-xorg-core +1 upgraded, 0 newly installed, 50 to remove and 0 not upgraded. +After this operation, 2150 kB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -- cgit v1.2.3 From cffabf7d7e3a4c7475bf6722d41e20454d759666 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 29 Jan 2012 13:57:16 +0100 Subject: add the testcase i wrote for revno 2209.1.2, to ensure that breaks on not-installed versions are ignored while searching for breakage loops --- .../test-ordering-ignore-not-matching-breaks | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 test/integration/test-ordering-ignore-not-matching-breaks (limited to 'test') diff --git a/test/integration/test-ordering-ignore-not-matching-breaks b/test/integration/test-ordering-ignore-not-matching-breaks new file mode 100755 index 000000000..c9fca4edf --- /dev/null +++ b/test/integration/test-ordering-ignore-not-matching-breaks @@ -0,0 +1,56 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'unstable-mp' 'crda' 'i386,amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda +Multi-Arch: foreign' +insertpackage 'unstable-m' 'crda' 'i386,amd64' '1.1.1-1ubuntu4m' 'Multi-Arch: foreign' +insertpackage 'unstable-p' 'crda' 'i386,amd64' '1.1.1-1ubuntu4p' 'Provides: wireless-crda' +insertpackage 'unstable' 'wireless-crda' 'i386,amd64' '1.16' + + +insertinstalledpackage 'wireless-crda' 'amd64' '1.14' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + crda +0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. +Inst crda (1.1.1-1ubuntu4m unstable-m [amd64]) +Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + crda +0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. +Inst crda (1.1.1-1ubuntu4p unstable-p [amd64]) +Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + crda +0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. +Inst crda (1.1.1-1ubuntu4mp unstable-mp [amd64]) +Conf crda (1.1.1-1ubuntu4mp unstable-mp [amd64])' aptget install crda -s -t unstable-mp + +rm rootdir/var/lib/dpkg/status +insertinstalledpackage 'crda' 'amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda +Conflicts: wireless-crda (<< 1.15) +Replaces: wireless-crda ( << 1.15) +Multi-arch: foreign' + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + wireless-crda +0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. +Inst wireless-crda (1.16 unstable [amd64]) +Conf wireless-crda (1.16 unstable [amd64])' aptget install wireless-crda -s -t unstable -- cgit v1.2.3 From 9535a4db891b629dc17354171bce0a0f41e48d4a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 29 Jan 2012 15:25:02 +0100 Subject: * apt-pkg/depcache.cc: - if a M-A:same package is marked for reinstall, mark all it's installed silbings for reinstallation as well (LP: #859188) --- .../test-ubuntu-bug-859188-multiarch-reinstall | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/integration/test-ubuntu-bug-859188-multiarch-reinstall (limited to 'test') diff --git a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall new file mode 100755 index 000000000..0fdf97485 --- /dev/null +++ b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' 'armel' + +buildsimplenativepackage 'libsame' 'amd64,i386,armel' '1.0' 'unstable' 'Multi-Arch: same' + +# FIXME: hack around dpkg's current inability to handle multiarch, a clean install would be better… +insertinstalledpackage 'libsame' 'amd64,i386' '1.0' 'Multi-Arch: same' +sed -e 's#/installed#/unstable#' -e 's#Installed-Size: 42#Installed-Size: 1#' -i rootdir/var/lib/dpkg/status + +setupaptarchive + +REINSTALL='Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. +Inst libsame [1.0] (1.0 unstable [amd64]) +Inst libsame:i386 [1.0] (1.0 unstable [i386]) +Conf libsame (1.0 unstable [amd64]) +Conf libsame:i386 (1.0 unstable [i386])' + +testequal "$REINSTALL" aptget install --reinstall libsame -s +testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s +testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s +testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s -- cgit v1.2.3 From 017f9fd68258b15ac4df5ae73b19ba6653711022 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 30 Jan 2012 13:13:29 +0100 Subject: * apt-pkg/contrib/configuration.cc: - do not stop parent transversal in FindDir if the value is empty See http://lists.debian.org/deity/2012/01/msg00053.html , too. --- test/libapt/configuration_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc index 5b23d17fb..9a3e2c118 100644 --- a/test/libapt/configuration_test.cc +++ b/test/libapt/configuration_test.cc @@ -71,6 +71,15 @@ int main(int argc,const char *argv[]) { equals(Cnf.Find("APT2::Version", "33"), "33"); equals(Cnf.FindI("APT2::Version", 33), 33); + equals(Cnf.FindFile("Dir::State"), ""); + equals(Cnf.FindFile("Dir::Aptitude::State"), ""); + Cnf.Set("Dir", "/srv/sid"); + equals(Cnf.FindFile("Dir::State"), ""); + Cnf.Set("Dir::State", "var/lib/apt"); + Cnf.Set("Dir::Aptitude::State", "var/lib/aptitude"); + equals(Cnf.FindFile("Dir::State"), "/srv/sid/var/lib/apt"); + equals(Cnf.FindFile("Dir::Aptitude::State"), "/srv/sid/var/lib/aptitude"); + //FIXME: Test for configuration file parsing; // currently only integration/ tests test them implicitly -- cgit v1.2.3