From 82c6f7528d583431722ef180b6064b86b644ad85 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 12 Jun 2012 15:40:56 +0200 Subject: add a testcase for #675449, which i forgot to commit --- .../test-bug-675449-essential-are-protected | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 test/integration/test-bug-675449-essential-are-protected (limited to 'test/integration/test-bug-675449-essential-are-protected') diff --git a/test/integration/test-bug-675449-essential-are-protected b/test/integration/test-bug-675449-essential-are-protected new file mode 100755 index 000000000..7d8cc3484 --- /dev/null +++ b/test/integration/test-bug-675449-essential-are-protected @@ -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 -- cgit v1.2.3