summaryrefslogtreecommitdiff
path: root/test/integration/test-unpack-different-version-unpacked
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-08-30 12:21:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-08-30 12:21:32 +0200
commitd4b4e5ea2ceb02699e746d52256b3a8ac2d9bda2 (patch)
tree597259a2a9ea8b96c904ba873262bbdaf0ac46ed /test/integration/test-unpack-different-version-unpacked
parent2e5aabb85447ba6f1feeb4dbbd59c70e3cc76bb9 (diff)
* apt-pkg/packagemanager.cc:
- unpack versions in case a different version from the package is currently in unpack state to recover from broken system states (like different file in M-A:same package and other dpkg errors)
Diffstat (limited to 'test/integration/test-unpack-different-version-unpacked')
-rwxr-xr-xtest/integration/test-unpack-different-version-unpacked121
1 files changed, 121 insertions, 0 deletions
diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked
new file mode 100755
index 000000000..952f6e6b2
--- /dev/null
+++ b/test/integration/test-unpack-different-version-unpacked
@@ -0,0 +1,121 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertpackage 'unstable' 'libqtcore4' 'i386,amd64' '2' 'Multi-Arch: same'
+setupaptarchive
+
+DPKGSTATUS='rootdir/var/lib/dpkg/status'
+cp $DPKGSTATUS dpkg.status
+
+cleanstatus() {
+ cp dpkg.status $DPKGSTATUS
+ rm rootdir/var/cache/apt/*.bin
+}
+
+#FIXME: the reported version is wrong, it should be 1, not 2
+insertinstalledpackage 'libqtcore4' 'i386,amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked'
+testequal 'Reading package lists...
+Building dependency tree...
+0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
+2 not fully installed or removed.
+Conf libqtcore4 (2 unstable [amd64])
+Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked'
+insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4:i386
+The following packages will be upgraded:
+ libqtcore4:i386
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+2 not fully installed or removed.
+Inst libqtcore4:i386 [1] (2 unstable [i386])
+Conf libqtcore4:i386 (2 unstable [i386])
+Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked'
+insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4
+The following packages will be upgraded:
+ libqtcore4
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+2 not fully installed or removed.
+Inst libqtcore4 [1] (2 unstable [amd64])
+Conf libqtcore4 (2 unstable [amd64])
+Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked'
+insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4:i386
+The following packages will be upgraded:
+ libqtcore4:i386
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+1 not fully installed or removed.
+Inst libqtcore4:i386 [1] (2 unstable [i386])
+Conf libqtcore4:i386 (2 unstable [i386])
+Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked'
+insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4
+The following packages will be upgraded:
+ libqtcore4
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+1 not fully installed or removed.
+Inst libqtcore4 [1] (2 unstable [amd64])
+Conf libqtcore4 (2 unstable [amd64])
+Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same'
+insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4:i386
+The following packages will be upgraded:
+ libqtcore4:i386
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+1 not fully installed or removed.
+Inst libqtcore4:i386 [1] (2 unstable [i386])
+Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f
+
+cleanstatus
+insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same'
+insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked'
+testequal 'Reading package lists...
+Building dependency tree...
+Correcting dependencies... Done
+The following extra packages will be installed:
+ libqtcore4
+The following packages will be upgraded:
+ libqtcore4
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+1 not fully installed or removed.
+Inst libqtcore4 [1] (2 unstable [amd64])
+Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f