remove duplicated config-option setting and rename testdpkgnotinstalled
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 3 Feb 2011 21:48:37 +0000 (22:48 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 3 Feb 2011 21:48:37 +0000 (22:48 +0100)
test/integration/framework
test/integration/test-autoremove

index fe1db14..e79d312 100644 (file)
@@ -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]'
index 1ca325b..f1ce4e9 100755 (executable)
@@ -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' ''