summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-03 23:25:53 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-03 23:25:53 +0100
commiteb76e936982bd65ebd6a147c1c23ef2613891367 (patch)
treecac36346bcac96900f67a17affffa9b55630a516 /test
parent87bc1c45de94da47587d8e0314e9087f33a2b89e (diff)
test various situation with and without autobit setting
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-bug-611729-mark-as-manual105
1 files changed, 105 insertions, 0 deletions
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' ''