From 01a6e24cd1b601df2f20190b6118c4616e7fedf2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 29 Sep 2010 19:55:04 +0200 Subject: * apt-pkg/depcache.cc: - do not check endpointer packages instead of only those which prevented NeverAutoRemove settings from having an effect (Closes: #598452) --- test/integration/test-autoremove | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'test/integration/test-autoremove') diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index fb39e979a..7127b3d82 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-autoremove @@ -4,26 +4,50 @@ set -e local TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +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" +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 +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf Architecture: i386 Auto-Installed: 1 -" +' aptget remove debhelper -y -qq 2>&1 > /dev/null +testdpkgnoninstalled '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' -testfileequal "rootdir/var/lib/apt/extended_states" "" +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 +testdpkgnoninstalled '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" ' +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) -- cgit v1.2.3 From 9962ae934b367294a57b27d58f7cdb4e2d54ce04 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Oct 2010 15:22:48 +0200 Subject: tests/integration/test-*: remove a bunch of "local" that are used outside funtions (bash complains) --- test/integration/test-autoremove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration/test-autoremove') diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index 7127b3d82..1ca325b29 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-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' -- cgit v1.2.3