From b855a40058f99a0f10184c410b3bbf3c2ee4ae83 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 4 Jul 2012 23:54:48 +0200 Subject: * cmdline/apt-mark.cc: - arch:all packages are treated as arch:native packages, but dpkg expects pkg:all for selections, so use the arch of the installed version instead of the package structure if possible. Thanks to Stepan Golosunov for the report! (Closes: #680041) --- test/integration/framework | 5 ++ .../test-bug-680041-apt-mark-holds-correctly | 72 ++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100755 test/integration/test-bug-680041-apt-mark-holds-correctly (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 2d6ada117..da85d2332 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -736,6 +736,11 @@ testfileequal() { fi } +testempty() { + msgtest "Test for no output of" "$*" + test -z "$($* 2>&1)" && msgpass || msgfail +} + testequal() { local COMPAREFILE=$(mktemp) addtrap "rm $COMPAREFILE;" diff --git a/test/integration/test-bug-680041-apt-mark-holds-correctly b/test/integration/test-bug-680041-apt-mark-holds-correctly new file mode 100755 index 000000000..2e5e39c8e --- /dev/null +++ b/test/integration/test-bug-680041-apt-mark-holds-correctly @@ -0,0 +1,72 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'pkgarch' 'amd64' '1' +insertinstalledpackage 'pkgall' 'all' '1' + +insertpackage 'unstable' 'pkgarch' 'amd64' '2' +insertpackage 'unstable' 'pkgall' 'all' '2' + +setupaptarchive + +runtests() { + testempty aptmark showhold + + testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + pkgall pkgarch +2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +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 + + testequal 'pkgarch set on hold.' aptmark hold pkgarch + testequal 'pkgarch' aptmark showhold + + testequal 'Reading package lists... +Building dependency tree... +The following packages have been kept back: + pkgarch +The following packages will be upgraded: + pkgall +1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. +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 + + testequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch + testempty aptmark showhold + + testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + pkgall pkgarch +2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +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 + + testequal 'pkgall set on hold.' aptmark hold pkgall + testequal 'pkgall' aptmark showhold + + testequal 'Reading package lists... +Building dependency tree... +The following packages have been kept back: + pkgall +The following packages will be upgraded: + pkgarch +1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. +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 + + testequal 'Canceled hold on pkgall.' aptmark unhold pkgall + testempty aptmark showhold +} +# single-arch +runtests +# multi-arch +configarchitecture 'amd64' 'i386' +runtests -- cgit v1.2.3 From 469b02781dfb4517282da4d497c5f7fd0dcb97f4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 5 Jul 2012 08:59:52 +0200 Subject: * apt-pkg/clean.cc: - run autoclean against pkg:arch and not always against pkg:native as this removes valid cache entries (Closes: #679371) --- .../test-bug-679371-apt-get-autoclean-multiarch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/integration/test-bug-679371-apt-get-autoclean-multiarch (limited to 'test/integration') diff --git a/test/integration/test-bug-679371-apt-get-autoclean-multiarch b/test/integration/test-bug-679371-apt-get-autoclean-multiarch new file mode 100755 index 000000000..ba6857b73 --- /dev/null +++ b/test/integration/test-bug-679371-apt-get-autoclean-multiarch @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +buildsimplenativepackage 'pkgall' 'all' '1' 'stable' +buildsimplenativepackage 'pkgnative' 'amd64' '1' 'stable' +buildsimplenativepackage 'pkgforeign' 'i386' '1' 'stable' + +setupaptarchive + +changetowebserver + +aptget update -qq +aptget install pkgall pkgnative pkgforeign -y -qq > /dev/null + +testdpkginstalled pkgall pkgnative pkgforeign + +testequal 'Reading package lists... +Building dependency tree... +Reading state information...' aptget autoclean -s -- cgit v1.2.3 From cef094c2ec8214b2783a2ac3aa70cf835381eae1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 9 Jul 2012 17:42:25 +0200 Subject: * apt-pkg/deb/deblistparser.cc: - negative dependencies need to apply to all architectures, but those with a specific architecture only apply to this one --- .../test-specific-architecture-dependencies | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100755 test/integration/test-specific-architecture-dependencies (limited to 'test/integration') diff --git a/test/integration/test-specific-architecture-dependencies b/test/integration/test-specific-architecture-dependencies new file mode 100755 index 000000000..078a84654 --- /dev/null +++ b/test/integration/test-specific-architecture-dependencies @@ -0,0 +1,182 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'unstable' 'libc6' 'amd64,i386' '1' 'Multi-Arch: same' +insertinstalledpackage 'libold' 'amd64,i386' '1' 'Multi-Arch: same' +insertinstalledpackage 'provider' 'amd64' '1' 'Provides: foo' + +insertpackage 'unstable' 'pre-depender' 'all' '1' 'Pre-Depends: libc6:i386' +insertpackage 'unstable' 'depender' 'all' '1' 'Depends: libc6:i386' + +insertpackage 'unstable' 'breaker' 'all' '1' 'Breaks: libold (<< 2)' +insertpackage 'unstable' 'breaker-x32' 'amd64' '1' 'Breaks: libold:i386 (<< 2)' +insertpackage 'unstable' 'breaker-x64' 'i386' '1' 'Breaks: libold:amd64 (<< 2)' +# conflicts with no effect +insertpackage 'unstable' 'oldconflictor' 'all' '1' 'Conflicts: libold (<< 0)' +insertpackage 'unstable' 'oldconflictor-x32' 'amd64' '1' 'Conflicts: libold:i386 (<< 0)' +insertpackage 'unstable' 'oldconflictor-x64' 'i386' '1' 'Conflicts: libold:amd64 (<< 0)' + +insertpackage 'unstable' 'foo-depender' 'i386,amd64' '1' 'Depends: foo' +insertpackage 'unstable' 'foo-foreign-depender' 'i386' '1' 'Depends: foo:amd64' + +insertpackage 'unstable' 'foo-conflictor' 'i386,amd64' '1' 'Conflicts: foo' +insertpackage 'unstable' 'foo-foreign-conflictor' 'i386' '1' 'Conflicts: foo:amd64' +insertpackage 'unstable' 'foo-no-conflictor' 'i386' '1' 'Conflicts: foo:i386' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libc6:i386 +The following NEW packages will be installed: + libc6:i386 pre-depender +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6:i386 (1 unstable [i386]) +Conf libc6:i386 (1 unstable [i386]) +Inst pre-depender (1 unstable [all]) +Conf pre-depender (1 unstable [all])' aptget install pre-depender -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libc6:i386 +The following NEW packages will be installed: + depender libc6:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6:i386 (1 unstable [i386]) +Inst depender (1 unstable [all]) +Conf libc6:i386 (1 unstable [i386]) +Conf depender (1 unstable [all])' aptget install depender -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + libold libold:i386 +The following NEW packages will be installed: + breaker +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv libold [1] +Remv libold:i386 [1] +Inst breaker (1 unstable [all]) +Conf breaker (1 unstable [all])' aptget install breaker -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + libold:i386 +The following NEW packages will be installed: + breaker-x32 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv libold:i386 [1] +Inst breaker-x32 (1 unstable [amd64]) +Conf breaker-x32 (1 unstable [amd64])' aptget install breaker-x32 -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + libold +The following NEW packages will be installed: + breaker-x64:i386 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv libold [1] +Inst breaker-x64:i386 (1 unstable [i386]) +Conf breaker-x64:i386 (1 unstable [i386])' aptget install breaker-x64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + oldconflictor +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst oldconflictor (1 unstable [all]) +Conf oldconflictor (1 unstable [all])' aptget install oldconflictor -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + oldconflictor-x32 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst oldconflictor-x32 (1 unstable [amd64]) +Conf oldconflictor-x32 (1 unstable [amd64])' aptget install oldconflictor-x32 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + oldconflictor-x64:i386 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst oldconflictor-x64:i386 (1 unstable [i386]) +Conf oldconflictor-x64:i386 (1 unstable [i386])' aptget install oldconflictor-x64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-depender +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo-depender (1 unstable [amd64]) +Conf foo-depender (1 unstable [amd64])' aptget install foo-depender -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-depender:i386 : Depends: foo:i386 but it is not installable +E: Unable to correct problems, you have held broken packages.' aptget install foo-depender:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-foreign-depender:i386 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo-foreign-depender:i386 (1 unstable [i386]) +Conf foo-foreign-depender:i386 (1 unstable [i386])' aptget install foo-foreign-depender:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + provider +The following NEW packages will be installed: + foo-conflictor +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv provider [1] +Inst foo-conflictor (1 unstable [amd64]) +Conf foo-conflictor (1 unstable [amd64])' aptget install foo-conflictor -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + provider +The following NEW packages will be installed: + foo-conflictor:i386 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv provider [1] +Inst foo-conflictor:i386 (1 unstable [i386]) +Conf foo-conflictor:i386 (1 unstable [i386])' aptget install foo-conflictor:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + provider +The following NEW packages will be installed: + foo-foreign-conflictor:i386 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv provider [1] +Inst foo-foreign-conflictor:i386 (1 unstable [i386]) +Conf foo-foreign-conflictor:i386 (1 unstable [i386])' aptget install foo-foreign-conflictor:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-no-conflictor:i386 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo-no-conflictor:i386 (1 unstable [i386]) +Conf foo-no-conflictor:i386 (1 unstable [i386])' aptget install foo-no-conflictor:i386 -s -- cgit v1.2.3 From 5f20ac7f11ae5718595d6e570474d120d30e36db Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 12 Jul 2012 20:39:59 +0200 Subject: * apt-pkg/cachefilter.cc: - remove architecture-specific arch to tuple expansion-rules as they lead to the same tuples for different architectures (e.g. linux-arm for arm, armel and armhf) while the dpkg-architecture code uses triples which are different (in the first part, which we omit in our tuples), so e.g. build-dep restrictions for armel ended up effecting armhf as well --- test/integration/test-architecture-specification-parsing | 15 ++++++++++++++- .../test-bug-632221-cross-dependency-satisfaction | 2 +- .../test-cachecontainer-architecture-specification | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing index 8f365dd55..2741509a7 100755 --- a/test/integration/test-architecture-specification-parsing +++ b/test/integration/test-architecture-specification-parsing @@ -4,7 +4,7 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture 'amd64' +configarchitecture 'amd64' 'armel' buildsimplenativepackage 'pkg-arch-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !amd64] Depends: foo [amd64 !amd64]' @@ -14,6 +14,8 @@ buildsimplenativepackage 'pkg-arch-foo-unrelated-no' 'amd64' '1.0' 'stable' 'Bui Depends: foo [!kfreebsd-any amd64]' buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !kfreebsd-any] Depends: foo [amd64 !kfreebsd-any]' +buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armhf], bar [arm] +Depends: foo [armhf], bar [arm]' buildsimplenativepackage 'foo' 'amd64' '1.0' 'stable' @@ -93,4 +95,15 @@ The following NEW packages will be installed: Inst foo (1.0 stable [amd64]) Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no2 -s +testequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s +# this is not really testing APT - more that dpkg is in line with us +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + no-depends:armel +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst no-depends:armel (1.0 stable [armel]) +Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction index 208c613a2..7e8a43a86 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -21,7 +21,7 @@ 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, arm-stuff [any-arm] | linux-stuff [ linux-any]' +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-armel] | linux-stuff [ linux-any]' insertsource 'unstable' 'forbidden-none' 'any' '1' 'Build-Depends: amdboot:any' insertsource 'unstable' 'forbidden-same' 'any' '1' 'Build-Depends: libc6:any' diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification index 174efb087..55e464a07 100755 --- a/test/integration/test-cachecontainer-architecture-specification +++ b/test/integration/test-cachecontainer-architecture-specification @@ -27,6 +27,9 @@ Inst libsame:armel (1 unstable [armel]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel testequal 'Reading package lists... Building dependency tree... +E: Unable to locate package libsame' aptget -s install libsame:armhf +testequal 'Reading package lists... +Building dependency tree... The following NEW packages will be installed: libsame 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -- cgit v1.2.3 From f1d86c0ee906dc7252dc9158c354c42d3ededa2f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 18 Jul 2012 11:46:36 +0200 Subject: * apt-pkg/cacheset.cc: - handle :all and :native correctly as architectures again in the commandline parsing (regression in 0.9.7) --- .../test-cachecontainer-architecture-specification | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification index 55e464a07..47abfb5b0 100755 --- a/test/integration/test-cachecontainer-architecture-specification +++ b/test/integration/test-cachecontainer-architecture-specification @@ -8,6 +8,7 @@ configarchitecture 'amd64' 'armel' #insertinstalledpackage 'xserver-xorg-core' 'amd64' '2:1.7.6-2ubuntu7.10' insertpackage 'unstable' 'libsame' 'armel,amd64' '1' 'Multi-Arch: same' +insertpackage 'unstable' 'foo' 'all' '1' setupaptarchive @@ -88,3 +89,35 @@ Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:linux-* testequal 'Reading package lists... Building dependency tree... E: Unable to locate package libsame' aptget -s install libsame:windows-any + +testequal 'Reading package lists... +Building dependency tree... +E: Unable to locate package foo' aptget -s install foo:armel +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1 unstable [all]) +Conf foo (1 unstable [all])' aptget -s install foo +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1 unstable [all]) +Conf foo (1 unstable [all])' aptget -s install foo:all +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1 unstable [all]) +Conf foo (1 unstable [all])' aptget -s install foo:amd64 +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1 unstable [all]) +Conf foo (1 unstable [all])' aptget -s install foo:native -- cgit v1.2.3 From f1f874bdb8433da780e5635422e6aad4762d8d25 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 4 Aug 2012 11:04:52 +0200 Subject: * cmdline/apt-get.cc: - error out on (unsatisfiable) build-deps on purly virtual packages instead of ignoring these dependencies; thanks to Johannes Schauer for the detailed report! (Closes: #683786) --- .../test-bug-683786-build-dep-on-virtual-packages | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 test/integration/test-bug-683786-build-dep-on-virtual-packages (limited to 'test/integration') diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages new file mode 100755 index 000000000..83d184a43 --- /dev/null +++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages @@ -0,0 +1,44 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'armel' + +insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' + +insertpackage 'unstable' 'po-debconf' 'all' '1' +insertsource 'unstable' 'dash' 'any' '1' 'Build-Depends: po-debconf' +insertpackage 'unstable' 'make-po-debconf-pure-virtual' 'armel' '1' 'Depends: po-debconf' + +insertpackage 'unstable' 'po-debconf' 'amd64' '1' +insertsource 'unstable' 'diffutils' 'any' '1' 'Build-Depends: texi2html' + +setupaptarchive + +testequal 'Package: po-debconf:armel +Versions: + +Reverse Depends: + make-po-debconf-pure-virtual:armel,po-debconf:armel +Dependencies: +Provides: +Reverse Provides: ' aptcache showpkg po-debconf:armel +testequal 'N: Unable to locate package texi2html' aptcache showpkg texi2html:armel -q=0 + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + po-debconf +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst po-debconf (1 unstable, unstable [all]) +Conf po-debconf (1 unstable, unstable [all])' aptget build-dep dash -s + +testequal 'Reading package lists... +Building dependency tree... +E: Build-Depends dependency for dash cannot be satisfied because the package po-debconf cannot be found' aptget build-dep -aarmel dash -s + +testequal 'Reading package lists... +Building dependency tree... +E: Build-Depends dependency for diffutils cannot be satisfied because the package texi2html cannot be found' aptget build-dep -aarmel diffutils -s -- cgit v1.2.3 From 727d8712bc8d681ac95e0d8c61d3d0b46d11494c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 4 Aug 2012 21:37:41 +0200 Subject: improve the check for purely virtuals as provided packages aren't purely virtual and shouldn't error out cause of that --- .../test-bug-683786-build-dep-on-virtual-packages | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages index 83d184a43..246bd2ef7 100755 --- a/test/integration/test-bug-683786-build-dep-on-virtual-packages +++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages @@ -15,6 +15,9 @@ insertpackage 'unstable' 'make-po-debconf-pure-virtual' 'armel' '1' 'Depends: po insertpackage 'unstable' 'po-debconf' 'amd64' '1' insertsource 'unstable' 'diffutils' 'any' '1' 'Build-Depends: texi2html' +insertpackage 'unstable' 'libselinux1-dev' 'amd64' '1' 'Provides: libselinux-dev' +insertsource 'unstable' 'sed' 'any' '1' 'Build-Depends: libselinux-dev' + setupaptarchive testequal 'Package: po-debconf:armel @@ -42,3 +45,12 @@ E: Build-Depends dependency for dash cannot be satisfied because the package po- testequal 'Reading package lists... Building dependency tree... E: Build-Depends dependency for diffutils cannot be satisfied because the package texi2html cannot be found' aptget build-dep -aarmel diffutils -s + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'libselinux1-dev' instead of 'libselinux-dev' +The following NEW packages will be installed: + libselinux1-dev +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libselinux1-dev (1 unstable [amd64]) +Conf libselinux1-dev (1 unstable [amd64])" aptget build-dep sed -s -- cgit v1.2.3 From 666faa35f8a42d2a8691daf46a203be6d29166dc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 5 Aug 2012 12:23:59 +0200 Subject: ensure that the right architecture is used for cross-dependencies in cases we have to choose a provider by defaulting on host-arch instead of build-arch --- .../test-bug-632221-cross-dependency-satisfaction | 1 + .../test-bug-683786-build-dep-on-virtual-packages | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) (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 7e8a43a86..d90a103c9 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -63,6 +63,7 @@ Inst libc6 (1.0 unstable [amd64]) Inst specific (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf specific (1.0 unstable [amd64])' aptget build-dep source-specific-amd64 -s -a armel + testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages index 246bd2ef7..879d6a3bc 100755 --- a/test/integration/test-bug-683786-build-dep-on-virtual-packages +++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages @@ -18,6 +18,9 @@ insertsource 'unstable' 'diffutils' 'any' '1' 'Build-Depends: texi2html' insertpackage 'unstable' 'libselinux1-dev' 'amd64' '1' 'Provides: libselinux-dev' insertsource 'unstable' 'sed' 'any' '1' 'Build-Depends: libselinux-dev' +insertpackage 'unstable' 'libsehurd1-dev' 'amd64,armel' '1' 'Provides: libsehurd-dev' +insertsource 'unstable' 'sed2' 'any' '1' 'Build-Depends: libsehurd-dev' + setupaptarchive testequal 'Package: po-debconf:armel @@ -54,3 +57,25 @@ The following NEW packages will be installed: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libselinux1-dev (1 unstable [amd64]) Conf libselinux1-dev (1 unstable [amd64])" aptget build-dep sed -s + +testequal 'Reading package lists... +Building dependency tree... +E: Build-Depends dependency for sed cannot be satisfied because the package libselinux-dev cannot be found' aptget build-dep -aarmel sed -s + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'libsehurd1-dev' instead of 'libsehurd-dev' +The following NEW packages will be installed: + libsehurd1-dev +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libsehurd1-dev (1 unstable [amd64]) +Conf libsehurd1-dev (1 unstable [amd64])" aptget build-dep sed2 -s + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'libsehurd1-dev:armel' instead of 'libsehurd-dev:armel' +The following NEW packages will be installed: + libsehurd1-dev:armel +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libsehurd1-dev:armel (1 unstable [armel]) +Conf libsehurd1-dev:armel (1 unstable [armel])" aptget build-dep -aarmel sed2 -s -- cgit v1.2.3 From d4b4e5ea2ceb02699e746d52256b3a8ac2d9bda2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 30 Aug 2012 12:21:32 +0200 Subject: * apt-pkg/packagemanager.cc: - unpack versions in case a different version from the package is currently in unpack state to recover from broken system states (like different file in M-A:same package and other dpkg errors) --- test/integration/framework | 3 +- .../test-unpack-different-version-unpacked | 121 +++++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100755 test/integration/test-unpack-different-version-unpacked (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index da85d2332..05878d0a4 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -523,11 +523,12 @@ insertinstalledpackage() { local VERSION="$3" local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" + local STATUS="${6:-install ok installed}" 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 +Status: $STATUS Priority: $PRIORITY Section: other Installed-Size: 42 diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked new file mode 100755 index 000000000..952f6e6b2 --- /dev/null +++ b/test/integration/test-unpack-different-version-unpacked @@ -0,0 +1,121 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'unstable' 'libqtcore4' 'i386,amd64' '2' 'Multi-Arch: same' +setupaptarchive + +DPKGSTATUS='rootdir/var/lib/dpkg/status' +cp $DPKGSTATUS dpkg.status + +cleanstatus() { + cp dpkg.status $DPKGSTATUS + rm rootdir/var/cache/apt/*.bin +} + +#FIXME: the reported version is wrong, it should be 1, not 2 +insertinstalledpackage 'libqtcore4' 'i386,amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' +testequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. +2 not fully installed or removed. +Conf libqtcore4 (2 unstable [amd64]) +Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked' +insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4:i386 +The following packages will be upgraded: + libqtcore4:i386 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +2 not fully installed or removed. +Inst libqtcore4:i386 [1] (2 unstable [i386]) +Conf libqtcore4:i386 (2 unstable [i386]) +Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked' +insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4 +The following packages will be upgraded: + libqtcore4 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +2 not fully installed or removed. +Inst libqtcore4 [1] (2 unstable [amd64]) +Conf libqtcore4 (2 unstable [amd64]) +Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked' +insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4:i386 +The following packages will be upgraded: + libqtcore4:i386 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +1 not fully installed or removed. +Inst libqtcore4:i386 [1] (2 unstable [i386]) +Conf libqtcore4:i386 (2 unstable [i386]) +Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked' +insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4 +The following packages will be upgraded: + libqtcore4 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +1 not fully installed or removed. +Inst libqtcore4 [1] (2 unstable [amd64]) +Conf libqtcore4 (2 unstable [amd64]) +Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' +insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4:i386 +The following packages will be upgraded: + libqtcore4:i386 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +1 not fully installed or removed. +Inst libqtcore4:i386 [1] (2 unstable [i386]) +Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f + +cleanstatus +insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' +insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' +testequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... Done +The following extra packages will be installed: + libqtcore4 +The following packages will be upgraded: + libqtcore4 +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +1 not fully installed or removed. +Inst libqtcore4 [1] (2 unstable [amd64]) +Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f -- cgit v1.2.3 From c45233eaf6d08bb6bb6e2dbb57c90a1d52ca9a43 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 3 Sep 2012 12:28:19 +0200 Subject: * apt-pkg/cdrom.cc: - copy only configured translation files from a CD-ROM and not all available translation files preventing new installs with d-i from being initialized with all translations (Closes: #678227) - handle Components in the reduction for the source.list as multi-arch CDs otherwise create duplicated source entries (e.g. "wheezy main main") --- test/integration/framework | 16 +++++++ test/integration/test-apt-cdrom | 104 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100755 test/integration/test-apt-cdrom (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 05878d0a4..57bf555af 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -91,6 +91,7 @@ runapt() { } aptconfig() { runapt apt-config $*; } aptcache() { runapt apt-cache $*; } +aptcdrom() { runapt apt-cdrom $*; } aptget() { runapt apt-get $*; } aptftparchive() { runapt apt-ftparchive $*; } aptkey() { runapt apt-key $*; } @@ -715,6 +716,21 @@ server.stat-cache-engine = \"disable\"" > lighttpd.conf return 0 } +changetocdrom() { + mkdir -p rootdir/media/cdrom/.disk + local CD="$(readlink -f rootdir/media/cdrom)" + echo "acquire::cdrom::mount \"${CD}\";" > rootdir/etc/apt/apt.conf.d/00cdrom + echo 'acquire::cdrom::autodetect 0;' >> rootdir/etc/apt/apt.conf.d/00cdrom + echo -n "$1" > ${CD}/.disk/info + if [ ! -d aptarchive/dists ]; then + msgdie 'Flat file archive cdroms can not be created currently' + return 1 + fi + mv aptarchive/dists $CD + ln -s "$(readlink -f ./incoming)" $CD/pool + find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list' -delete +} + checkdiff() { local DIFFTEXT="$($(which diff) -u $* | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" if [ -n "$DIFFTEXT" ]; then diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom new file mode 100755 index 000000000..f24c99b36 --- /dev/null +++ b/test/integration/test-apt-cdrom @@ -0,0 +1,104 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +buildsimplenativepackage 'testing' 'amd64,i386' '0.8.15' 'stable' +setupaptarchive + +changetocdrom 'Debian APT Testdisk 0.8.15' + +# -de is not in the Release file, but picked up anyway for compatibility +cd rootdir/media/cdrom/dists/stable/main/i18n +sed -e '/^Description-en:/ d' -e '/^ / d' -e '/^$/ d' Translation-en > Translation-de +echo 'Description-de: automatisch generiertes Testpaket testing=0.8.15/stable + Diese Pakete sind nur für das testen von APT gedacht, + sie erfüllen keinen Zweck auf einem normalen System… +' >> Translation-de +cat Translation-de | gzip > Translation-de.gz +cat Translation-de | bzip2 > Translation-de.bz2 +cat Translation-de | xz --format=lzma > Translation-de.lzma +cat Translation-de | xz > Translation-de.xz +rm Translation-en Translation-de +cd - > /dev/null + +aptcdrom add -m -o quiet=1 > apt-cdrom.log 2>&1 +sed -i -e '/^Using CD-ROM/ d' -e '/gpgv/ d' -e '/^Identifying/ d' -e '/Reading / d' apt-cdrom.log +testfileequal apt-cdrom.log "Scanning disc for index files.. +Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures +Found label 'Debian APT Testdisk 0.8.15' +This disc is called: +'Debian APT Testdisk 0.8.15' +Writing new source list +Source list entries for this disc are: +deb cdrom:[Debian APT Testdisk 0.8.15]/ stable main +deb-src cdrom:[Debian APT Testdisk 0.8.15]/ stable main +Repeat this process for the rest of the CDs in your set." + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + testing +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst testing (0.8.15 stable [amd64]) +Conf testing (0.8.15 stable [amd64])' aptget install testing -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + testing:i386 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst testing:i386 (0.8.15 stable [i386]) +Conf testing:i386 (0.8.15 stable [i386])' aptget install testing:i386 -s + +# check Idempotence of apt-cdrom (and disabling of Translation dropping) +aptcdrom add -m -o quiet=1 -o APT::CDROM::DropTranslation=0 > apt-cdrom.log 2>&1 +sed -i -e '/^Using CD-ROM/ d' -e '/gpgv/ d' -e '/^Identifying/ d' -e '/Reading / d' apt-cdrom.log +testfileequal apt-cdrom.log "Scanning disc for index files.. +Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures +This disc is called: +'Debian APT Testdisk 0.8.15' +Writing new source list +Source list entries for this disc are: +deb cdrom:[Debian APT Testdisk 0.8.15]/ stable main +deb-src cdrom:[Debian APT Testdisk 0.8.15]/ stable main +Repeat this process for the rest of the CDs in your set." + +# take Translations from previous runs as needed +aptcdrom add -m -o quiet=1 > apt-cdrom.log 2>&1 +sed -i -e '/^Using CD-ROM/ d' -e '/gpgv/ d' -e '/^Identifying/ d' -e '/Reading / d' apt-cdrom.log +testfileequal apt-cdrom.log "Scanning disc for index files.. +Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures +This disc is called: +'Debian APT Testdisk 0.8.15' +Writing new source list +Source list entries for this disc are: +deb cdrom:[Debian APT Testdisk 0.8.15]/ stable main +deb-src cdrom:[Debian APT Testdisk 0.8.15]/ stable main +Repeat this process for the rest of the CDs in your set." +msgtest 'Test for the german description translation of' 'testing' +aptcache show testing -o Acquire::Languages=de | grep -q '^Description-de: ' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists +mkdir -p rootdir/var/lib/apt/lists/partial +aptcdrom add -m -o quiet=1 > apt-cdrom.log 2>&1 +sed -i -e '/^Using CD-ROM/ d' -e '/gpgv/ d' -e '/^Identifying/ d' -e '/Reading / d' apt-cdrom.log +testfileequal apt-cdrom.log "Scanning disc for index files.. +Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures +This disc is called: +'Debian APT Testdisk 0.8.15' +Writing new source list +Source list entries for this disc are: +deb cdrom:[Debian APT Testdisk 0.8.15]/ stable main +deb-src cdrom:[Debian APT Testdisk 0.8.15]/ stable main +Repeat this process for the rest of the CDs in your set." +msgtest 'Test for the english description translation of' 'testing' +aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' && msgpass || msgfail + + +# check that we really can install from a 'cdrom' +testdpkgnotinstalled testing +aptget install testing -y > /dev/null 2>&1 +testdpkginstalled testing -- cgit v1.2.3 From c919ad6e4d0de48acb60f2a1371ade9bfb0451f8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 9 Sep 2012 16:03:52 +0200 Subject: =?UTF-8?q?handle=20packages=20without=20a=20mandatory=20architect?= =?UTF-8?q?ure=20(debian-policy=20=C2=A75.3)=20by=20introducing=20a=20pseu?= =?UTF-8?q?do-architecture=20'none'=20so=20that=20the=20small=20group=20of?= =?UTF-8?q?=20users=20with=20these=20packages=20can=20get=20right=20of=20t?= =?UTF-8?q?hem=20without=20introducing=20too=20much=20hassle=20for=20other?= =?UTF-8?q?=20users=20(Closes:=20#686346)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/integration/framework | 12 +-- .../test-bug-686346-package-missing-architecture | 87 ++++++++++++++++++++++ 2 files changed, 93 insertions(+), 6 deletions(-) create mode 100755 test/integration/test-bug-686346-package-missing-architecture (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 57bf555af..1c4872c8e 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -468,7 +468,7 @@ insertpackage() { local PRIORITY="${6:-optional}" local ARCHS="" for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do - if [ "$arch" = "all" ]; then + if [ "$arch" = 'all' -o "$arch" = 'none' ]; then ARCHS="$(getarchitectures)" else ARCHS="$arch" @@ -482,9 +482,9 @@ insertpackage() { Priority: $PRIORITY Section: other Installed-Size: 42 -Maintainer: Joe Sixpack -Architecture: $arch -Version: $VERSION +Maintainer: Joe Sixpack " >> $FILE + test "$arch" = 'none' || echo "Architecture: $arch" >> $FILE + echo "Version: $VERSION Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} @@ -534,8 +534,8 @@ Priority: $PRIORITY Section: other Installed-Size: 42 Maintainer: Joe Sixpack -Architecture: $arch Version: $VERSION" >> $FILE + test "$arch" = 'none' || echo "Architecture: $arch" >> $FILE test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE echo "Description: an autogenerated dummy ${NAME}=${VERSION}/installed If you find such a package installed on your system, @@ -818,7 +818,7 @@ testnopackage() { testdpkginstalled() { msgtest "Test for correctly installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* | grep '^i' | wc -l)" + local PKGS="$(dpkg -l $* 2>/dev/null | grep '^i' | wc -l)" if [ "$PKGS" != $# ]; then echo $PKGS dpkg -l $* | grep '^[a-z]' diff --git a/test/integration/test-bug-686346-package-missing-architecture b/test/integration/test-bug-686346-package-missing-architecture new file mode 100755 index 000000000..b0e0aa3c4 --- /dev/null +++ b/test/integration/test-bug-686346-package-missing-architecture @@ -0,0 +1,87 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'pkgb' 'none' '1' +insertinstalledpackage 'pkgd' 'none' '1' +insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb' +insertpackage 'unstable' 'pkgb' 'amd64' '2' +insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb' +insertpackage 'unstable' 'pkge' 'none' '1' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + pkgb:none +The following NEW packages will be installed: + pkgc +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv pkgb:none [1] +Inst pkgc (1 unstable [amd64]) +Conf pkgc (1 unstable [amd64])' aptget install pkgc -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + pkgb +The following packages will be REMOVED: + pkgb:none +The following NEW packages will be installed: + pkga pkgb +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv pkgb:none [1] +Inst pkgb (2 unstable [amd64]) +Inst pkga (2 unstable [amd64]) +Conf pkgb (2 unstable [amd64]) +Conf pkga (2 unstable [amd64])' aptget install pkga -s + +# ensure that arch-less stanzas from Packages files are ignored +msgtest 'Package is distributed in the Packages files' 'pkge' +grep -q 'Package: pkge' $(find aptarchive -name 'Packages') && msgpass || msgfail +testnopackage pkge +testnopackage pkge:none +testnopackage pkge:* + +# do not automatically change from none-arch to whatever-arch as +# this breaks other none packages and dpkg has this ruleset as +# this difference seems so important that it has to be maintained … +testequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s + +# pkgd has no update with an architecture +testdpkginstalled pkgd +msgtest 'Test apt-get purge' 'pkgd' +aptget purge pkgd -y >/dev/null 2>&1 && msgpass || msgfail +testdpkgnotinstalled pkgd + +# there is a pkgb with an architecture +testdpkginstalled pkgb +msgtest 'Test apt-get purge' 'pkgb:none' +aptget purge pkgb:none -y >/dev/null 2>&1 && msgpass || msgfail +testdpkgnotinstalled pkgb + +# check that dependencies are created after the none package exists in the cache +rm rootdir/var/cache/apt/*.bin +insertinstalledpackage 'pkgb' 'none' '1' +insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb' +insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb' +insertinstalledpackage 'pkgb' 'amd64' '2' +testequal "Reading package lists... +Building dependency tree... +Reading state information... +You might want to run 'apt-get -f install' to correct these. +The following packages have unmet dependencies: + pkgb : Conflicts: pkgb:none but 1 is installed + pkgb:none : Conflicts: pkgb but 2 is installed + pkgf:none : Conflicts: pkgb:none but 1 is installed + Conflicts: pkgb but 2 is installed + pkgg : Conflicts: pkgb but 2 is installed + Conflicts: pkgb:none but 1 is installed +E: Unmet dependencies. Try using -f." aptget check -- cgit v1.2.3 From 7605509f7cc97e5e94d3159f9cd5c2c98b876720 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 19 Sep 2012 11:35:53 +0200 Subject: * apt-pkg/pkgcachegen.cc: - ensure that dependencies for packages:none are always generated --- .../test-bug-686346-package-missing-architecture | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/integration') diff --git a/test/integration/test-bug-686346-package-missing-architecture b/test/integration/test-bug-686346-package-missing-architecture index b0e0aa3c4..b2c9ec9ee 100755 --- a/test/integration/test-bug-686346-package-missing-architecture +++ b/test/integration/test-bug-686346-package-missing-architecture @@ -85,3 +85,25 @@ The following packages have unmet dependencies: pkgg : Conflicts: pkgb but 2 is installed Conflicts: pkgb:none but 1 is installed E: Unmet dependencies. Try using -f." aptget check + +# check that dependencies are generated for none-packages +rm rootdir/var/lib/dpkg/status +insertinstalledpackage 'pkgx' 'none' '1' +insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)' +insertinstalledpackage 'pkgz' 'none' '1' +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgx:none* pkgy:none* +0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. +Purg pkgy:none [1] +Purg pkgx:none [1]' aptget purge pkgx -s +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgy:none* pkgz:none* +0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. +Purg pkgy:none [1] +Purg pkgz:none [1]' aptget purge pkgz -s -- cgit v1.2.3 From 021626db10191cc4388b0516687dbc51bba18820 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 19 Sep 2012 12:04:02 +0200 Subject: * apt-pkg/pkgcache.cc: - ignore negative dependencies applying in the same group for M-A:same packages on the real package name as self-conflicts --- .../integration/test-conflicts-real-multiarch-same | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 test/integration/test-conflicts-real-multiarch-same (limited to 'test/integration') diff --git a/test/integration/test-conflicts-real-multiarch-same b/test/integration/test-conflicts-real-multiarch-same new file mode 100755 index 000000000..d9111677c --- /dev/null +++ b/test/integration/test-conflicts-real-multiarch-same @@ -0,0 +1,50 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'unstable' 'virtual-provider' 'amd64,i386' '2' 'Provides: virtual +Conflicts: virtual +Multi-Arch: same' +insertpackage 'unstable' 'real' 'amd64,i386' '2' 'Conflicts: real +Multi-Arch: same' +insertpackage 'unstable' 'real-provider' 'amd64,i386' '2' 'Provides: real-provider +Conflicts: real-provider +Multi-Arch: same' +setupaptarchive + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'virtual-provider' instead of 'virtual' +Note, selecting 'virtual-provider:i386' instead of 'virtual:i386' +The following NEW packages will be installed: + virtual-provider virtual-provider:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst virtual-provider (2 unstable [amd64]) +Inst virtual-provider:i386 (2 unstable [i386]) +Conf virtual-provider (2 unstable [amd64]) +Conf virtual-provider:i386 (2 unstable [i386])" aptget install virtual:* -s -q=0 + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + real real:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst real (2 unstable [amd64]) +Inst real:i386 (2 unstable [i386]) +Conf real (2 unstable [amd64]) +Conf real:i386 (2 unstable [i386])' aptget install real:* -s -q=0 + +# ensure that we are not confused by the provides +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + real-provider real-provider:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst real-provider (2 unstable [amd64]) +Inst real-provider:i386 (2 unstable [i386]) +Conf real-provider (2 unstable [amd64]) +Conf real-provider:i386 (2 unstable [i386])' aptget install real-provider:* -s -q=0 -- cgit v1.2.3