summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:10:15 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:10:15 +0200
commit8de79b68a834a6cc7abb8976e96ed19374fc02a2 (patch)
treeaead647a6dcafc84404073459e15d5fd603b3c6a /test/integration
parent95b5f6c19d361745c4e11b214f0f07ad10c9b5b3 (diff)
remove the caches in 'apt-get update', too, as they will be
invalid in most cases anyway
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-bug-254770-segfault-if-cache-not-buildable1
-rwxr-xr-xtest/integration/test-bug-590438-broken-provides-thanks-to-remove-order2
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files2
-rwxr-xr-xtest/integration/test-bug-601016-description-translation2
-rwxr-xr-xtest/integration/test-bug-633350-do-not-kill-last-char-in-Release2
-rwxr-xr-xtest/integration/test-compressed-indexes9
-rwxr-xr-xtest/integration/test-hashsum-verification2
-rwxr-xr-xtest/integration/test-policy-pinning7
-rwxr-xr-xtest/integration/test-releasefile-verification3
9 files changed, 8 insertions, 22 deletions
diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
index b9f45b131..8fa337ccc 100755
--- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable
+++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
@@ -12,7 +12,6 @@ trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
chmod a-x rootdir/var/lib/dpkg
testsegfault() {
- rm -f rootdir/var/cache/apt/*.bin
msgtest "No segfault in" "$*"
local TEST="$($* 2>&1 | grep -v 'E:')"
if [ -z "$TEST" ]; then
diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
index 0f6493948..645e86d7d 100755
--- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
+++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
@@ -25,7 +25,6 @@ MD5sum: 8489687ce10e656babd467c9ee389349
Description-de: Verschiedene Dateien für das Basis-System von Debian"
predependsgawk() {
- rm rootdir/var/cache/apt/*.bin
cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
echo "$pkgbasefile
Pre-Depends: $1
@@ -57,7 +56,6 @@ predependsgawk "awk | aawk"
predependsgawk "awk"
predependsgawk2() {
- rm rootdir/var/cache/apt/*.bin
cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
echo "$pkgbasefile
Pre-Depends: $1
diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files
index 11dee0628..5c103da6f 100755
--- a/test/integration/test-bug-595691-empty-and-broken-archive-files
+++ b/test/integration/test-bug-595691-empty-and-broken-archive-files
@@ -11,7 +11,7 @@ touch aptarchive/Packages
setupflataptarchive
testaptgetupdate() {
- rm -rf rootdir/var/lib/apt rootdir/var/cache/apt
+ rm -rf rootdir/var/lib/apt
aptget update 2>> testaptgetupdate.diff >> testaptgetupdate.diff || true
sed -i -e '/^Fetched / d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff
GIVEN="$1"
diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation
index 2a323a201..44ab91900 100755
--- a/test/integration/test-bug-601016-description-translation
+++ b/test/integration/test-bug-601016-description-translation
@@ -57,7 +57,7 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg
testrun() {
echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
export LC_ALL=""
- rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/
+ rm -rf rootdir/var/lib/apt/lists
setupaptarchive
testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE}
testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE}
diff --git a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
index 3d3835507..2aae7cfcc 100755
--- a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
+++ b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
@@ -15,7 +15,7 @@ echo 'NotAutomatic: yes' >> aptarchive/dists/unstable/Release
signreleasefiles
find aptarchive/dists -name 'InRelease' -delete
-rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt
+rm -rf rootdir/var/lib/apt/lists
OUTPUT="$(aptget update 2>&1)"
msgtest 'Check that parsing happens without warnings' 'with missing newline'
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index 99943574e..26a45812e 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -51,17 +51,16 @@ testrun() {
aptget clean
msgtest "\tdeb file is gone"; ! test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb && msgpass || msgfail
fi
- rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
+ rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
testequal "$GOODSHOW" aptcache show testpkg
testequal "$GOODSHOW" aptcache show testpkg
- rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
+ rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
testequal "$GOODPOLICY" aptcache policy testpkg
testequal "$GOODPOLICY" aptcache policy testpkg
- rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
+ rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
testequal "$GOODSHOWSRC" aptcache showsrc testpkg
testequal "$GOODSHOWSRC" aptcache showsrc testpkg
- rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin
- rm -rf rootdir/var/cache/apt/archives
+ aptget clean
msgtest "Check if the source is aptgetable"
aptget source testpkg -qq 2> /dev/null > /dev/null && msgpass || msgfail
msgtest "\tdsc file is present"; test -f testpkg_1.0.dsc && msgpass || msgfail
diff --git a/test/integration/test-hashsum-verification b/test/integration/test-hashsum-verification
index 033096ee8..3ac9eccfb 100755
--- a/test/integration/test-hashsum-verification
+++ b/test/integration/test-hashsum-verification
@@ -19,8 +19,6 @@ prepare() {
for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do
touch -d 'now - 6 hours' $release
done
- rm -rf rootdir/var/cache/apt/archives
- rm -f rootdir/var/cache/apt/*.bin
cp $1 aptarchive/Packages
find aptarchive -name 'Release' -delete
cat aptarchive/Packages | gzip > aptarchive/Packages.gz
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index fa356ed54..6b1473564 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -30,21 +30,18 @@ testequalpolicy 100 500
testequalpolicy 990 500 -t now
sed -i aptarchive/Release -e 1i"NotAutomatic: yes"
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicy 100 1 -o Test=NotAutomatic
testequalpolicy 990 1 -o Test=NotAutomatic -t now
sed -i aptarchive/Release -e 1i"ButAutomaticUpgrades: yes"
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicy 100 100 -o Test=ButAutomaticUpgrades
testequalpolicy 990 100 -o Test=ButAutomaticUpgrades -t now
sed -i aptarchive/Release -e 's#NotAutomatic: yes#NotAutomatic: no#' -e '/ButAutomaticUpgrades: / d'
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicy 100 500 -o Test=Automatic
@@ -135,7 +132,6 @@ Pin-Priority: -1" > rootdir/etc/apt/preferences
rm rootdir/etc/apt/preferences
sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
signreleasefiles
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic
@@ -164,7 +160,6 @@ testequalpolicycoolstuff "" "1.0" 1 990 600 "2.0~bpo1" -o Test=NotAutomatic -t s
rm rootdir/etc/apt/preferences
sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
signreleasefiles
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades
@@ -211,7 +206,6 @@ setupaptarchive
sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
signreleasefiles
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 0 "" "2.0~bpo2" -o Test=NotAutomatic
@@ -220,7 +214,6 @@ testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 0 "" "2.0~bpo2" -o Test=N
sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
signreleasefiles
-rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin
aptget update -qq
testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index 961c49895..8bf02a78f 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -19,8 +19,7 @@ prepare() {
for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do
touch -d 'now - 6 hours' $release
done
- rm -rf rootdir/var/cache/apt/archives
- rm -f rootdir/var/cache/apt/*.bin
+ aptget clean
cp $1 aptarchive/Packages
find aptarchive -name 'Release' -delete
cat aptarchive/Packages | gzip > aptarchive/Packages.gz