From 53ea1b56efc41e6b1bea6157f01f90ac552db82e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 10 Feb 2012 15:56:50 +0100 Subject: Fix the testcases to work with and configure dpkg correctly in a multi-arch environment It's not a complete and the "fixed" test is fixed more like a hack as we have communication problems with dpkg if dpkg and APT disagree on the interpretation of the native architecture, see also: http://lists.debian.org/debian-dpkg/2012/02/msg00051.html --- test/integration/framework | 64 ++++++++++++++++------ .../test-bug-612099-multiarch-conflicts | 23 ++++++-- 2 files changed, 64 insertions(+), 23 deletions(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index d7526a100..9f741877a 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -114,9 +114,9 @@ addtrap() { setupenvironment() { TMPWORKINGDIRECTORY=$(mktemp -d) - local TESTDIR=$(readlink -f $(dirname $0)) + TESTDIRECTORY=$(readlink -f $(dirname $0)) msgninfo "Preparing environment for ${CCMD}$(basename $0)${CINFO} in ${TMPWORKINGDIRECTORY}… " - BUILDDIRECTORY="${TESTDIR}/../../build/bin" + BUILDDIRECTORY="${TESTDIRECTORY}/../../build/bin" test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" local OLDWORKINGDIRECTORY=$(pwd) addtrap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY;" @@ -126,25 +126,19 @@ setupenvironment() { mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d mkdir -p var/cache var/lib var/log mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers - local STATUSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/status-/' -e 's/^skip-/status-/') - if [ -f "${TESTDIR}/${STATUSFILE}" ]; then - cp "${TESTDIR}/${STATUSFILE}" var/lib/dpkg/status - else - touch var/lib/dpkg/status - fi touch var/lib/dpkg/available mkdir -p usr/lib/apt ln -s ${BUILDDIRECTORY}/methods usr/lib/apt/methods cd .. local PACKAGESFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Packages-/' -e 's/^skip-/Packages-/') - if [ -f "${TESTDIR}/${PACKAGESFILE}" ]; then - cp "${TESTDIR}/${PACKAGESFILE}" aptarchive/Packages + if [ -f "${TESTDIRECTORY}/${PACKAGESFILE}" ]; then + cp "${TESTDIRECTORY}/${PACKAGESFILE}" aptarchive/Packages fi local SOURCESSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Sources-/' -e 's/^skip-/Sources-/') - if [ -f "${TESTDIR}/${SOURCESSFILE}" ]; then - cp "${TESTDIR}/${SOURCESSFILE}" aptarchive/Sources + if [ -f "${TESTDIRECTORY}/${SOURCESSFILE}" ]; then + cp "${TESTDIRECTORY}/${SOURCESSFILE}" aptarchive/Sources fi - cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/ + cp $(find $TESTDIRECTORY -name '*.pub' -o -name '*.sec') keys/ ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf @@ -156,7 +150,9 @@ setupenvironment() { echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf - echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… + if ! $(which dpkg) --assert-multi-arch; then + echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… + fi echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf echo 'quiet::NoUpdate "true";' >> aptconfig.conf export LC_ALL=C @@ -177,6 +173,10 @@ getarchitecture() { fi } +getarchitectures() { + echo "$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" +} + configarchitecture() { local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf rm -f $CONFFILE @@ -186,6 +186,30 @@ configarchitecture() { echo "APT::Architectures:: \"$(getarchitecture $1)\";" >> $CONFFILE shift done + configdpkg +} + +configdpkg() { + if [ ! -e rootdir/var/lib/dpkg/status ]; then + local STATUSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/status-/' -e 's/^skip-/status-/') + if [ -f "${TESTDIRECTORY}/${STATUSFILE}" ]; then + cp "${TESTDIRECTORY}/${STATUSFILE}" rootdir/var/lib/dpkg/status + else + echo -n > rootdir/var/lib/dpkg/status + fi + fi + if $(which dpkg) --assert-multi-arch; then + local ARCHS="$(getarchitectures)" + if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then + DPKGARCH="$(dpkg --print-architecture)" + for ARCH in ${ARCHS}; do + if [ "${ARCH}" != "${DPKGARCH}" ]; then dpkg --add-architecture ${ARCH}; fi + done + if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then + insertinstalledpackage 'dpkg' "all" '1.16.2~wipmultiarch~fake' + fi + fi + fi } setupsimplenativepackage() { @@ -350,7 +374,7 @@ createaptftparchiveconfig() { local ARCHS="$(find pool/ -name '*.deb' | grep -oE '_[a-z0-9-]+\.deb$' | sort | uniq | sed -e '/^_all.deb$/ d' -e 's#^_\([a-z0-9-]*\)\.deb$#\1#' | tr '\n' ' ')" if [ -z "$ARCHS" ]; then # the pool is empty, so we will operate on faked packages - let us use the configured archs - ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" + ARCHS="$(getarchitectures)" fi echo -n 'Dir { ArchiveDir "' >> ftparchive.conf @@ -432,7 +456,7 @@ insertpackage() { local ARCHS="" for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do if [ "$arch" = "all" ]; then - ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" + ARCHS="$(getarchitectures)" else ARCHS="$arch" fi @@ -486,7 +510,8 @@ insertinstalledpackage() { local VERSION="$3" local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" - local FILE="rootdir/var/lib/dpkg/status" + local FILE='rootdir/var/lib/dpkg/status' + local INFO='rootdir/var/lib/dpkg/info' for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do echo "Package: $NAME Status: install ok installed @@ -502,6 +527,11 @@ Version: $VERSION" >> $FILE YOU did something horribly wrong! They are autogenerated und used only by testcases for APT and surf no other propose… " >> $FILE + if [ "$(dpkg-query -W --showformat='${Multi-Arch}')" = 'same' ]; then + echo -n > ${INFO}/${NAME}:${arch}.list + else + echo -n > ${INFO}/${NAME}.list + fi done } diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index dd9efb785..530012e5d 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -16,7 +16,7 @@ buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' setupaptarchive aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null -testdpkginstalled libc6 +testdpkginstalled libc6:i386 testequal 'Reading package lists... Building dependency tree... Reading state information... @@ -75,8 +75,13 @@ The following packages will be upgraded: 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Inst libc6 [1.0] (2.0 testing [all]) Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s -aptget upgrade -y -qq 2>&1 > /dev/null -testdpkginstalled libc6 +# FIXME: on amd64 systems this test wouldn't run with a real upgrade +# as APT (here i386) disagree about the native architecture, so +# we fake it here: +#aptget upgrade -y -qq 2>&1 > /dev/null +aptget purge libc6 -y -qq 2>&1 >/dev/null +aptget install libc6:i386 -y -qq 2>&1 >/dev/null +testdpkginstalled libc6:all testequal 'Reading package lists... Building dependency tree... @@ -125,7 +130,7 @@ buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-sa setupaptarchive aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null -testdpkginstalled libc6-same +testdpkginstalled libc6-same:i386 testequal 'Reading package lists... Building dependency tree... @@ -168,8 +173,14 @@ The following packages will be upgraded: 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Inst libc6-same [1.0] (2.0 testing [all]) Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s -aptget upgrade -y -qq 2>&1 > /dev/null -testdpkginstalled libc6-same +# FIXME: on amd64 systems this test wouldn't run with a real upgrade +# as APT (here i386) disagree about the native architecture, so +# we fake it here: +#aptget upgrade -y -qq 2>&1 > /dev/null +aptget purge libc6-same -y -qq 2>&1 >/dev/null +aptget install libc6-same:i386 -y -qq 2>&1 >/dev/null +testdpkginstalled libc6-same:all + testequal "Reading package lists... Building dependency tree... -- cgit v1.2.3 From 5834d7a103cb8b68cd6eb072b4b789ca679a2d71 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 11 Feb 2012 19:46:52 +0100 Subject: fix the hold-testcase as it has problems with 'foreign' operations --- ...ages-bug-64141-install-dependencies-for-on-hold | 42 ---------------------- test/integration/framework | 2 +- ...atus-bug-64141-install-dependencies-for-on-hold | 33 ----------------- ...test-bug-64141-install-dependencies-for-on-hold | 20 ++++++++--- 4 files changed, 16 insertions(+), 81 deletions(-) delete mode 100644 test/integration/Packages-bug-64141-install-dependencies-for-on-hold delete mode 100644 test/integration/status-bug-64141-install-dependencies-for-on-hold (limited to 'test/integration') diff --git a/test/integration/Packages-bug-64141-install-dependencies-for-on-hold b/test/integration/Packages-bug-64141-install-dependencies-for-on-hold deleted file mode 100644 index 7005fa4f4..000000000 --- a/test/integration/Packages-bug-64141-install-dependencies-for-on-hold +++ /dev/null @@ -1,42 +0,0 @@ -Package: apt -Priority: important -Section: admin -Installed-Size: 6048 -Maintainer: APT Development Team -Architecture: i386 -Version: 0.8.10 -Provides: libapt-pkg4.10 -Depends: libc6 (>= 2.10), libdb4.8 -Breaks: oldcrap -Filename: pool/main/a/apt/apt_0.8.10_i386.deb -Size: 2160758 -MD5sum: 5aa2234f7b91056d430669cddf6e6e50 -Description: Advanced front-end for dpkg - -Package: libc6 -Priority: required -Section: libs -Installed-Size: 9356 -Maintainer: GNU Libc Maintainers -Architecture: i386 -Source: eglibc -Version: 2.11.2-7 -Provides: glibc-2.11-1 -Filename: pool/main/e/eglibc/libc6_2.11.2-7_i386.deb -Size: 3880868 -MD5sum: c48fd2854fc62125824267d086600793 -Description: Embedded GNU C Library: Shared libraries - -Package: libdb4.8 -Priority: standard -Section: libs -Installed-Size: 1488 -Maintainer: Clint Adams -Architecture: i386 -Source: db4.8 -Version: 4.8.30-3 -Depends: libc6 (>= 2.3.6-6~) -Filename: pool/main/d/db4.8/libdb4.8_4.8.30-3_i386.deb -Size: 681988 -MD5sum: 0d58c15898a95436d2ec480aa22693ff -Description: Berkeley v4.8 Database Libraries [runtime] diff --git a/test/integration/framework b/test/integration/framework index 9f741877a..350ee112e 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -166,7 +166,7 @@ getarchitecture() { if [ -n "$ARCH" ]; then echo $ARCH else - dpkg-architecture -qDEB_BUILD_ARCH + dpkg --print-architecture fi else echo $1 diff --git a/test/integration/status-bug-64141-install-dependencies-for-on-hold b/test/integration/status-bug-64141-install-dependencies-for-on-hold deleted file mode 100644 index c82ebd19c..000000000 --- a/test/integration/status-bug-64141-install-dependencies-for-on-hold +++ /dev/null @@ -1,33 +0,0 @@ -Package: apt -Status: install ok installed -Priority: important -Section: admin -Installed-Size: 6048 -Maintainer: APT Development Team -Architecture: i386 -Version: 0.8.9 -Provides: libapt-pkg4.10 -Depends: libc6 (>= 2.3.4) -Description: Advanced front-end for dpkg - -Package: libc6 -Status: install ok installed -Priority: required -Section: libs -Installed-Size: 9356 -Maintainer: GNU Libc Maintainers -Architecture: i386 -Source: eglibc -Version: 2.3.5-7 -Provides: glibc-2.11-1 -Description: Embedded GNU C Library: Shared libraries - -Package: oldcrap -Status: install ok installed -Priority: extra -Section: oldlibs -Installed-Size: 1 -Maintainer: Joe Sixpack -Architecture: all -Version: 1-1 -Description: Old crappy nothing package diff --git a/test/integration/test-bug-64141-install-dependencies-for-on-hold b/test/integration/test-bug-64141-install-dependencies-for-on-hold index 4633ffcc3..e2d206fdd 100755 --- a/test/integration/test-bug-64141-install-dependencies-for-on-hold +++ b/test/integration/test-bug-64141-install-dependencies-for-on-hold @@ -4,7 +4,19 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +configarchitecture 'native' 'strange-arch' + +insertpackage 'unstable' 'unrelated' 'strange-arch' '1' + +insertinstalledpackage 'apt' 'native' '0.8.9' 'Depends: libc6 (>= 2.3.4)' +insertinstalledpackage 'libc6' 'native' '2.4.1-1' +insertinstalledpackage 'oldcrap' 'all' '1-1' + +insertpackage 'unstable' 'apt' 'native' '0.8.10' 'Depends: libc6 (>= 2.10), libdb4.8 +Breaks: oldcrap' +insertpackage 'unstable' 'libc6' 'native' '2.11.2-7' +insertpackage 'unstable' 'libdb4.8' 'native' '4.8.30-3' + setupaptarchive testequal 'Reading package lists... @@ -16,11 +28,10 @@ The following NEW packages will be installed: The following packages will be upgraded: apt libc6 2 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. -Need to get 0 B/6724 kB of archives. -After this operation, 1523 kB of additional disk space will be used. +After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -echo 'apt hold' | dpkg --set-selections +aptmark hold apt -qq testequal 'Reading package lists... Building dependency tree... @@ -29,6 +40,5 @@ The following packages have been kept back: The following packages will be upgraded: libc6 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. -Need to get 0 B/3881 kB of archives. After this operation, 0 B of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -o Test='hold-back-apt' -- cgit v1.2.3 From 8e3900d0d7efc11d538b944ed1d9e4e3d5286ff6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 18 Feb 2012 19:40:13 +0100 Subject: * apt-pkg/acquire-item.cc: - drop support for i18n/Index file (introduced in 0.8.11) and use the Release file instead to get the Translations (Closes: #649314) * ftparchive/writer.cc: - add 'Translation-*' to the default patterns i18n/Index was never used outside debian - and even here it isn't used consistently as only 'main' has such a file. As the Release file now includes the Translation-* files we therefore drop support for i18n/Index. A version supporting it was never part of a debian release and still supporting it would mean that we get 99% of the time a 404 as response to the request anyway and confuse archive maintainers who want to provide all files APT tries to acquire. --- test/integration/framework | 3 --- test/integration/test-bug-624218-Translation-file-handling | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 350ee112e..99088b59b 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -572,9 +572,6 @@ generatereleasefiles() { # both should be given in notation date/touch can understand msgninfo "\tGenerate Release files… " if [ -e aptarchive/dists ]; then - for dir in $(find ./aptarchive/dists -mindepth 3 -maxdepth 3 -type d -name 'i18n'); do - aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index - done for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do local SUITE="$(echo "$dir" | cut -d'/' -f 4)" local CODENAME="$(getcodenamefromsuite $SUITE)" diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling index a1e708d2e..d146b943c 100755 --- a/test/integration/test-bug-624218-Translation-file-handling +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -42,16 +42,9 @@ msgtest 'Download of nothing if none is forced' 'with Index' aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass rm -rf rootdir/var/lib/apt/lists -sed -i '/i18n\/Index$/ d' $(find aptarchive -name 'Release') +sed -i '/i18n\/Translation-.*$/ d' $(find aptarchive -name 'Release') signreleasefiles -# we have to try as not every archive includes the i18n Index in the Release file - if it has one at all -msgtest 'Download no Translation- if forced language is non-existent' 'with not-announced Index' -aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass -rm -rf rootdir/var/lib/apt/lists - -find aptarchive -name 'Index' -delete - msgtest 'Download of en as forced language' 'without Index' aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail rm -rf rootdir/var/lib/apt/lists -- cgit v1.2.3 From 0c73b84b001028338c0862c045c0cc4e6b191fcb Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 18 Feb 2012 20:44:31 +0100 Subject: * cmdline/apt-get.cc: - if a package can't be removed as it is not installed, suggest to the user an (installed) multiarch silbing with 'Did you mean?' --- .../test-suggest-installed-multiarch-silbing | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 test/integration/test-suggest-installed-multiarch-silbing (limited to 'test/integration') diff --git a/test/integration/test-suggest-installed-multiarch-silbing b/test/integration/test-suggest-installed-multiarch-silbing new file mode 100755 index 000000000..ca6d7bd2e --- /dev/null +++ b/test/integration/test-suggest-installed-multiarch-silbing @@ -0,0 +1,66 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' 'armel' + +insertinstalledpackage 'foo' 'i386' '1' +insertpackage 'unstable' 'foo' 'amd64,i386' '1' + +insertinstalledpackage 'foo2' 'i386' '1' +insertpackage 'unstable' 'foo2' 'i386' '1' + +insertinstalledpackage 'foo3' 'amd64' '1' +insertpackage 'unstable' 'foo3' 'amd64,i386' '1' + +insertinstalledpackage 'samefoo' 'i386,amd64' '1' 'Multi-Arch: same' +insertpackage 'unstable' 'samefoo' 'amd64,i386,armel' '1' 'Multi-Arch: same' + +insertinstalledpackage 'samefoo2' 'i386' '1' 'Multi-Arch: same' +insertpackage 'unstable' 'samefoo2' 'amd64,i386,armel' '1' 'Multi-Arch: same' + +setupaptarchive + +testequal "Reading package lists... +Building dependency tree... +Package 'foo' is not installed, so not removed. Did you mean 'foo:i386'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove foo -s + +testequal "Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + foo2:i386 +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv foo2:i386 [1]" aptget remove foo2 -s + +testequal "Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + foo3 +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv foo3 [1]" aptget remove foo3 -s + +testequal "Reading package lists... +Building dependency tree... +Package 'foo3:i386' is not installed, so not removed. Did you mean 'foo3'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove foo3:i386 -s + +testequalor2 "Reading package lists... +Building dependency tree... +Package 'samefoo:armel' is not installed, so not removed. Did you mean 'samefoo'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." "Reading package lists... +Building dependency tree... +Package 'samefoo:armel' is not installed, so not removed. Did you mean 'samefoo:i386'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo:armel -s + +testequal "Reading package lists... +Building dependency tree... +Package 'samefoo2' is not installed, so not removed. Did you mean 'samefoo2:i386'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo2 -s + +testequal "Reading package lists... +Building dependency tree... +Package 'samefoo2:armel' is not installed, so not removed. Did you mean 'samefoo2:i386'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo2:armel -s -- cgit v1.2.3 From ca5e41fdced7a5566b07dfc2d6adc67d74fa2d93 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 18 Feb 2012 21:20:57 +0100 Subject: improve 'error' message for packages which are only referenced e.g. in a Depends line and are now requested for removal --- test/integration/test-suggest-installed-multiarch-silbing | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-suggest-installed-multiarch-silbing b/test/integration/test-suggest-installed-multiarch-silbing index ca6d7bd2e..d55d250aa 100755 --- a/test/integration/test-suggest-installed-multiarch-silbing +++ b/test/integration/test-suggest-installed-multiarch-silbing @@ -21,6 +21,10 @@ insertpackage 'unstable' 'samefoo' 'amd64,i386,armel' '1' 'Multi-Arch: same' insertinstalledpackage 'samefoo2' 'i386' '1' 'Multi-Arch: same' insertpackage 'unstable' 'samefoo2' 'amd64,i386,armel' '1' 'Multi-Arch: same' +insertinstalledpackage 'mozplugger' 'i386' '1' 'Depends: iceweasel | fireweasel' +insertinstalledpackage 'fireweasel' 'i386' '1' +insertpackage 'unstable' 'mozplugger' 'i386,amd64' '1' 'Depends: iceweasel | fireweasel' + setupaptarchive testequal "Reading package lists... @@ -64,3 +68,13 @@ testequal "Reading package lists... Building dependency tree... Package 'samefoo2:armel' is not installed, so not removed. Did you mean 'samefoo2:i386'? 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo2:armel -s + +testequal "Reading package lists... +Building dependency tree... +Package 'iceweasel' is not installed, so not removed +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove iceweasel -s + +testequal "Reading package lists... +Building dependency tree... +Package 'fireweasel' is not installed, so not removed. Did you mean 'fireweasel:i386'? +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove fireweasel:amd64 -s -- cgit v1.2.3 From c2ef3ce3748cc31e3431d3beb00153546a5e50c0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 27 Feb 2012 12:51:31 +0100 Subject: fix the string in the testcases --- test/integration/test-bug-549968-install-depends-of-not-installed | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed index 78c0801f2..8c434b3ce 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -14,13 +14,13 @@ setupaptarchive # We check the Markers here as the autoremove nuker will also # prevent it, but to late - its better to fail earlier -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1 Ignore MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) as its mode (Keep) is protected -Package extracoolstuff is not installed, so not removed +Package 'extracoolstuff' is not installed, so not removed The following NEW packages will be installed: coolstuff 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst coolstuff (1.0 unstable [all]) -Conf coolstuff (1.0 unstable [all])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s +Conf coolstuff (1.0 unstable [all])" aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s -- cgit v1.2.3 From d73840dc51fe0762e0d170c47e07e13211a0de95 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 3 Mar 2012 11:40:22 +0100 Subject: allow msgtest to be used with only one parameter --- test/integration/framework | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 99088b59b..a738d27cc 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -29,7 +29,8 @@ 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 + shift + if [ -n "$1" ]; then shift; else break; fi done echo -n "…${CNORMAL} " >&2; } -- cgit v1.2.3 From 440d3d654a5f85e8b5c0472e91f425fbac9541b8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 3 Mar 2012 11:43:21 +0100 Subject: * apt-pkg/packagemanager.cc: - do not try to a void a breaks if the broken package pre-depends on the breaker, but let dpkg auto-deconfigure it --- .../skip-avoid-avoiding-breaks-predepends | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/integration/skip-avoid-avoiding-breaks-predepends (limited to 'test/integration') 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 -- cgit v1.2.3 From 43c1ca5d1eb8101e3a52d19a2175c14817e6dd14 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 3 Mar 2012 11:44:06 +0100 Subject: testcase for CVE-2012-0214 --- test/integration/test-releasefile-verification | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 8bf02a78f..4f65cfa3b 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -153,6 +153,35 @@ runtest() { installaptold } +runtest2() { + prepare ${PKGFILE} + rm -rf rootdir/var/lib/apt/lists + signreleasefiles 'Joe Sixpack' + msgtest 'Cold archive signed by' 'Joe Sixpack' + aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass + + # New .deb but now an unsigned archive. For example MITM to circumvent + # package verification. + prepare ${PKGFILE}-new + find aptarchive/ -name InRelease -delete + find aptarchive/ -name Release.gpg -delete + msgtest 'Warm archive signed by' 'nobody' + aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass + testequal "$(cat ${PKGFILE}-new) +" aptcache show apt + failaptnew + + # Unsigned archive from the beginning must also be detected. + rm -rf rootdir/var/lib/apt/lists + msgtest 'Cold archive signed by' 'nobody' + aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass + testequal "$(cat ${PKGFILE}-new) +" aptcache show apt + failaptnew +} +runtest2 + + DELETEFILE="InRelease" runtest DELETEFILE="Release.gpg" -- cgit v1.2.3 From a02f0c29d9dcda7a1973e52db032c1eb50f11ed2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 12 Mar 2012 19:02:57 +0100 Subject: now that the package name 'apt' is a magic word enabling essential status for said package i can't use it anymore in the testcase, so use another name --- test/integration/test-pin-non-existent-package | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/integration') 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 -- cgit v1.2.3 From 670cf3542be6a079d6288c36d3b6a14877f8b5f9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 12 Mar 2012 19:29:59 +0100 Subject: improve the testcode so that we do not depend on the order of unpacking of specific packages as long as the order is okay in general --- .../test-bug-618288-multiarch-same-lockstep | 42 +++++++++------------- 1 file changed, 17 insertions(+), 25 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep index 7333054cc..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 [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ] -Inst libsame:i386 [1] (2 unstable [i386]) [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 -- cgit v1.2.3 From 90436124e1957f685673f0926a3cd8edc6d2fcdf Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 12 Mar 2012 19:30:48 +0100 Subject: ensure that the fullname of a package is displayed in the debug output --- test/integration/test-conflicts-loop | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop index 7b5724d74..233077ef5 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -20,14 +20,14 @@ 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 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]) -- cgit v1.2.3 From 98ee49227a1f1669306cbfc1b15c5243ed13cc8a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Mar 2012 12:39:05 +0100 Subject: recheck dependencies in SmartUnpack after a change, too --- test/integration/test-conflicts-loop | 1 + 1 file changed, 1 insertion(+) (limited to 'test/integration') diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop index 233077ef5..25f005969 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -28,6 +28,7 @@ Remv openjdk-6-jre [6b16-1.8-0ubuntu1] 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: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]) -- cgit v1.2.3 From 9a3798e6d5c26ebdaf1f865f5117bbc995b69b76 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Mar 2012 13:34:47 +0100 Subject: now that stdout/stdlog are used consistently, the message order changed --- test/integration/test-conflicts-loop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop index 25f005969..4407fbd9d 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -19,10 +19,10 @@ testequal 'Reading package lists... 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: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 +3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Remv openjdk-6-jre [6b16-1.8-0ubuntu1] openjdk-6-jre-headless:i386 conflicts with openjdk-6-jre-lib:i386 Remv openjdk-6-jre-lib [6b16-1.8-0ubuntu1] -- cgit v1.2.3 From 05343a22b8c7d9b491e93169e035a996ff68af9f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 20 Mar 2012 17:03:35 +0100 Subject: update the versionnumber of the faked dpkg in the testcases for multiarch and add a comment about the need of this number --- test/integration/framework | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index a738d27cc..fa4a98f58 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -207,7 +207,9 @@ configdpkg() { if [ "${ARCH}" != "${DPKGARCH}" ]; then dpkg --add-architecture ${ARCH}; fi done if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then - insertinstalledpackage 'dpkg' "all" '1.16.2~wipmultiarch~fake' + # dpkg doesn't really check the version as long as it is fully installed, + # but just to be sure we choose one above the required version + insertinstalledpackage 'dpkg' "all" '1.16.2+fake' fi fi fi -- cgit v1.2.3 From de3786516df8b0fec2f759a16bbbc4b8605c1856 Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Thu, 5 Apr 2012 12:03:37 +0200 Subject: * cmdline/apt-get.cc: - distinguish information about 'apt-get autoremove' based on the number of auto-removed packages both before and after the list of packages (Closes: #665833) --- test/integration/test-bug-604222-new-and-autoremove | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index 2875d547a..5820fb0dc 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -16,7 +16,7 @@ Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libvtk5.4 -Use 'apt-get autoremove' to remove them. +Use 'apt-get autoremove' to remove it. The following NEW packages will be installed: libavcodec52 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. @@ -28,7 +28,7 @@ Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libvtk5.4 -Use 'apt-get autoremove' to remove them. +Use 'apt-get autoremove' to remove it. The following extra packages will be installed: libavcodec52 libopenal-dev libvtk5.4 The following NEW packages will be installed: -- cgit v1.2.3 From 8bcbc69451bfb00977c16fdb03662c844f6e861e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 Apr 2012 11:57:48 +0200 Subject: use xz-utils in the testcases instead of lzma and ensure that we really ignore the presents (or absence) of lzma if we decided to use xz --- test/integration/framework | 2 +- .../test-bug-595691-empty-and-broken-archive-files | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index fa4a98f58..0670d6a78 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -558,7 +558,7 @@ buildaptarchivefromfiles() { msgninfo "\t${line} file… " cat ${line} | gzip > ${line}.gz cat ${line} | bzip2 > ${line}.bz2 - cat ${line} | lzma > ${line}.lzma + cat ${line} | xz --format=lzma > ${line}.lzma cat ${line} | xz > ${line}.xz msgdone "info" done diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index bb1ac0e54..63883b380 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -28,10 +28,10 @@ testaptgetupdate() { createemptyarchive() { find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete if [ "en" = "$1" ]; then - echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS + echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS fi touch aptarchive/Packages - echo -n "" | $COMPRESSOR > aptarchive/${1}.$COMPRESS + echo -n "" | $COMPRESSOR_CMD > aptarchive/${1}.$COMPRESS generatereleasefiles signreleasefiles rm -f aptarchive/Packages @@ -40,7 +40,7 @@ createemptyarchive() { createemptyfile() { find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete if [ "en" = "$1" ]; then - echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS + echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS fi touch aptarchive/Packages aptarchive/${1}.$COMPRESS generatereleasefiles @@ -50,6 +50,7 @@ createemptyfile() { setupcompressor() { COMPRESSOR="$1" + COMPRESSOR_CMD="$1" case $COMPRESSOR in gzip) COMPRESS="gz";; bzip2) COMPRESS="bz2";; @@ -66,10 +67,13 @@ Dir::Bin::xz \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor elif [ -e "/usr/bin/${COMPRESSOR}" ]; then echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor + elif [ "${COMPRESSOR}" = 'lzma' ]; then + echo "Dir::Bin::xz \"/usr/bin/xz\";" >> rootdir/etc/apt/apt.conf.d/00compressor + COMPRESSOR_CMD='xz --format=lzma' else msgtest "Test for availability of compressor" "${COMPRESSOR}" msgfail - exit 1 + #exit 1 fi } -- cgit v1.2.3 From fdfdba56b128acf59b40edfdde0dd95fdd9c4439 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 Apr 2012 12:12:24 +0200 Subject: * cmdline/apt-get.cc: - print list of autoremoves in alphabetical order (Closes: #639008) --- test/integration/test-bug-613420-new-garbage-dependency | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency index 34cf38cbc..7a08871ca 100755 --- a/test/integration/test-bug-613420-new-garbage-dependency +++ b/test/integration/test-bug-613420-new-garbage-dependency @@ -22,7 +22,7 @@ testequal "Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: - openoffice.org-officebean libreoffice-officebean + libreoffice-officebean openoffice.org-officebean Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libreoffice-core libreoffice-officebean openoffice.org-officebean -- cgit v1.2.3 From 3b4d8136e78b9f2a70431ece4c850861d90e8bb1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 Apr 2012 12:36:32 +0200 Subject: fix the remaining lzma calls with xz --format=lzma in the testcases --- test/integration/test-hashsum-verification | 2 +- test/integration/test-pdiff-usage | 2 +- test/integration/test-releasefile-verification | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-hashsum-verification b/test/integration/test-hashsum-verification index 3ac9eccfb..99ea8bffa 100755 --- a/test/integration/test-hashsum-verification +++ b/test/integration/test-hashsum-verification @@ -23,7 +23,7 @@ prepare() { find aptarchive -name 'Release' -delete cat aptarchive/Packages | gzip > aptarchive/Packages.gz cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2 - cat aptarchive/Packages | lzma > aptarchive/Packages.lzma + cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma # create Release file with incorret checksums cat > aptarchive/Release < aptarchive/Packages.gz cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2 -cat aptarchive/Packages | lzma > aptarchive/Packages.lzma +cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma rm -rf aptarchive/Packages.diff mkdir -p aptarchive/Packages.diff PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 4f65cfa3b..d3ea91de5 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -24,7 +24,7 @@ prepare() { find aptarchive -name 'Release' -delete cat aptarchive/Packages | gzip > aptarchive/Packages.gz cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2 - cat aptarchive/Packages | lzma > aptarchive/Packages.lzma + cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma generatereleasefiles "$DATE" } -- cgit v1.2.3 From a12d5352927c7d3a2fe66a90fc7794b4a8e596ad Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 12 Apr 2012 12:23:57 +0200 Subject: merged r1972 from lp:~paolorotolo/apt/fix-for-967393 --- test/integration/test-disappearing-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index 0e0e9618d..d2ac4edc6 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -39,7 +39,7 @@ COMPAREFILE=$(mktemp) echo "The following package disappeared from your system as all files have been overwritten by other packages: old-pkg -Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE +Note: This is done automatically and on purpose by dpkg." > $COMPAREFILE $CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass || msgfail rm $COMPAREFILE -- cgit v1.2.3 From c204d1482e085f5453c0d99ee5a9a8e99ca90e38 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 17 Apr 2012 23:45:52 +0200 Subject: ensure that not --assert-multi-arch supporting dpkg's do not generate output in the testcases by redirecting to /dev/null --- test/integration/framework | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 0670d6a78..b80b02922 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -151,7 +151,7 @@ setupenvironment() { echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf - if ! $(which dpkg) --assert-multi-arch; then + if ! $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… fi echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf @@ -199,7 +199,7 @@ configdpkg() { echo -n > rootdir/var/lib/dpkg/status fi fi - if $(which dpkg) --assert-multi-arch; then + if $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then local ARCHS="$(getarchitectures)" if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then DPKGARCH="$(dpkg --print-architecture)" -- cgit v1.2.3 From 04d24dbdcc2eabf616b26878084d3b8790e30086 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Apr 2012 10:29:02 +0200 Subject: ignore the order used for the 'apt' package as long as it is valid either way --- ...-ubuntu-bug-835625-multiarch-lockstep-installed-first | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first index a9a4069cf..269038d0f 100755 --- a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first +++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first @@ -14,7 +14,7 @@ insertpackage 'unstable' 'apt' 'i386' '2' 'Depends: libsame (= 2)' setupaptarchive -testequal 'Reading package lists... +testequalor2 'Reading package lists... Building dependency tree... The following extra packages will be installed: apt:i386 libsame:i386 @@ -28,4 +28,18 @@ Inst libsame (2 unstable [amd64]) [apt:i386 ] Conf libsame:i386 (2 unstable [i386]) [apt:i386 ] Conf libsame (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 extra packages will be installed: + apt:i386 libsame:i386 +The following NEW packages will be installed: + libsame +The following packages will be upgraded: + apt:i386 libsame:i386 +2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt:i386 [1] (2 unstable [i386]) [] +Inst libsame:i386 [1] (2 unstable [i386]) +Inst libsame (2 unstable [amd64]) +Conf libsame:i386 (2 unstable [i386]) +Conf libsame (2 unstable [amd64]) Conf apt:i386 (2 unstable [i386])' aptget install libsame:amd64 -s -- cgit v1.2.3 From f0633b216cd019ac0c508a46440943c91f07f65d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Apr 2012 22:41:25 +0200 Subject: add a very simple testcase for the lp#985852 fix in the previous commit --- ...-ubuntu-bug-985852-pre-depends-or-group-ordering | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering (limited to 'test/integration') diff --git a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering new file mode 100755 index 000000000..462acad00 --- /dev/null +++ b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'custom' 'amd64' '1.0' 'Pre-Depends: grub-pc | grub' +insertinstalledpackage 'grub' 'amd64' '1.0' +insertpackage 'unstable' 'custom' 'amd64' '2.0' 'Pre-Depends: grub-pc | grub' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + custom +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst custom [1.0] (2.0 unstable [amd64]) +Conf custom (2.0 unstable [amd64])' aptget dist-upgrade -s -- cgit v1.2.3 From e6a12579e9e5d5735eda450cf2bb3986d828ab65 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Apr 2012 10:13:17 +0200 Subject: * apt-pkg/cacheset.cc: - actually return to the fallback modifier if we have detected we should for packagenames which look like modifiers (Closes: #669591) --- test/integration/test-bug-593360-modifiers-in-names | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names index 83a3cfabf..74826cbdb 100755 --- a/test/integration/test-bug-593360-modifiers-in-names +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -15,6 +15,11 @@ The following NEW packages will be installed: Inst g++ (4:4.4.5-1 localhost [i386]) Conf g++ (4:4.4.5-1 localhost [i386])' aptget install g++ -s +testequal "Reading package lists... +Building dependency tree... +Package 'g++' is not installed, so not removed +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove g++ -s + testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: -- cgit v1.2.3 From 074da0970c68879d548b6b4f64d0da7f38151248 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 23 Apr 2012 17:46:11 +0200 Subject: * apt-pkg/depcache.cc: - clearly separate 'positive' and 'negative' dependencies and their upgrade-resolution tries in MarkInstall and especially don't treat Conflicts differently compared to Breaks here --- .../test-ignore-provides-if-versioned-breaks | 150 +++++++++++++++++++++ .../test-ignore-provides-if-versioned-conflicts | 150 +++++++++++++++++++++ 2 files changed, 300 insertions(+) create mode 100755 test/integration/test-ignore-provides-if-versioned-breaks create mode 100755 test/integration/test-ignore-provides-if-versioned-conflicts (limited to 'test/integration') diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks new file mode 100755 index 000000000..f8b4544a0 --- /dev/null +++ b/test/integration/test-ignore-provides-if-versioned-breaks @@ -0,0 +1,150 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' 'amd64' + +insertpackage 'unstable' 'unrlated' 'all' '1.0' + +insertinstalledpackage 'foo' 'i386' '2.0' +insertpackage 'unstable' 'foo' 'i386' '4.0' +insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo' +insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Breaks: foo (<< 3.0)' +insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Breaks: foo (<< 2.0)' +insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Breaks: foo' + +insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign' +insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Breaks: foo-foreign (<< 3.0)' +insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Breaks: foo-foreign (<< 2.0)' +insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Breaks: foo-foreign' + +insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same' +insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Breaks: foo-same (<< 3.0)' +insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Breaks: foo-same (<< 2.0)' +insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Breaks: foo-same' + + + +setupaptarchive + +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-breaker-none : Breaks: foo +E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-breaker-2 foo-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-breaker-2 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo-breaker-2 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + foo-breaker-3 foo-provider +The following packages will be upgraded: + foo +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo [2.0] (4.0 unstable [i386]) +Inst foo-breaker-3 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo (4.0 unstable [i386]) +Conf foo-breaker-3 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -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-foreign-breaker-none : Breaks: foo-foreign +E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-foreign-breaker-2 foo-foreign-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-foreign-breaker-2 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign-breaker-2 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-foreign:amd64 +The following NEW packages will be installed: + foo-foreign-breaker-3 foo-foreign-provider +The following packages will be upgraded: + foo-foreign:amd64 +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64]) +Inst foo-foreign-breaker-3 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign:amd64 (4.0 unstable [amd64]) +Conf foo-foreign-breaker-3 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -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-same-breaker-none : Breaks: foo-same +E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-same-breaker-2 foo-same-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-same-breaker-2 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-2 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-same:amd64 foo-same +The following NEW packages will be installed: + foo-same-breaker-3 foo-same-provider +The following packages will be upgraded: + foo-same:amd64 foo-same +2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ] +Inst foo-same [2.0] (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) +Conf foo-same (4.0 unstable [i386]) +Inst foo-same-breaker-3 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +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 new file mode 100755 index 000000000..44eafcff1 --- /dev/null +++ b/test/integration/test-ignore-provides-if-versioned-conflicts @@ -0,0 +1,150 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' 'amd64' + +insertpackage 'unstable' 'unrlated' 'all' '1.0' + +insertinstalledpackage 'foo' 'i386' '2.0' +insertpackage 'unstable' 'foo' 'i386' '4.0' +insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo' +insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Conflicts: foo (<< 3.0)' +insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Conflicts: foo (<< 2.0)' +insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Conflicts: foo' + +insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign' +insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Conflicts: foo-foreign (<< 3.0)' +insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Conflicts: foo-foreign (<< 2.0)' +insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Conflicts: foo-foreign' + +insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same' +insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Conflicts: foo-same (<< 3.0)' +insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Conflicts: foo-same (<< 2.0)' +insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Conflicts: foo-same' + + + +setupaptarchive + +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-breaker-none : Conflicts: foo +E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-breaker-2 foo-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-breaker-2 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo-breaker-2 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + foo-breaker-3 foo-provider +The following packages will be upgraded: + foo +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo [2.0] (4.0 unstable [i386]) +Inst foo-breaker-3 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo (4.0 unstable [i386]) +Conf foo-breaker-3 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -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-foreign-breaker-none : Conflicts: foo-foreign +E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-foreign-breaker-2 foo-foreign-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-foreign-breaker-2 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign-breaker-2 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-foreign:amd64 +The following NEW packages will be installed: + foo-foreign-breaker-3 foo-foreign-provider +The following packages will be upgraded: + foo-foreign:amd64 +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64]) +Inst foo-foreign-breaker-3 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign:amd64 (4.0 unstable [amd64]) +Conf foo-foreign-breaker-3 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -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-same-breaker-none : Conflicts: foo-same +E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-same-breaker-2 foo-same-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-same-breaker-2 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-2 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-same:amd64 foo-same +The following NEW packages will be installed: + foo-same-breaker-3 foo-same-provider +The following packages will be upgraded: + foo-same:amd64 foo-same +2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ] +Inst foo-same [2.0] (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) +Conf foo-same (4.0 unstable [i386]) +Inst foo-same-breaker-3 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +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 -- cgit v1.2.3 From 3fa950f16cb2997bccd97475f75c5f3e37609dd3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 10 May 2012 18:47:51 +0200 Subject: add a small wrapper to call gdb in the framework setting --- test/integration/framework | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index b80b02922..5a0e1070f 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -107,6 +107,10 @@ aptitude() { LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* fi } +gdb() { + echo "gdb: run »$*«" + APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1 +} addtrap() { CURRENTTRAP="$CURRENTTRAP $1" -- cgit v1.2.3 From 57194e03a40d2ff323588acb8353eef2b881e5b2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 14 May 2012 18:07:34 +0200 Subject: adapt manual testcase to check redirects of dists/, too --- test/integration/skip-bug-602412-dequote-redirect | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'test/integration') diff --git a/test/integration/skip-bug-602412-dequote-redirect b/test/integration/skip-bug-602412-dequote-redirect index a63d36246..689b671ce 100755 --- a/test/integration/skip-bug-602412-dequote-redirect +++ b/test/integration/skip-bug-602412-dequote-redirect @@ -19,18 +19,20 @@ echo "server.modules = ( \"mod_redirect\" ) server.document-root = \"$(readlink -f ./aptarchive)\" server.port = 8080 server.stat-cache-engine = \"disable\" -url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\" )" > lighttpd.conf +url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\", + \"^/dists/(.*)$\" => \"/newdists/\$1\" )" > lighttpd.conf mv aptarchive/pool aptarchive/newpool +mv aptarchive/dists aptarchive/newdists + lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid' lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null & addtrap "kill $!;" -local APTARCHIVE="file://$(readlink -f ./aptarchive)" +APTARCHIVE="file://$(readlink -f ./aptarchive)" for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" done -aptget update -qq || msgdie 'apt-get update failed' -aptget install unrelated --download-only -qq || msgdie 'downloading package failed' - +aptget update || msgdie 'apt-get update failed' +aptget install unrelated --download-only || msgdie 'downloading package failed' -- cgit v1.2.3 From 65f9983436be310c768c4c42531ceea1e3a6d4ac Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 16 May 2012 16:44:15 +0200 Subject: * cmdline/apt-get.cc: - use the host architecture, not the build architecture for matching of [architecture restrictions] in Build-Depends (Closes: #672927) * --- .../test-bug-632221-cross-dependency-satisfaction | 66 ++++++++++++++-------- 1 file changed, 42 insertions(+), 24 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction index 30df48604..a128366c5 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -18,8 +18,10 @@ insertpackage 'unstable' 'libfwibble-dev' 'amd64,armel' '1.0' 'Depends: libfwibb 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' +insertpackage 'unstable' 'arm-stuff' 'armel' '1.0' +insertpackage 'unstable' 'linux-stuff' 'amd64,armel' '1.0' -insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev' +insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-arm] | linux-stuff [ linux-any]' setupaptarchive @@ -27,7 +29,8 @@ testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1 -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + linux-stuff +0 upgraded, 9 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]) @@ -36,6 +39,7 @@ 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]) +Inst linux-stuff (1.0 unstable [amd64]) Conf amdboot (1.0 unstable [amd64]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) @@ -43,15 +47,17 @@ Conf foreigner (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) 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 +Conf libfwibble-dev (1.0 unstable [amd64]) +Conf linux-stuff (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 - libfwibble-dev:armel libfwibble1:armel -0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. + amdboot arm-stuff:armel cool doxygen foreigner libc6 libc6:armel libc6-dev + libc6-dev:armel libfwibble-dev:armel libfwibble1:armel +0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Inst amdboot (1.0 unstable [amd64]) +Inst arm-stuff:armel (1.0 unstable [armel]) Inst cool (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst foreigner (1.0 unstable [amd64]) @@ -62,6 +68,7 @@ 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 arm-stuff:armel (1.0 unstable [armel]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf foreigner (1.0 unstable [amd64]) @@ -77,10 +84,11 @@ 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 libfwibble-dev - libfwibble1 -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + amdboot:amd64 arm-stuff cool doxygen foreigner libc6 libc6-dev + libfwibble-dev libfwibble1 +0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) +Inst arm-stuff (1.0 unstable [armel]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst foreigner (1.0 unstable [armel]) @@ -89,6 +97,7 @@ 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 arm-stuff (1.0 unstable [armel]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf foreigner (1.0 unstable [armel]) @@ -101,8 +110,8 @@ 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 libfwibble-dev:amd64 libfwibble1:amd64 -0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. + libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64 +0 upgraded, 11 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]) @@ -113,6 +122,7 @@ 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]) +Inst linux-stuff:amd64 (1.0 unstable [amd64]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) @@ -122,7 +132,8 @@ Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [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 +Conf libfwibble-dev:amd64 (1.0 unstable [amd64]) +Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64 configarchitecture 'amd64' 'armel' @@ -132,28 +143,31 @@ insertinstalledpackage 'foreigner' 'armel' '0.5' testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: - amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 -0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. + amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 linux-stuff +0 upgraded, 7 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]) +Inst linux-stuff (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]) Conf libfwibble1 (1.0 unstable [amd64]) -Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s +Conf libfwibble-dev (1.0 unstable [amd64]) +Conf linux-stuff (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 + amdboot arm-stuff:armel doxygen libc6 libc6:armel libc6-dev libc6-dev:armel libfwibble-dev:armel libfwibble1:armel -0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. +0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded. Inst amdboot (1.0 unstable [amd64]) +Inst arm-stuff:armel (1.0 unstable [armel]) Inst doxygen (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [amd64]) Inst libc6:armel (1.0 unstable [armel]) @@ -162,6 +176,7 @@ 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 arm-stuff:armel (1.0 unstable [armel]) Conf doxygen (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf libc6:armel (1.0 unstable [armel]) @@ -178,10 +193,12 @@ 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 libfwibble-dev libfwibble1 -0 upgraded, 7 newly installed, 1 to remove and 1 not upgraded. + amdboot:amd64 arm-stuff cool doxygen libc6 libc6-dev libfwibble-dev + libfwibble1 +0 upgraded, 8 newly installed, 1 to remove and 1 not upgraded. Remv cool:amd64 [0.5] Inst amdboot:amd64 (1.0 unstable [amd64]) +Inst arm-stuff (1.0 unstable [armel]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst libc6 (1.0 unstable [armel]) @@ -189,6 +206,7 @@ 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 arm-stuff (1.0 unstable [armel]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf libc6 (1.0 unstable [armel]) @@ -200,8 +218,8 @@ 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 - libfwibble-dev:amd64 libfwibble1:amd64 -0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. + libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64 +0 upgraded, 9 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]) @@ -210,6 +228,7 @@ 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]) +Inst linux-stuff: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]) @@ -217,6 +236,5 @@ Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [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 - - +Conf libfwibble-dev:amd64 (1.0 unstable [amd64]) +Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64 -- cgit v1.2.3 From 177645edb5775337ccf6d3971835a122b12318d4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 19 May 2012 23:07:30 +0200 Subject: * apt-pkg/packagemanager.cc: - do not run into loop on new-pre-depends-breaks (Closes: #673536) --- .../test-673536-pre-depends-breaks-loop | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 test/integration/test-673536-pre-depends-breaks-loop (limited to 'test/integration') diff --git a/test/integration/test-673536-pre-depends-breaks-loop b/test/integration/test-673536-pre-depends-breaks-loop new file mode 100755 index 000000000..e9d3c4de6 --- /dev/null +++ b/test/integration/test-673536-pre-depends-breaks-loop @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'native' + +buildsimplenativepackage 'basic' 'native' '1' 'stable' +buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common' +buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)' + +setupaptarchive + +# we check with 'real' packages here as the simulation reports a 'Conf broken' +# which is technical correct for the simulation, but testing errormsg is ugly + +aptget install basic=1 -qq > /dev/null +testdpkginstalled basic +testdpkgnotinstalled common + +aptget dist-upgrade -qq > /dev/null +testdpkginstalled basic common -- cgit v1.2.3