summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-07-25 18:51:16 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-07-25 22:29:21 +0200
commita5b9f4890fc2b367b8f89d10ea2bdb88b8aa071a (patch)
tree49ba20da436871ef8041661e216d4e841cbba246 /test
parent462cfb71b8ebfa4da6b5681cee96931c927ae232 (diff)
pick up Translation-* even if only compressed available
On CD-ROMs Translation-* files are only in compressed form included in the Release file. This used to work while we had no record of Translation-* files in the Release file at all as APT would have just guessed the (compressed) filename and accepted it (unchecked), but now that it checks for the presents of entries and if it finds records it expects the uncompressed to be verifiable. This commit relaxes this requirement again to fix the regression. We are still secure "enough" as we can validate the compressed file we have downloaded, so we don't loose anything by not requiring a hashsum for the uncompressed files to double-check them. Closes: 717665
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-bug-624218-Translation-file-handling55
1 files changed, 34 insertions, 21 deletions
diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling
index d146b943c..d3c5b08ac 100755
--- a/test/integration/test-bug-624218-Translation-file-handling
+++ b/test/integration/test-bug-624218-Translation-file-handling
@@ -14,34 +14,47 @@ changetowebserver
rm -rf rootdir/var/lib/apt/lists
-msgtest 'No download of non-existent locals' 'with Index'
-LC_ALL="" aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+translationslisted() {
+ msgtest 'No download of non-existent locals' "$1"
+ LC_ALL="" aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
+ rm -rf rootdir/var/lib/apt/lists
-msgtest 'Download of existent locals' 'with Index'
-LC_ALL="" aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Download of existent locals' "$1"
+ LC_ALL="" aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
+ rm -rf rootdir/var/lib/apt/lists
-msgtest 'Download of en in LC_ALL=C' 'with Index'
-LC_ALL=C aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Download of en in LC_ALL=C' "$1"
+ LC_ALL=C aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
+ rm -rf rootdir/var/lib/apt/lists
-msgtest 'Download of en as forced language' 'with Index'
-aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Download of en as forced language' "$1"
+ aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail
+ rm -rf rootdir/var/lib/apt/lists
-msgtest 'Download of nothing else in forced language' 'with Index'
-aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Download of nothing else in forced language' "$1"
+ aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
+ rm -rf rootdir/var/lib/apt/lists
-msgtest 'Download no Translation- if forced language is non-existent' 'with Index'
-aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Download no Translation- if forced language is non-existent' "$1"
+ aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass
+ rm -rf rootdir/var/lib/apt/lists
+
+ msgtest 'Download of nothing if none is forced' "$1"
+ aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass
+ rm -rf rootdir/var/lib/apt/lists
+}
+
+translationslisted 'with full Index'
+
+
+# only compressed files available (as it happens on CD-ROM)
+sed -i '/i18n\/Translation-[^.]*$/ d' $(find aptarchive -name 'Release')
+signreleasefiles
+
+translationslisted 'with partial Index'
-msgtest 'Download of nothing if none is forced' 'with Index'
-aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+# no records at all about Translation files (fallback to guessing)
sed -i '/i18n\/Translation-.*$/ d' $(find aptarchive -name 'Release')
signreleasefiles