summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework2
-rwxr-xr-xtest/integration/test-allow-scores-for-all-dependency-types5
-rwxr-xr-xtest/integration/test-apt-cache-remapping1
-rwxr-xr-xtest/integration/test-apt-cli-update3
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove4
-rwxr-xr-xtest/integration/test-bug-673536-pre-depends-breaks-loop5
-rwxr-xr-xtest/integration/test-bug-782777-single-arch-weirdness3
-rwxr-xr-xtest/integration/test-failing-maintainer-scripts9
-rwxr-xr-xtest/integration/test-policy-pinning2
-rwxr-xr-xtest/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings3
-rwxr-xr-xtest/integration/test-ubuntu-bug-784473-InRelease-one-message-only4
-rwxr-xr-xtest/integration/test-unpack-different-version-unpacked5
12 files changed, 19 insertions, 27 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 5e1e68a98..d50b63518 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -626,8 +626,6 @@ configdpkg() {
if tail -1 rootdir/var/lib/dpkg/status | grep -q .; then
echo >> rootdir/var/lib/dpkg/status
fi
- else
- echo -n > rootdir/var/lib/dpkg/status
fi
fi
rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg
diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types
index b8a9ed3ea..999efc04e 100755
--- a/test/integration/test-allow-scores-for-all-dependency-types
+++ b/test/integration/test-allow-scores-for-all-dependency-types
@@ -37,7 +37,6 @@ insertpackage 'jessie' 'login' 'amd64' '2' 'Pre-Depends: libaudit1 (>= 0)'
insertpackage 'jessie' 'libaudit1' 'amd64' '2' 'Depends: libaudit-common (>= 0)'
insertpackage 'jessie' 'libaudit-common' 'amd64' '2' 'Breaks: libaudit0, libaudit1 (<< 2)'
-cp rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup
setupaptarchive
insertinstalledpackage 'libdb-dev' 'amd64' '5.1.7' 'Depends: libdb5.1-dev'
@@ -73,7 +72,7 @@ Inst libdb5.3-dev (5.3.28-3 versioned [amd64])
Conf libdb-dev (5.3.0 versioned [amd64])
Conf libdb5.3-dev (5.3.28-3 versioned [amd64])' aptget dist-upgrade -st versioned
-cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
insertinstalledpackage 'foo' 'amd64' '1'
insertinstalledpackage 'bar' 'amd64' '1'
testsuccessequal 'Reading package lists...
@@ -131,7 +130,7 @@ Conf bar (2 versioned [amd64])
Conf baz (2 versioned [amd64])' aptget install baz -st versioned
# recreating the exact situation is hard, so we pull tricks to get the score
-cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
insertinstalledpackage 'gdm3' 'amd64' '1' 'Depends: libaudit0, libaudit0'
insertinstalledpackage 'login' 'amd64' '1' 'Essential: yes'
insertinstalledpackage 'libaudit0' 'amd64' '1'
diff --git a/test/integration/test-apt-cache-remapping b/test/integration/test-apt-cache-remapping
index 31a406c57..19647a6a4 100755
--- a/test/integration/test-apt-cache-remapping
+++ b/test/integration/test-apt-cache-remapping
@@ -8,6 +8,7 @@ setupenvironment
configarchitecture 'amd64'
buildsimplenativepackage 'foo' 'amd64' '1'
+insertinstalledpackage 'bar' 'all' '1'
# the default is 1MB – too much for our simple tests
echo 'APT::Cache-Grow "1000";' > rootdir/etc/apt/apt.conf.d/limit-cachegrow.conf
diff --git a/test/integration/test-apt-cli-update b/test/integration/test-apt-cli-update
index cc8d051d2..810221510 100755
--- a/test/integration/test-apt-cli-update
+++ b/test/integration/test-apt-cli-update
@@ -8,7 +8,6 @@ setupenvironment
configarchitecture "i386"
insertpackage 'unstable' 'foo' 'all' '2.0'
-cp rootdir/var/lib/dpkg/status dpkg.status
insertinstalledpackage 'foo' 'all' '1.0'
setupaptarchive --no-update
@@ -18,6 +17,6 @@ testfailuremsg 'E: The update command takes no arguments' apt update arguments
testempty apt update -qq -o pkgCacheFile::Generate=false
testsuccessequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -qq
-cp dpkg.status rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
insertinstalledpackage 'foo' 'all' '2.0'
testsuccessequal 'All packages are up to date.' apt update -qq
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index 08756e03d..47da810c6 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -19,7 +19,6 @@ insertpackage 'stable' 'libkipi-data' 'i386' '4:15.08.0-1' '' 'important'
setupaptarchive
-cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status.backup
insertinstalledpackage 'libvtk5.4' 'i386' '5.4.2-7'
testsuccess aptmark markauto 'libvtk5.4'
testmarkedauto 'libvtk5.4'
@@ -80,8 +79,7 @@ Need to get 0 B/126 B of archives.
After this operation, 129 kB of additional disk space will be used.
E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
-cp rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
-rm -f rootdir/var/lib/apt/extended_states
+rm -f rootdir/var/lib/dpkg/status rootdir/var/lib/apt/extended_states
CONFLICTING='Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop
index a4cf66973..650866ee5 100755
--- a/test/integration/test-bug-673536-pre-depends-breaks-loop
+++ b/test/integration/test-bug-673536-pre-depends-breaks-loop
@@ -18,11 +18,8 @@ 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
-cp -a rootdir/var/lib/dpkg/status dpkg.status.backup
-
testloopbreak() {
- cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
- rm -f rootdir/var/lib/apt/extended_states
+ rm -f rootdir/var/lib/dpkg/status rootdir/var/lib/apt/extended_states
testsuccess aptget install advanced=1 -y -t "$1"
testdpkginstalled advanced
diff --git a/test/integration/test-bug-782777-single-arch-weirdness b/test/integration/test-bug-782777-single-arch-weirdness
index 41be1e79c..695d053d3 100755
--- a/test/integration/test-bug-782777-single-arch-weirdness
+++ b/test/integration/test-bug-782777-single-arch-weirdness
@@ -50,7 +50,6 @@ is only available from another source
E: Package 'abar:amd64' has no installation candidate
E: Package 'zfoo:amd64' has no installation candidate" aptget install abar:amd64 zfoo:amd64 -s
- cp -f rootdir/var/lib/dpkg/status status.backup
insertinstalledpackage 'abar' 'i386' '1'
insertinstalledpackage 'zfoo' 'i386' '1'
@@ -62,7 +61,7 @@ zfoo set to automatically installed.' aptmark auto abar zfoo
testequal 'abar
zfoo' aptmark showauto abar zfoo
- mv -f status.backup rootdir/var/lib/dpkg/status
+ rm -f rootdir/var/lib/dpkg/status
}
msgmsg 'Single-Arch testrun'
diff --git a/test/integration/test-failing-maintainer-scripts b/test/integration/test-failing-maintainer-scripts
index 8cf2380ee..c2d631634 100755
--- a/test/integration/test-failing-maintainer-scripts
+++ b/test/integration/test-failing-maintainer-scripts
@@ -70,22 +70,21 @@ testmyfailure() {
testmarkedauto 'dependee'
}
-cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status.backup
testmyfailure aptget install failure-preinst -y
-cp -a rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
testmyfailure aptget install failure-postinst -y
-cp -a rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
testsuccess aptget install failure-prerm -y
testdpkginstalled failure-prerm
testmyfailure aptget purge failure-prerm -y
-cp -a rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
testsuccess aptget install failure-postrm -y
testdpkginstalled failure-postrm
testmyfailure aptget purge failure-postrm -y
# FIXME: test with output going to a PTY as it usually does
if false; then
- cp -a rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
+ rm -f rootdir/var/lib/dpkg/status
apt install dependee -y || true
apt install failure-postinst -y || true
fi
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index fccef6da3..dc3192fe9 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -7,6 +7,8 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
setupenvironment
configarchitecture "i386"
+insertinstalledpackage 'foobar' 'all' '1'
+
buildaptarchive
setupflataptarchive
diff --git a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
index 4ac5e9060..d76602631 100755
--- a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
+++ b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
@@ -43,7 +43,6 @@ Inst steam:i386 (2 unstable [i386])
Conf libmesa:i386 (2 unstable [i386])
Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable
-cp rootdir/var/lib/dpkg/status default-status.dpkg
insertinstalledpackage 'libmesa' 'amd64' '1' 'Multi-Arch: same'
testsuccessequal 'Reading package lists...
Building dependency tree...
@@ -72,7 +71,7 @@ Conf libmesa (2 unstable [amd64])
Conf libmesa:i386 (2 unstable [i386])
Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable
-cp default-status.dpkg rootdir/var/lib/dpkg/status
+rm -f rootdir/var/lib/dpkg/status
insertinstalledpackage 'libmesa-lts' 'amd64' '1' 'Provides: libmesa
Conflicts: libmesa
Multi-Arch: same'
diff --git a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
index fe42ba83d..80e41f2c2 100755
--- a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
+++ b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
@@ -28,6 +28,10 @@ done
testfailure aptget update
testsuccess grep '^E:.*Clearsigned file .*NOSPLIT.*' rootdir/tmp/testfailure.output
+testsuccessequal "Package files:
+Pinned packages:" aptcache policy
+
+insertinstalledpackage 'foo' 'all' '1'
ROOTDIR="$(readlink -f .)"
testsuccessequal "Package files:
diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked
index bcb483639..e7da64ceb 100755
--- a/test/integration/test-unpack-different-version-unpacked
+++ b/test/integration/test-unpack-different-version-unpacked
@@ -9,11 +9,8 @@ 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 -f rootdir/var/lib/dpkg/status
rm rootdir/var/cache/apt/*.bin
}