]> git.saurik.com Git - apt.git/commitdiff
add a testcase for #675449, which i forgot to commit
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 12 Jun 2012 13:40:56 +0000 (15:40 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 12 Jun 2012 13:40:56 +0000 (15:40 +0200)
test/integration/test-673536-pre-depends-breaks-loop [deleted file]
test/integration/test-bug-673536-pre-depends-breaks-loop [new file with mode: 0755]
test/integration/test-bug-675449-essential-are-protected [new file with mode: 0755]

diff --git a/test/integration/test-673536-pre-depends-breaks-loop b/test/integration/test-673536-pre-depends-breaks-loop
deleted file mode 100755 (executable)
index e9d3c4d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -e
-
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
-setupenvironment
-configarchitecture 'native'
-
-buildsimplenativepackage 'basic' 'native' '1' 'stable'
-buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
-buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)'
-
-setupaptarchive
-
-# we check with 'real' packages here as the simulation reports a 'Conf broken'
-# which is technical correct for the simulation, but testing errormsg is ugly
-
-aptget install basic=1 -qq > /dev/null
-testdpkginstalled basic
-testdpkgnotinstalled common
-
-aptget dist-upgrade -qq > /dev/null
-testdpkginstalled basic common
diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop
new file mode 100755 (executable)
index 0000000..e9d3c4d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+buildsimplenativepackage 'basic' 'native' '1' 'stable'
+buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
+buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)'
+
+setupaptarchive
+
+# we check with 'real' packages here as the simulation reports a 'Conf broken'
+# which is technical correct for the simulation, but testing errormsg is ugly
+
+aptget install basic=1 -qq > /dev/null
+testdpkginstalled basic
+testdpkgnotinstalled common
+
+aptget dist-upgrade -qq > /dev/null
+testdpkginstalled basic common
diff --git a/test/integration/test-bug-675449-essential-are-protected b/test/integration/test-bug-675449-essential-are-protected
new file mode 100755 (executable)
index 0000000..7d8cc34
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertinstalledpackage 'pkg-native' 'amd64' '1' 'Multi-Arch: foreign
+Essential: yes'
+insertinstalledpackage 'pkg-foreign' 'i386' '1' 'Multi-Arch: foreign
+Essential: yes'
+insertinstalledpackage 'pkg-none-native' 'amd64' '1' 'Essential: yes'
+insertinstalledpackage 'pkg-none-foreign' 'i386' '1' 'Essential: yes'
+
+insertpackage 'unstable' 'pkg-native' 'amd64,i386' '2' 'Multi-Arch: foreign
+Essential: yes'
+insertpackage 'unstable' 'pkg-foreign' 'amd64,i386' '2' 'Multi-Arch: foreign
+Depends: pkg-depends-new
+Essential: yes'
+insertpackage 'unstable' 'pkg-none-native' 'amd64,i386' '2' 'Essential: yes'
+insertpackage 'unstable' 'pkg-none-foreign' 'amd64,i386' '2' 'Essential: yes
+Depends: pkg-depends-new'
+
+insertpackage 'unstable' 'pkg-none-new' 'amd64,i386' '2' 'Essential: yes'
+insertpackage 'unstable' 'pkg-depends-new' 'amd64,i386' '2' 'Essential: yes'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+  pkg-native*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+  pkg-native
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-native [1]' aptget purge pkg-native -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+  pkg-foreign:i386*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+  pkg-foreign:i386
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-foreign:i386 [1]' aptget purge pkg-foreign:i386 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+  pkg-none-native*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+  pkg-none-native
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-none-native [1]' aptget purge pkg-none-native -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+  pkg-none-foreign:i386*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+  pkg-none-foreign:i386
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-none-foreign:i386 [1]' aptget purge pkg-none-foreign:i386 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  pkg-depends-new:i386 pkg-none-new
+The following packages will be upgraded:
+  pkg-foreign:i386 pkg-native pkg-none-foreign:i386 pkg-none-native
+4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst pkg-depends-new:i386 (2 unstable [i386])
+Conf pkg-depends-new:i386 (2 unstable [i386])
+Inst pkg-foreign:i386 [1] (2 unstable [i386])
+Conf pkg-foreign:i386 (2 unstable [i386])
+Inst pkg-native [1] (2 unstable [amd64])
+Conf pkg-native (2 unstable [amd64])
+Inst pkg-none-foreign:i386 [1] (2 unstable [i386])
+Conf pkg-none-foreign:i386 (2 unstable [i386])
+Inst pkg-none-native [1] (2 unstable [amd64])
+Conf pkg-none-native (2 unstable [amd64])
+Inst pkg-none-new (2 unstable [amd64])
+Conf pkg-none-new (2 unstable [amd64])' aptget dist-upgrade -s