]> git.saurik.com Git - apt.git/blame_incremental - test/integration/skip-bug-601016-description-translation
Make directory paths configurable
[apt.git] / test / integration / skip-bug-601016-description-translation
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'i386' 'amd64'
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)"
12MD5Sum='Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
13
14PACKAGESTANZA='Package: apt
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
23MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08'
24
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
34MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a'
35
36echo "$PACKAGESTANZA
37Description: Advanced front-end for dpkg
38$MD5Sum
39
40$PACKAGESTANZA2
41Description: Advanced front-end for dpkg
42$MD5Sum" > aptarchive/Packages
43
44echo "Package: apt
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,
49 um Pakete zu installieren und Upgrades durchzuführen.
50$MD5Sum" | bzip2 > aptarchive/${LOCALE}.bz2
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
58$MD5Sum
59"
60
61ENGLISHSTANZA="$PACKAGESTANZA
62Description: Advanced front-end for dpkg
63$MD5Sum
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.
72$MD5Sum
73"
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.
80$MD5Sum
81"
82
83testrun() {
84 echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
85 export LC_ALL=""
86 rm -rf rootdir/var/lib/apt/lists
87 setupaptarchive
88 testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE}
89 testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE}
90 testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE}
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
104Description: Advanced front-end for dpkg
105$MD5Sum
106
107$PACKAGESTANZA2
108Description: Advanced front-end for dpkg
109$MD5Sum" > aptarchive/Packages
110
111echo "Package: apt
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
115 simpler, safer way to install and upgrade packages.
116$MD5Sum" | bzip2 > aptarchive/en.bz2
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.
123$MD5Sum
124"
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.
130$MD5Sum
131"
132
133testrun