]> git.saurik.com Git - apt.git/blame - test/integration/skip-bug-601016-description-translation
check hashes of compressed files as well
[apt.git] / test / integration / skip-bug-601016-description-translation
CommitLineData
4b625b95
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
5f4db009 7configarchitecture 'i386' 'amd64'
4b625b95
DK
8
9# we need a valid locale here, otherwise the language configuration
10# will be overridden by LC_ALL=C
11LOCALE="$(echo "$LANG" | cut -d'_' -f 1)"
e3c62328 12MD5Sum='Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
4b625b95 13
e3c62328 14PACKAGESTANZA='Package: apt
4b625b95
DK
15Priority: important
16Section: admin
17Installed-Size: 5984
18Maintainer: APT Development Team <deity@lists.debian.org>
19Architecture: i386
20Version: 0.8.7
21Filename: pool/main/a/apt/apt_0.8.7_i386.deb
22Size: 2140230
e3c62328 23MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08'
4b625b95 24
5f4db009
DK
25PACKAGESTANZA2='Package: apt
26Priority: important
27Section: admin
28Installed-Size: 5984
29Maintainer: APT Development Team <deity@lists.debian.org>
30Architecture: amd64
31Version: 0.8.7
32Filename: pool/main/a/apt/apt_0.8.7_amd64.deb
33Size: 2210342
e3c62328 34MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a'
4b625b95
DK
35
36echo "$PACKAGESTANZA
5f4db009 37Description: Advanced front-end for dpkg
e3c62328 38$MD5Sum
5f4db009
DK
39
40$PACKAGESTANZA2
e3c62328
DK
41Description: Advanced front-end for dpkg
42$MD5Sum" > aptarchive/Packages
4b625b95
DK
43
44echo "Package: apt
4b625b95
DK
45Description-${LOCALE}: Mächtige Oberfläche für dpkg
46 Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
47 auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
48 APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
e3c62328
DK
49 um Pakete zu installieren und Upgrades durchzuführen.
50$MD5Sum" | bzip2 > aptarchive/${LOCALE}.bz2
4b625b95
DK
51
52# the $LOCALE translation file will not be included as it is a flat archive it came from and therefore
53# its name can not be guessed correctly… (in non-flat archives the files are called Translation-*)
54echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate
55
56NOLONGSTANZA="$PACKAGESTANZA
57Description: Advanced front-end for dpkg
e3c62328 58$MD5Sum
4b625b95
DK
59"
60
61ENGLISHSTANZA="$PACKAGESTANZA
62Description: Advanced front-end for dpkg
e3c62328 63$MD5Sum
4b625b95
DK
64"
65
66LOCALESTANZA="$PACKAGESTANZA
67Description-${LOCALE}: Mächtige Oberfläche für dpkg
68 Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
69 auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
70 APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
71 um Pakete zu installieren und Upgrades durchzuführen.
e3c62328 72$MD5Sum
4b625b95 73"
5f4db009
DK
74LOCALESTANZA2="$PACKAGESTANZA2
75Description-${LOCALE}: Mächtige Oberfläche für dpkg
76 Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
77 auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
78 APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
79 um Pakete zu installieren und Upgrades durchzuführen.
e3c62328 80$MD5Sum
5f4db009 81"
4b625b95
DK
82
83testrun() {
84 echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
85 export LC_ALL=""
8de79b68 86 rm -rf rootdir/var/lib/apt/lists
4b625b95
DK
87 setupaptarchive
88 testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE}
5f4db009
DK
89 testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE}
90 testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE}
4b625b95
DK
91 testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE}
92 testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE}
93 LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE}
94 export LC_ALL=""
95 echo "Acquire::Languages { \"ww\"; \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
96 testequal "$LOCALESTANZA" aptcache show apt -o Test=File-ww-${LOCALE}
97 echo "Acquire::Languages { \"ww\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
98 testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-ww
99}
100
101testrun
102
103echo "$PACKAGESTANZA
5f4db009 104Description: Advanced front-end for dpkg
e3c62328 105$MD5Sum
5f4db009
DK
106
107$PACKAGESTANZA2
e3c62328
DK
108Description: Advanced front-end for dpkg
109$MD5Sum" > aptarchive/Packages
4b625b95
DK
110
111echo "Package: apt
4b625b95
DK
112Description-en: Advanced front-end for dpkg
113 This is Debian's next generation front-end for the dpkg package manager.
114 It provides the apt-get utility and APT dselect method that provides a
e3c62328
DK
115 simpler, safer way to install and upgrade packages.
116$MD5Sum" | bzip2 > aptarchive/en.bz2
4b625b95
DK
117
118ENGLISHSTANZA="$PACKAGESTANZA
119Description-en: Advanced front-end for dpkg
120 This is Debian's next generation front-end for the dpkg package manager.
121 It provides the apt-get utility and APT dselect method that provides a
122 simpler, safer way to install and upgrade packages.
e3c62328 123$MD5Sum
4b625b95 124"
5f4db009
DK
125ENGLISHSTANZA2="$PACKAGESTANZA2
126Description-en: Advanced front-end for dpkg
127 This is Debian's next generation front-end for the dpkg package manager.
128 It provides the apt-get utility and APT dselect method that provides a
129 simpler, safer way to install and upgrade packages.
e3c62328 130$MD5Sum
5f4db009 131"
4b625b95
DK
132
133testrun