From 5cf733e18af40fbed978ec84e60ccd0ffc1871d8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 3 Feb 2011 22:48:37 +0100 Subject: remove duplicated config-option setting and rename testdpkgnotinstalled --- test/integration/framework | 7 +++---- test/integration/test-autoremove | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index fe1db14bc..e79d312ca 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -137,7 +137,6 @@ setupenvironment() { echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf echo "Dir::Bin::Methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf - echo "Dir::Bin::methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf echo "DPKG::options:: \"dpkg\";" >> aptconfig.conf echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf @@ -634,9 +633,9 @@ testdpkginstalled() { msgpass } -testdpkgnoninstalled() { - msgtest "Test for correctly non-installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^u]' | wc -l)" +testdpkgnotinstalled() { + msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*" + local PKGS="$(dpkg -l $* 2> /dev/null | grep '^[a-z]' | grep '^[^u]' | wc -l)" if [ "$PKGS" != 0 ]; then echo dpkg -l $* | grep '^[a-z]' diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index 1ca325b29..f1ce4e9e7 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-autoremove @@ -19,7 +19,7 @@ Architecture: i386 Auto-Installed: 1 ' aptget remove debhelper -y -qq 2>&1 > /dev/null -testdpkgnoninstalled 'debhelper' +testdpkgnotinstalled 'debhelper' testdpkginstalled 'po-debconf unrelated' echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove @@ -42,7 +42,7 @@ testdpkginstalled "po-debconf" rm rootdir/etc/apt/apt.conf.d/00autoremove aptget autoremove -y -qq 2>&1 > /dev/null -testdpkgnoninstalled 'po-debconf' +testdpkgnotinstalled 'po-debconf' testfileequal 'rootdir/var/lib/apt/extended_states' '' -- cgit v1.2.3 From 87bc1c45de94da47587d8e0314e9087f33a2b89e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 3 Feb 2011 23:25:41 +0100 Subject: check that the right amount of packages is installed if multiple passed in --- test/integration/framework | 6 +++--- test/integration/test-autoremove | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index e79d312ca..3aa80db23 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -623,8 +623,8 @@ testnopackage() { testdpkginstalled() { msgtest "Test for correctly installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^i]' | wc -l)" - if [ "$PKGS" != 0 ]; then + local PKGS="$(dpkg -l $* | grep '^i' | wc -l)" + if [ "$PKGS" != $# ]; then echo $PKGS dpkg -l $* | grep '^[a-z]' msgfail @@ -635,7 +635,7 @@ testdpkginstalled() { testdpkgnotinstalled() { msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* 2> /dev/null | grep '^[a-z]' | grep '^[^u]' | wc -l)" + local PKGS="$(dpkg -l $* 2> /dev/null | grep '^i' | wc -l)" if [ "$PKGS" != 0 ]; then echo dpkg -l $* | grep '^[a-z]' diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index f1ce4e9e7..9dfab19f5 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-autoremove @@ -20,7 +20,7 @@ Auto-Installed: 1 ' aptget remove debhelper -y -qq 2>&1 > /dev/null testdpkgnotinstalled 'debhelper' -testdpkginstalled 'po-debconf unrelated' +testdpkginstalled 'po-debconf' 'unrelated' echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove testequal 'Reading package lists... -- cgit v1.2.3 From eb76e936982bd65ebd6a147c1c23ef2613891367 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 3 Feb 2011 23:25:53 +0100 Subject: test various situation with and without autobit setting --- test/integration/test-bug-611729-mark-as-manual | 105 ++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100755 test/integration/test-bug-611729-mark-as-manual (limited to 'test') diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual new file mode 100755 index 000000000..9c1cd3d1b --- /dev/null +++ b/test/integration/test-bug-611729-mark-as-manual @@ -0,0 +1,105 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable" + +buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b" +buildsimplenativepackage "b" "all" "1.0" "stable" +buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b" + +setupaptarchive + +# dpkg freaks out if the last package is removed so keep one around +aptget install peace-dpkg -y -qq 2>&1 > /dev/null +testdpkginstalled peace-dpkg +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +aptget install a -y -qq 2>&1 > /dev/null +testdpkginstalled a b +testdpkgnotinstalled c +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +aptget remove a -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a c +testdpkginstalled b +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +aptget install c -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a +testdpkginstalled b c +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +b is already the newest version. +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +b is already the newest version. +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +aptget install b --reinstall -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a +testdpkginstalled b c +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 1 +' + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +b is already the newest version. +b set to manually installed. +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b +Architecture: i386 +Auto-Installed: 0 +' + +aptget remove b -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a b c +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +aptget install a b -y -qq 2>&1 > /dev/null +testdpkginstalled a b +testdpkgnotinstalled c +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +aptget purge a b -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a b c +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +aptget install b c -y -qq 2>&1 > /dev/null +testdpkgnotinstalled a +testdpkginstalled b c +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +aptget install a -y -qq 2>&1 > /dev/null +testdpkginstalled a b c +testfileequal 'rootdir/var/lib/apt/extended_states' '' -- cgit v1.2.3 From 6a910c9db4d450241a57f61b2d3d3e302bb9c11c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 11:32:55 +0100 Subject: allow conflicts in the same group again (Closes: #612099) --- test/integration/framework | 2 +- .../test-bug-612099-multiarch-conflicts | 209 +++++++++++++++++++++ 2 files changed, 210 insertions(+), 1 deletion(-) create mode 100755 test/integration/test-bug-612099-multiarch-conflicts (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 3aa80db23..d91599f1b 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -267,7 +267,7 @@ Package: $NAME" > ${BUILDDIR}/debian/control (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$ARCH) (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums) - dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. > /dev/null + dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. 2> /dev/null > /dev/null echo "pool/${NAME}_${VERSION}_${ARCH}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist for SRC in $SRCS; do echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts new file mode 100755 index 000000000..caac75db4 --- /dev/null +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -0,0 +1,209 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" "amd64" + +buildsimplenativepackage 'peace-dpkg' 'all' '1.0' 'stable' + +buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable' +buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable' +buildsimplenativepackage 'libc6' 'all' '2.0' 'testing' + +buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6' +buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' + +setupaptarchive + +aptget install peace-dpkg:i386 -y -qq 2>&1 > /dev/null +testdpkginstalled peace-dpkg + +aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null +testdpkginstalled libc6 +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + libc6:amd64 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv libc6 [1.0] +Inst libc6:amd64 (1.0 stable [amd64]) +Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar (1.0 stable [i386]) +Conf foobar (1.0 stable [i386])' aptget install foobar -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6:amd64 +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + foobar:amd64 libc6:amd64 +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv libc6 [1.0] +Inst libc6:amd64 (1.0 stable [amd64]) +Inst foobar:amd64 (1.0 stable [amd64]) +Conf libc6:amd64 (1.0 stable [amd64]) +Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable + +# FIXME: libc6:i386 is installed, we are switching to libc6:all +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6 +The following NEW packages will be installed: + foobar libc6 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 (2.0 testing, testing [all]) +Inst foobar (1.0 stable [i386]) +Conf libc6 (2.0 testing, testing [all]) +Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing + +# FIXME: libc6:i386 is installed, we are switching to libc6:all +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 (2.0 testing, testing [all]) +Conf libc6 (2.0 testing, testing [all])' aptget upgrade -t testing -s +aptget upgrade -y -qq 2>&1 > /dev/null +testdpkginstalled libc6 + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar (1.0 stable [i386]) [] +Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar:amd64 (1.0 stable [amd64]) +Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing + + +# FIXME: the display is a strange (its a downgrade), but the handling itself correct +testequal "Reading package lists... +Building dependency tree... +Reading state information... +Selected version '1.0' (stable [i386]) for 'libc6' +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + libc6 +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv libc6 [2.0] +Inst libc6 (1.0 stable [i386]) +Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0 + + +buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing' + +buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same' +buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same' + +setupaptarchive + +aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null +testdpkginstalled libc6-same + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same (1.0 stable [i386]) +Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6-same:amd64 +The following NEW packages will be installed: + foobar-same:amd64 libc6-same:amd64 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same:amd64 (1.0 stable [amd64]) +Inst foobar-same:amd64 (1.0 stable [amd64]) +Conf libc6-same:amd64 (1.0 stable [amd64]) +Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6-same:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same:amd64 (1.0 stable [amd64]) +Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable + +# FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently + +# FIXME: upgrade any to all as above +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same (2.0 testing, testing [all]) +Conf libc6-same (2.0 testing, testing [all])' aptget upgrade -t testing -s +aptget upgrade -y -qq 2>&1 > /dev/null +testdpkginstalled libc6-same + +# FIXME: the display is a strange (its a downgrade), but the handling itself correct +testequal "Reading package lists... +Building dependency tree... +Reading state information... +Selected version '1.0' (stable [i386]) for 'libc6-same' +The following packages will be REMOVED: + libc6-same +The following NEW packages will be installed: + libc6-same +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv libc6-same [2.0] +Inst libc6-same (1.0 stable [i386]) +Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0 + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same (1.0 stable [i386]) [] +Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same:amd64 (1.0 stable [amd64]) +Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing -- cgit v1.2.3 From bea417121247afe00cdd4ba13215544d5b5d3262 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 13:08:43 +0100 Subject: always do removes first and set not installed remove packages on hold to prevent temporary installation later (Closes: #549968) --- ...est-bug-549968-install-depends-of-not-installed | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 test/integration/test-bug-549968-install-depends-of-not-installed (limited to 'test') diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed new file mode 100755 index 000000000..864dd340a --- /dev/null +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'libc6' 'all' '1.0' +insertpackage 'unstable' 'coolstuff' 'all' '1.0' 'Recommends: extracoolstuff' +insertpackage 'unstable' 'extracoolstuff' 'all' '1.0' 'Depends: libc6' + +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... +Building dependency tree... + MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1 + Hold prevents MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) FU=0 +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 -- cgit v1.2.3 From 1384504286b7923a85d6235ba6f8e2eb4766d967 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 14:38:01 +0100 Subject: test changelogs locally instead of depending on an online service --- test/integration/framework | 3 +++ test/integration/test-changelog | 34 +++++++++++++--------------------- 2 files changed, 16 insertions(+), 21 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index d91599f1b..e10709079 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -272,6 +272,9 @@ Package: $NAME" > ${BUILDDIR}/debian/control for SRC in $SRCS; do echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist done + mkdir -p ${BUILDDIR}/../${NAME}_${VERSION} + cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}/ + cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}.changelog rm -rf "${BUILDDIR}" msgdone "info" } diff --git a/test/integration/test-changelog b/test/integration/test-changelog index 292df6e32..f05279356 100755 --- a/test/integration/test-changelog +++ b/test/integration/test-changelog @@ -7,28 +7,20 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" -# this will be valid until ubuntu lucid is EOL (04/2015) -pkgchangelogtest="Package: apt -Architecture: i386 -Version: 0.7.25.3ubuntu7 -Filename: pool/main/a/apt/apt_0.7.25.3ubuntu7_i386.deb -Section: admin -" -cat <<-EOF >aptarchive/Packages -$pkgchangelogtest -EOF +buildsimplenativepackage 'apt' 'all' '1.0' 'stable' setupaptarchive +changetowebserver +aptget update -qq -echo "Apt::Changelogs::Server \"http://changelogs.ubuntu.com/\";" >> ./aptconfig.conf -msgnmsg "apt-get changelog: " -aptget changelog apt -qq > downloaded-changelog -expected="apt (0.7.25.3ubuntu7) lucid; urgency=low" -got="$(head -n1 downloaded-changelog)" -if [ -s downloaded-changelog ] && [ "$got" = "$expected" ]; then - msgpass -else - msgfail - msgwarn "$got != $expected" -fi +echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf +aptget changelog apt -qq > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm aptarchive/pool/apt_1.0/changelog + +aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm aptarchive/pool/apt_1.0.changelog + +testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' -- cgit v1.2.3 From fcb144b91a91ef9b6016ede0be05e07dacc8aaf9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 14:55:11 +0100 Subject: implement --print-uris support for changelog command --- test/integration/test-changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/integration/test-changelog b/test/integration/test-changelog index f05279356..b5c204a53 100755 --- a/test/integration/test-changelog +++ b/test/integration/test-changelog @@ -15,6 +15,8 @@ aptget update -qq echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf +testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris + aptget changelog apt -qq > apt.changelog testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" rm aptarchive/pool/apt_1.0/changelog -- cgit v1.2.3 From 72dd5bec06d8d50ff9e8022e36a7d8a6f0cfd7a0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 17:30:06 +0100 Subject: implement download-only for changelog command which downloads the changelog to the file $PKGNAME.changelog in the current directory --- test/integration/test-changelog | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-changelog b/test/integration/test-changelog index b5c204a53..0a80cc08c 100755 --- a/test/integration/test-changelog +++ b/test/integration/test-changelog @@ -19,10 +19,18 @@ testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt aptget changelog apt -qq > apt.changelog testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" -rm aptarchive/pool/apt_1.0/changelog +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm apt.changelog aptarchive/pool/apt_1.0/changelog aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" -rm aptarchive/pool/apt_1.0.changelog +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm apt.changelog aptarchive/pool/apt_1.0.changelog testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' -- cgit v1.2.3 From 42d41ddbcb8238add82609badd1fbb16f54c4077 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 17:54:49 +0100 Subject: implement --print-uris for download command --- test/integration/test-apt-get-download | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 test/integration/test-apt-get-download (limited to 'test') diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download new file mode 100755 index 000000000..7db93c32f --- /dev/null +++ b/test/integration/test-apt-get-download @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage 'apt' 'all' '1.0' 'stable' +buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' + +setupaptarchive + +testdownload() { + msgtest 'Test download of package file' $1 + if [ -z "$3" ]; then + aptget download ${2} + else + aptget download ${2}/${3} + fi + test -f $1 && msgpass || msgfail +} + +testdownload apt_1.0_all.deb apt stable +testdownload apt_2.0_all.deb apt + +DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb" +testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) sha256:$(sha256sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris -- cgit v1.2.3 From cfe35dbc01015c6927193fd5da02eaabd753989a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 17:57:06 +0100 Subject: rename changelog and autoremove testfile to indicate better what is tested --- test/integration/test-apt-get-autoremove | 55 ++++++++++++++++++++++++++++++++ test/integration/test-apt-get-changelog | 36 +++++++++++++++++++++ test/integration/test-autoremove | 55 -------------------------------- test/integration/test-changelog | 36 --------------------- 4 files changed, 91 insertions(+), 91 deletions(-) create mode 100755 test/integration/test-apt-get-autoremove create mode 100755 test/integration/test-apt-get-changelog delete mode 100755 test/integration/test-autoremove delete mode 100755 test/integration/test-changelog (limited to 'test') diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove new file mode 100755 index 000000000..9dfab19f5 --- /dev/null +++ b/test/integration/test-apt-get-autoremove @@ -0,0 +1,55 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +buildsimplenativepackage 'unrelated' 'all' '1' 'unstable' +buildsimplenativepackage 'po-debconf' 'all' '1.0.16' 'unstable' +buildsimplenativepackage 'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf' +setupaptarchive + +aptget install unrelated debhelper -qq 2>&1 > /dev/null +testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' + +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf +Architecture: i386 +Auto-Installed: 1 +' +aptget remove debhelper -y -qq 2>&1 > /dev/null +testdpkgnotinstalled 'debhelper' +testdpkginstalled 'po-debconf' 'unrelated' + +echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + po-debconf +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv po-debconf [1.0.16]' aptget autoremove -s +testdpkginstalled 'po-debconf' + +echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkginstalled 'po-debconf' + +echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkginstalled "po-debconf" + +rm rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkgnotinstalled 'po-debconf' + +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' +testfileequal 'rootdir/var/log/apt/history.log' ' +Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) + +Remove: debhelper:i386 (8.0.0) + +Remove: po-debconf:i386 (1.0.16)' diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog new file mode 100755 index 000000000..0a80cc08c --- /dev/null +++ b/test/integration/test-apt-get-changelog @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage 'apt' 'all' '1.0' 'stable' + +setupaptarchive +changetowebserver +aptget update -qq + +echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf + +testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris + +aptget changelog apt -qq > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm apt.changelog aptarchive/pool/apt_1.0/changelog + +aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm apt.changelog aptarchive/pool/apt_1.0.changelog + +testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove deleted file mode 100755 index 9dfab19f5..000000000 --- a/test/integration/test-autoremove +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'i386' - -buildsimplenativepackage 'unrelated' 'all' '1' 'unstable' -buildsimplenativepackage 'po-debconf' 'all' '1.0.16' 'unstable' -buildsimplenativepackage 'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf' -setupaptarchive - -aptget install unrelated debhelper -qq 2>&1 > /dev/null -testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' - -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf -Architecture: i386 -Auto-Installed: 1 -' -aptget remove debhelper -y -qq 2>&1 > /dev/null -testdpkgnotinstalled 'debhelper' -testdpkginstalled 'po-debconf' 'unrelated' - -echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -testequal 'Reading package lists... -Building dependency tree... -Reading state information... -The following packages will be REMOVED: - po-debconf -0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. -Remv po-debconf [1.0.16]' aptget autoremove -s -testdpkginstalled 'po-debconf' - -echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkginstalled 'po-debconf' - -echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkginstalled "po-debconf" - -rm rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkgnotinstalled 'po-debconf' - -testfileequal 'rootdir/var/lib/apt/extended_states' '' - -sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -testfileequal 'rootdir/var/log/apt/history.log' ' -Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) - -Remove: debhelper:i386 (8.0.0) - -Remove: po-debconf:i386 (1.0.16)' diff --git a/test/integration/test-changelog b/test/integration/test-changelog deleted file mode 100755 index 0a80cc08c..000000000 --- a/test/integration/test-changelog +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework - -setupenvironment -configarchitecture "i386" - -buildsimplenativepackage 'apt' 'all' '1.0' 'stable' - -setupaptarchive -changetowebserver -aptget update -qq - -echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf - -testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris - -aptget changelog apt -qq > apt.changelog -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" -rm apt.changelog - -aptget changelog apt -d -qq -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" -rm apt.changelog aptarchive/pool/apt_1.0/changelog - -aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" -rm apt.changelog - -aptget changelog apt -d -qq -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" -rm apt.changelog aptarchive/pool/apt_1.0.changelog - -testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' -- cgit v1.2.3 From 8f3853baea6191788da6befb437e92ba246c86a3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 21:42:36 +0100 Subject: * apt-pkg/contrib/error.cc: - remove 400 char size limit of error messages (LP: #365611) --- test/integration/test-ubuntu-bug-365611-long-package-names | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 test/integration/test-ubuntu-bug-365611-long-package-names (limited to 'test') diff --git a/test/integration/test-ubuntu-bug-365611-long-package-names b/test/integration/test-ubuntu-bug-365611-long-package-names new file mode 100755 index 000000000..28b55df3b --- /dev/null +++ b/test/integration/test-ubuntu-bug-365611-long-package-names @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +aptget install $(for i in $(seq 0 1000); do echo -n 'a'; done) 2> longpackagename.log > /dev/null || true +testfileequal 'longpackagename.log' "E: Unable to locate package $(for i in $(seq 0 1000); do echo -n 'a'; done)" -- cgit v1.2.3 From ec7f904e7ea1b0b8aaefbbb202ced9e19292dd76 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 10 Feb 2011 18:10:14 +0100 Subject: use apt-mark instead of hand-mangling with the extended_states file --- test/integration/framework | 14 +++++++ test/integration/test-apt-get-autoremove | 8 +--- .../integration/test-bug-604222-new-and-autoremove | 6 +-- test/integration/test-bug-611729-mark-as-manual | 47 ++++++---------------- test/integration/test-disappearing-packages | 4 +- 5 files changed, 34 insertions(+), 45 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index e10709079..11d9a9659 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -79,6 +79,7 @@ aptcache() { runapt apt-cache $*; } aptget() { runapt apt-get $*; } aptftparchive() { runapt apt-ftparchive $*; } aptkey() { runapt apt-key $*; } +aptmark() { runapt apt-mark $*; } dpkg() { $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $* } @@ -647,3 +648,16 @@ testdpkgnotinstalled() { fi msgpass } + +testmarkedauto() { + local COMPAREFILE=$(mktemp) + addtrap "rm $COMPAREFILE;" + if [ -n "$1" ]; then + msgtest 'Test for correctly marked as auto-installed' "$*" + while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE + else + msgtest 'Test for correctly marked as auto-installed' 'no package' + echo > $COMPAREFILE + fi + aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail +} diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove index 9dfab19f5..c25ce3f58 100755 --- a/test/integration/test-apt-get-autoremove +++ b/test/integration/test-apt-get-autoremove @@ -14,10 +14,7 @@ setupaptarchive aptget install unrelated debhelper -qq 2>&1 > /dev/null testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'po-debconf' aptget remove debhelper -y -qq 2>&1 > /dev/null testdpkgnotinstalled 'debhelper' testdpkginstalled 'po-debconf' 'unrelated' @@ -43,8 +40,7 @@ testdpkginstalled "po-debconf" rm rootdir/etc/apt/apt.conf.d/00autoremove aptget autoremove -y -qq 2>&1 > /dev/null testdpkgnotinstalled 'po-debconf' - -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' testfileequal 'rootdir/var/log/apt/history.log' ' diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index fa6dcdc70..9187dd1cd 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -7,9 +7,9 @@ setupenvironment configarchitecture "i386" setupaptarchive -echo 'Package: libvtk5.4 -Auto-Installed: 1 -Architecture: i386' > rootdir/var/lib/apt/extended_states +touch rootdir/var/lib/apt/extended_states +aptmark markauto 'libvtk5.4' +testmarkedauto 'libvtk5.4' testequal "Reading package lists... Building dependency tree... diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual index 9c1cd3d1b..4e3e2fa0b 100755 --- a/test/integration/test-bug-611729-mark-as-manual +++ b/test/integration/test-bug-611729-mark-as-manual @@ -17,59 +17,41 @@ setupaptarchive # dpkg freaks out if the last package is removed so keep one around aptget install peace-dpkg -y -qq 2>&1 > /dev/null testdpkginstalled peace-dpkg -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto aptget install a -y -qq 2>&1 > /dev/null testdpkginstalled a b testdpkgnotinstalled c -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' aptget remove a -y -qq 2>&1 > /dev/null testdpkgnotinstalled a c testdpkginstalled b -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' aptget install c -y -qq 2>&1 > /dev/null testdpkgnotinstalled a testdpkginstalled b c -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' testequal 'Reading package lists... Building dependency tree... Reading state information... b is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' testequal 'Reading package lists... Building dependency tree... Reading state information... b is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' aptget install b --reinstall -y -qq 2>&1 > /dev/null testdpkgnotinstalled a testdpkginstalled b c -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 1 -' +testmarkedauto 'b' testequal 'Reading package lists... Building dependency tree... @@ -77,29 +59,26 @@ Reading state information... b is already the newest version. b set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b -Architecture: i386 -Auto-Installed: 0 -' +testmarkedauto aptget remove b -y -qq 2>&1 > /dev/null testdpkgnotinstalled a b c -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto aptget install a b -y -qq 2>&1 > /dev/null testdpkginstalled a b testdpkgnotinstalled c -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto aptget purge a b -y -qq 2>&1 > /dev/null testdpkgnotinstalled a b c -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto aptget install b c -y -qq 2>&1 > /dev/null testdpkgnotinstalled a testdpkginstalled b c -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto aptget install a -y -qq 2>&1 > /dev/null testdpkginstalled a b c -testfileequal 'rootdir/var/lib/apt/extended_states' '' +testmarkedauto diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index 12d215d7a..b5d565c2f 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -31,7 +31,7 @@ setupaptarchive aptget install old-pkg=1.0 --trivial-only -qq 2>&1 > /dev/null -testfileequal "rootdir/var/lib/apt/extended_states" "" # old-pkg is manual installed +testmarkedauto # old-pkg is manual installed local CMD="aptget dist-upgrade -y -q=0" msgtest "Test for equality of" "$CMD" @@ -51,4 +51,4 @@ Install: new-pkg:i386 (2.0, automatic) Upgrade: old-pkg:i386 (1.0, 2.0) Disappeared: old-pkg (1.0)" -testfileequal "rootdir/var/lib/apt/extended_states" "" # new-pkg should have get the manual flag from old-pkg +testmarkedauto # new-pkg should have get the manual flag from old-pkg -- cgit v1.2.3 From fdbe726599ae4dd3d808858356cf3464de94f1e4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Feb 2011 17:47:50 +0100 Subject: * apt-pkg/depcache.cc: - mark a package which was requested to be installed on commandline always as manual regardless if it is already marked or not as the marker could be lost later by the removal of rdepends (Closes: #612557) --- test/integration/status-bug-612557-garbage-upgrade | 34 ++++++++++++ test/integration/test-bug-612557-garbage-upgrade | 60 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 test/integration/status-bug-612557-garbage-upgrade create mode 100755 test/integration/test-bug-612557-garbage-upgrade (limited to 'test') diff --git a/test/integration/status-bug-612557-garbage-upgrade b/test/integration/status-bug-612557-garbage-upgrade new file mode 100644 index 000000000..7403d8cca --- /dev/null +++ b/test/integration/status-bug-612557-garbage-upgrade @@ -0,0 +1,34 @@ +Package: python-uno +Status: install ok installed +Priority: optional +Section: python +Installed-Size: 2032 +Maintainer: Debian OpenOffice Team +Architecture: i386 +Source: openoffice.org +Version: 1:3.2.1-11+squeeze2 +Description: Python-UNO bridge + +Package: openoffice.org-common +Status: install ok installed +Priority: optional +Section: editors +Installed-Size: 48356 +Maintainer: Debian OpenOffice Team +Architecture: all +Source: openoffice.org +Version: 1:3.2.1-11+squeeze2 +Description: office productivity suite -- arch-independent files + +Package: openoffice.org-emailmerge +Status: install ok installed +Priority: optional +Section: editors +Installed-Size: 1652 +Maintainer: Debian OpenOffice Team +Architecture: all +Source: openoffice.org +Version: 1:3.2.1-11+squeeze2 +Replaces: python-uno (<< 1:2.4.1-5) +Pre-Depends: python-uno, openoffice.org-common +Description: office productivity suite -- email mail merge diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade new file mode 100755 index 000000000..e2ffe615f --- /dev/null +++ b/test/integration/test-bug-612557-garbage-upgrade @@ -0,0 +1,60 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'unrelated' 'all' '1:3.3.0-2' +insertpackage 'unstable' 'python-uno' 'all' '1:3.3.0-2' 'Depends: libreoffice-common' +insertpackage 'unstable' 'libreoffice-common' 'all' '1:3.3.0-2' 'Conflicts: openoffice.org-common' + +setupaptarchive + +touch rootdir/var/lib/apt/extended_states +aptmark markauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy +#aptmark unmarkauto openoffice.org-emailmerge +testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libreoffice-common +The following packages will be REMOVED: + openoffice.org-common openoffice.org-emailmerge +The following NEW packages will be installed: + libreoffice-common +The following packages will be upgraded: + python-uno +1 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +After this operation, 53.2 MB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget --trivial-only install python-uno + +aptmark markauto openoffice.org-emailmerge +testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy openoffice.org-emailmerge + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libreoffice-common +The following packages will be REMOVED: + openoffice.org-common openoffice.org-emailmerge +The following NEW packages will be installed: + libreoffice-common +The following packages will be upgraded: + python-uno +1 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +After this operation, 53.2 MB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget --trivial-only install python-uno + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + openoffice.org-common openoffice.org-emailmerge python-uno +0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. +After this operation, 53.3 MB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget autoremove --trivial-only -- cgit v1.2.3 From 38f297033faa099a0705c8f66964d8c5d7927c8d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 Feb 2011 14:04:06 +0100 Subject: * apt-pkg/contrib/error.cc: - ensure that va_list is not invalid in second try --- test/libapt/globalerror_test.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'test') diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index b2752255f..7d933f5a8 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -2,6 +2,7 @@ #include "assert.h" #include +#include int main(int argc,char *argv[]) { @@ -73,5 +74,36 @@ int main(int argc,char *argv[]) equals(text, "A Warning"); equals(_error->empty(), true); + errno = 0; + equals(_error->Errno("errno", "%s horrible %s %d times", "Something", "happend", 2), false); + equals(_error->empty(), false); + equals(_error->PendingError(), true); + equals(_error->PopMessage(text), true); + equals(_error->PendingError(), false); + equals(text, "Something horrible happend 2 times - errno (0: Success)"); + equals(_error->empty(), true); + + std::string longText; + for (size_t i = 0; i < 500; ++i) + longText.append("a"); + equals(_error->Error("%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")); + + 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(_error->Warning("Репозиторий не обновлён и будут %d %s", 4, "test"), false); + equals(_error->PopMessage(text), false); + equals(text, "Репозиторий не обновлён и будут 4 test"); + + longText.clear(); + for (size_t i = 0; i < 50; ++i) + longText.append("РезийбёбAZ"); + equals(_error->Warning(longText.c_str()), false); + equals(_error->PopMessage(text), false); + equals(text, longText); + return 0; } -- cgit v1.2.3 From adee3bae782f5b7d83819bf92ab419663ef4ee64 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 15 Feb 2011 16:04:46 +0100 Subject: test/integration/: remove a bunch of "local" statements from the shellscript, keep tests running even on failure but log failures --- test/integration/create-test-data | 2 +- test/integration/run-tests | 9 ++++++++- test/integration/test-bug-254770-segfault-if-cache-not-buildable | 2 +- test/integration/test-bug-330162-encoded-tar-header | 2 +- test/integration/test-bug-593360-modifiers-in-names | 2 +- test/integration/test-bug-601961-install-info | 2 +- test/integration/test-bug-604222-new-and-autoremove | 2 +- test/integration/test-bug-604401-files-are-directories | 2 +- test/integration/test-bug-605394-versioned-or-groups | 2 +- test/integration/test-bug-612557-garbage-upgrade | 2 +- test/integration/test-release-candidate-switching | 2 +- test/integration/test-ubuntu-bug-365611-long-package-names | 2 +- 12 files changed, 19 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/integration/create-test-data b/test/integration/create-test-data index 581b62910..effbe1ea3 100755 --- a/test/integration/create-test-data +++ b/test/integration/create-test-data @@ -6,7 +6,7 @@ if [ -z "$1" -o -z "$2" ]; then exit 1 fi -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework BUILDDIRECTORY="${TESTDIR}/../../build/bin" diff --git a/test/integration/run-tests b/test/integration/run-tests index 7314e6b61..edac07dbf 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -1,6 +1,7 @@ #!/bin/sh set -e +FAIL=0 DIR=$(readlink -f $(dirname $0)) if [ "$1" = "-q" ]; then export MSGLEVEL=2 @@ -13,8 +14,14 @@ for testcase in $(run-parts --list $DIR | grep '/test-'); do else echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" fi - ${testcase} + if ! ${testcase}; then + FAIL=$((FAIL+1)) + echo "$(basename $testcase) ... FAIL" + fi if [ "$1" = "-q" ]; then echo fi done + +echo "failures: $FAIL" +exit $FAIL diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable index 25c564daa..b9f45b131 100755 --- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable +++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-330162-encoded-tar-header b/test/integration/test-bug-330162-encoded-tar-header index fa01e0379..b3fae6bac 100755 --- a/test/integration/test-bug-330162-encoded-tar-header +++ b/test/integration/test-bug-330162-encoded-tar-header @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names index c12503b0d..83a3cfabf 100755 --- a/test/integration/test-bug-593360-modifiers-in-names +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info index b91bf3615..914910597 100755 --- a/test/integration/test-bug-601961-install-info +++ b/test/integration/test-bug-601961-install-info @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index 9187dd1cd..2875d547a 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-604401-files-are-directories b/test/integration/test-bug-604401-files-are-directories index 917fb106f..aae717a19 100755 --- a/test/integration/test-bug-604401-files-are-directories +++ b/test/integration/test-bug-604401-files-are-directories @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-605394-versioned-or-groups b/test/integration/test-bug-605394-versioned-or-groups index 0d7ad77f6..0f09d2927 100755 --- a/test/integration/test-bug-605394-versioned-or-groups +++ b/test/integration/test-bug-605394-versioned-or-groups @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade index e2ffe615f..3112e618c 100755 --- a/test/integration/test-bug-612557-garbage-upgrade +++ b/test/integration/test-bug-612557-garbage-upgrade @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index 5736945ab..b6dbe99db 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-ubuntu-bug-365611-long-package-names b/test/integration/test-ubuntu-bug-365611-long-package-names index 28b55df3b..894c8dc97 100755 --- a/test/integration/test-ubuntu-bug-365611-long-package-names +++ b/test/integration/test-ubuntu-bug-365611-long-package-names @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" -- cgit v1.2.3 From c8b9897314d24f97047b6a86573b5e9063c7c4d3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 Feb 2011 20:47:04 +0100 Subject: * cmdline/apt-get.cc: - don't remove new dependencies of garbage packages (Closes: #613420) --- .../status-bug-613420-new-garbage-dependency | 22 +++++++++++++ .../test-bug-613420-new-garbage-dependency | 37 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 test/integration/status-bug-613420-new-garbage-dependency create mode 100755 test/integration/test-bug-613420-new-garbage-dependency (limited to 'test') diff --git a/test/integration/status-bug-613420-new-garbage-dependency b/test/integration/status-bug-613420-new-garbage-dependency new file mode 100644 index 000000000..166a3930f --- /dev/null +++ b/test/integration/status-bug-613420-new-garbage-dependency @@ -0,0 +1,22 @@ +Package: openoffice.org-officebean +Status: install ok installed +Priority: optional +Section: java +Installed-Size: 1656 +Maintainer: Debian OpenOffice Team +Architecture: i386 +Source: openoffice.org +Version: 1:3.2.1-11+squeeze2 +Depends: openoffice.org-core (= 1:3.2.1-11+squeeze2) +Description: office productivity suite -- Java bean + +Package: openoffice.org-core +Status: install ok installed +Priority: optional +Section: editors +Installed-Size: 121724 +Maintainer: Debian OpenOffice Team +Architecture: i386 +Source: openoffice.org +Version: 1:3.2.1-11+squeeze2 +Description: office productivity suite -- arch-dependent files diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency new file mode 100755 index 000000000..34cf38cbc --- /dev/null +++ b/test/integration/test-bug-613420-new-garbage-dependency @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'libreoffice' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core' +insertpackage 'unstable' 'libreoffice-core' 'all' '1:3.3.1~rc1-2' 'Conflicts: openoffice.org-core' +insertpackage 'unstable' 'libreoffice-officebean' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core' +insertpackage 'unstable' 'openoffice.org-officebean' 'all' '1:3.3.0-5' 'Depends: libreoffice-officebean' + + +setupaptarchive + +touch rootdir/var/lib/apt/extended_states +aptmark markauto openoffice.org-officebean +testmarkedauto openoffice.org-officebean + +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 +Use 'apt-get autoremove' to remove them. +The following extra packages will be installed: + libreoffice-core libreoffice-officebean openoffice.org-officebean +The following packages will be REMOVED: + openoffice.org-core +The following NEW packages will be installed: + libreoffice libreoffice-core libreoffice-officebean +The following packages will be upgraded: + openoffice.org-officebean +1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded. +After this operation, 126 MB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only -- cgit v1.2.3 From bc33e0f0b6b1fdb010dcd4a49a78b827530052aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 Feb 2011 12:50:47 +0100 Subject: * ftparchive/multicompress.cc, apt-inst/deb/debfile.cc: - support xz compressor to create xz-compressed Indexes and be able to open data.tar.xz files --- test/integration/framework | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 2422f0886..6545cf3ce 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -251,9 +251,9 @@ createaptftparchiveconfig() { echo -n '"; }; Default { - Packages::Compress ". gzip bzip2 lzma"; - Sources::Compress ". gzip bzip2 lzma"; - Contents::Compress ". gzip bzip2 lzma"; + Packages::Compress ". gzip bzip2 lzma xz"; + Sources::Compress ". gzip bzip2 lzma xz"; + Contents::Compress ". gzip bzip2 lzma xz"; }; TreeDefault { Directory "pool/"; @@ -332,6 +332,7 @@ buildaptarchivefromfiles() { cat Packages | gzip > Packages.gz cat Packages | bzip2 > Packages.bz2 cat Packages | lzma > Packages.lzma + cat Packages | xz > Packages.xz msgdone "info" fi if [ -f Sources ]; then @@ -339,6 +340,7 @@ buildaptarchivefromfiles() { cat Sources | gzip > Sources.gz cat Sources | bzip2 > Sources.bz2 cat Sources | lzma > Sources.lzma + cat Sources | xz > Sources.xz msgdone "info" fi msgninfo "\tRelease file… " -- cgit v1.2.3 From 79d5bab6801dd2efd2758da800d20a0758b45aae Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 Feb 2011 18:31:59 +0100 Subject: test the xz compressor, too --- test/integration/test-bug-595691-empty-and-broken-archive-files | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') 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 2179ba03b..11dee0628 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -54,12 +54,14 @@ setupcompressor() { gzip) COMPRESS="gz";; bzip2) COMPRESS="bz2";; lzma) COMPRESS="lzma";; + xz) COMPRESS="xz";; esac echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; }; Dir::Bin::uncompressed \"/does/not/exist\"; Dir::Bin::gzip \"/does/not/exist\"; Dir::Bin::bzip2 \"/does/not/exist\"; -Dir::Bin::lzma \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor +Dir::Bin::lzma \"/does/not/exist\"; +Dir::Bin::xz \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor if [ -e "/bin/${COMPRESSOR}" ]; then echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor elif [ -e "/usr/bin/${COMPRESSOR}" ]; then @@ -134,9 +136,9 @@ W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over http" } -for COMPRESSOR in 'gzip' 'bzip2' 'lzma'; do testoverfile $COMPRESSOR; done +for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testoverfile $COMPRESSOR; done # do the same again with http instead of file changetowebserver -for COMPRESSOR in 'gzip' 'bzip2' 'lzma'; do testoverhttp $COMPRESSOR; done +for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testoverhttp $COMPRESSOR; done -- cgit v1.2.3 From 28166356f30ad13729f7f952e6f1fc6131036591 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 8 Mar 2011 19:32:35 +0100 Subject: Remove the "pseudopackage" handling of Architecture: all packages for Multi-Arch; instead, Arch: all packages only satisfy dependencies for the native arch, except where the Arch: all package is declared Multi-Arch: foreign. (Closes: #613584) This has the sideeffect that arch:all packages internally show up as coming from the native arch - so packages with the architecture "all" doesn't exist any longer in the pkgcache --- ...est-bug-549968-install-depends-of-not-installed | 4 +- ...g-590438-broken-provides-thanks-to-remove-order | 8 +-- .../integration/test-bug-593360-modifiers-in-names | 16 ++--- .../test-bug-612099-multiarch-conflicts | 77 +++++++++++----------- test/integration/test-release-candidate-switching | 30 ++++----- 5 files changed, 69 insertions(+), 66 deletions(-) (limited to 'test') 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 864dd340a..871d236b9 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -22,5 +22,5 @@ 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 +Inst coolstuff (1.0 unstable [i386]) +Conf coolstuff (1.0 unstable [i386])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order index 0f6493948..72de6eacb 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -62,13 +62,13 @@ predependsgawk2() { echo "$pkgbasefile Pre-Depends: $1 " >> rootdir/var/lib/dpkg/status - testequalor2 "Inst coolstuff (1-1 localhost [all]) -Conf coolstuff (1-1 localhost [all]) + testequalor2 "Inst coolstuff (1-1 localhost [i386]) +Conf coolstuff (1-1 localhost [i386]) Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386]) Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386]) -Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [all]) +Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [i386]) Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386]) -Conf coolstuff (1-1 localhost [all]) +Conf coolstuff (1-1 localhost [i386]) Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386]) Remv mawk [1.3.3-15]" aptget install gawk2 mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g') } diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names index 83a3cfabf..c34b499b0 100755 --- a/test/integration/test-bug-593360-modifiers-in-names +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -36,29 +36,29 @@ Building dependency tree... The following NEW packages will be installed: apt 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt (0.8.8 localhost [all]) -Conf apt (0.8.8 localhost [all])' aptget install apt -s +Inst apt (0.8.8 localhost [i386]) +Conf apt (0.8.8 localhost [i386])' aptget install apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [all]) -Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s +Inst apt+ (0.8.8 localhost [i386]) +Conf apt+ (0.8.8 localhost [i386])' aptget install apt+ -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [all]) -Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s +Inst apt+ (0.8.8 localhost [i386]) +Conf apt+ (0.8.8 localhost [i386])' aptget install apt++ -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [all]) -Conf apt+ (0.8.8 localhost [all])' aptget purge apt++ -s +Inst apt+ (0.8.8 localhost [i386]) +Conf apt+ (0.8.8 localhost [i386])' aptget purge apt++ -s diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index caac75db4..6d09a4fa1 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -59,29 +59,27 @@ Inst foobar:amd64 (1.0 stable [amd64]) Conf libc6:amd64 (1.0 stable [amd64]) Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable -# FIXME: libc6:i386 is installed, we are switching to libc6:all testequal 'Reading package lists... Building dependency tree... Reading state information... -The following extra packages will be installed: - libc6 The following NEW packages will be installed: - foobar libc6 -0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. -Inst libc6 (2.0 testing, testing [all]) + foobar +The following packages will be upgraded: + libc6 +1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 [1.0] (2.0 testing [i386]) Inst foobar (1.0 stable [i386]) -Conf libc6 (2.0 testing, testing [all]) +Conf libc6 (2.0 testing [i386]) Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing -# FIXME: libc6:i386 is installed, we are switching to libc6:all testequal 'Reading package lists... Building dependency tree... Reading state information... -The following NEW packages will be installed: +The following packages will be upgraded: libc6 -0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst libc6 (2.0 testing, testing [all]) -Conf libc6 (2.0 testing, testing [all])' aptget upgrade -t testing -s +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 [1.0] (2.0 testing [i386]) +Conf libc6 (2.0 testing [i386])' aptget upgrade -t testing -s aptget upgrade -y -qq 2>&1 > /dev/null testdpkginstalled libc6 @@ -91,31 +89,34 @@ Reading state information... The following NEW packages will be installed: foobar 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst foobar (1.0 stable [i386]) [] +Inst foobar (1.0 stable [i386]) Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing testequal 'Reading package lists... Building dependency tree... Reading state information... +The following extra packages will be installed: + libc6:amd64 +The following packages will be REMOVED: + libc6 The following NEW packages will be installed: - foobar:amd64 -0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. + foobar:amd64 libc6:amd64 +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv libc6 [2.0] +Inst libc6:amd64 (1.0 stable [amd64]) Inst foobar:amd64 (1.0 stable [amd64]) +Conf libc6:amd64 (1.0 stable [amd64]) Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing -# FIXME: the display is a strange (its a downgrade), but the handling itself correct testequal "Reading package lists... Building dependency tree... Reading state information... Selected version '1.0' (stable [i386]) for 'libc6' -The following packages will be REMOVED: +The following packages will be DOWNGRADED: libc6 -The following NEW packages will be installed: - libc6 -0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. -Remv libc6 [2.0] -Inst libc6 (1.0 stable [i386]) +0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. +Inst libc6 [2.0] (1.0 stable [i386]) Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0 @@ -164,30 +165,25 @@ Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s - # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently -# FIXME: upgrade any to all as above testequal 'Reading package lists... Building dependency tree... Reading state information... -The following NEW packages will be installed: +The following packages will be upgraded: libc6-same -0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst libc6-same (2.0 testing, testing [all]) -Conf libc6-same (2.0 testing, testing [all])' aptget upgrade -t testing -s +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same [1.0] (2.0 testing [i386]) +Conf libc6-same (2.0 testing [i386])' aptget upgrade -t testing -s aptget upgrade -y -qq 2>&1 > /dev/null testdpkginstalled libc6-same -# FIXME: the display is a strange (its a downgrade), but the handling itself correct testequal "Reading package lists... Building dependency tree... Reading state information... Selected version '1.0' (stable [i386]) for 'libc6-same' -The following packages will be REMOVED: +The following packages will be DOWNGRADED: libc6-same -The following NEW packages will be installed: - libc6-same -0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. -Remv libc6-same [2.0] -Inst libc6-same (1.0 stable [i386]) +0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. +Inst libc6-same [2.0] (1.0 stable [i386]) Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0 testequal 'Reading package lists... @@ -196,14 +192,21 @@ Reading state information... The following NEW packages will be installed: foobar-same 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst foobar-same (1.0 stable [i386]) [] +Inst foobar-same (1.0 stable [i386]) Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing testequal 'Reading package lists... Building dependency tree... Reading state information... +The following extra packages will be installed: + libc6-same:amd64 +The following packages will be REMOVED: + libc6-same The following NEW packages will be installed: - foobar-same:amd64 -0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. + foobar-same:amd64 libc6-same:amd64 +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv libc6-same [2.0] +Inst libc6-same:amd64 (1.0 stable [amd64]) Inst foobar-same:amd64 (1.0 stable [amd64]) +Conf libc6-same:amd64 (1.0 stable [amd64]) Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index b6dbe99db..b79828a9e 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -95,7 +95,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -117,7 +117,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-null' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -140,7 +140,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' The following extra packages will be installed: @@ -170,7 +170,7 @@ Building dependency tree... Selected version '2.3.2-2+exp' (experimental2 [i386]) for 'amarok-less' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-less' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-higher' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-higher' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-higher' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-higher' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-higher' The following extra packages will be installed: @@ -195,7 +195,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null2' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null2' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-null2' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -218,7 +218,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-xine' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine' The following extra packages will be installed: @@ -242,7 +242,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine2' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine2' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine2' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine2' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine2' The following extra packages will be installed: @@ -266,9 +266,9 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine3' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine3' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine3' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine3' because of 'amarok-xine3' -Selected version '2.0' (experimental [all]) for 'intermediatepkg' because of 'phonon-backend-xine3' +Selected version '2.0' (experimental [i386]) for 'intermediatepkg' because of 'phonon-backend-xine3' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine3' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -293,7 +293,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine4' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine4' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine4' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine4' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine4' The following extra packages will be installed: @@ -317,7 +317,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-broken' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-broken' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-broken' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-broken' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-broken' The following extra packages will be installed: @@ -341,7 +341,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -364,7 +364,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) Recommended packages: @@ -385,7 +385,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends2' -Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends2' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) libc6 (2.11.2-7+sid) @@ -406,7 +406,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a # if one depends doesn't work, we don't need to look deeper… testequal "Reading package lists... Building dependency tree... -Selected version '1.0' (experimental [all]) for 'uninstallablepkg' +Selected version '1.0' (experimental [i386]) for 'uninstallablepkg' 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 -- cgit v1.2.3