]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture "i386" | |
8 | ||
9 | # we need a valid locale here, otherwise the language configuration | |
10 | # will be overridden by LC_ALL=C | |
11 | LOCALE="$(echo "$LANG" | cut -d'_' -f 1)" | |
12 | ||
13 | PACKAGESTANZA="Package: apt | |
14 | Priority: important | |
15 | Section: admin | |
16 | Installed-Size: 5984 | |
17 | Maintainer: APT Development Team <deity@lists.debian.org> | |
18 | Architecture: i386 | |
19 | Version: 0.8.7 | |
20 | Filename: pool/main/a/apt/apt_0.8.7_i386.deb | |
21 | Size: 2140230 | |
22 | MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08 | |
23 | Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c" | |
24 | ||
25 | ||
26 | echo "$PACKAGESTANZA | |
27 | Description: Advanced front-end for dpkg" > aptarchive/Packages | |
28 | ||
29 | echo "Package: apt | |
30 | Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c | |
31 | Description-${LOCALE}: Mächtige Oberfläche für dpkg | |
32 | Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff | |
33 | auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die | |
34 | APT-Dselect-Methode. Beides sind einfache und sicherere Wege, | |
35 | um Pakete zu installieren und Upgrades durchzuführen." | bzip2 > aptarchive/${LOCALE}.bz2 | |
36 | ||
37 | # the $LOCALE translation file will not be included as it is a flat archive it came from and therefore | |
38 | # its name can not be guessed correctly… (in non-flat archives the files are called Translation-*) | |
39 | echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate | |
40 | ||
41 | NOLONGSTANZA="$PACKAGESTANZA | |
42 | Description: Advanced front-end for dpkg | |
43 | " | |
44 | ||
45 | ENGLISHSTANZA="$PACKAGESTANZA | |
46 | Description: Advanced front-end for dpkg | |
47 | " | |
48 | ||
49 | LOCALESTANZA="$PACKAGESTANZA | |
50 | Description-${LOCALE}: Mächtige Oberfläche für dpkg | |
51 | Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff | |
52 | auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die | |
53 | APT-Dselect-Methode. Beides sind einfache und sicherere Wege, | |
54 | um Pakete zu installieren und Upgrades durchzuführen. | |
55 | " | |
56 | ||
57 | testrun() { | |
58 | echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages | |
59 | export LC_ALL="" | |
60 | setupaptarchive | |
61 | testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE} | |
62 | testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} | |
63 | testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE} | |
64 | LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE} | |
65 | export LC_ALL="" | |
66 | echo "Acquire::Languages { \"ww\"; \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages | |
67 | testequal "$LOCALESTANZA" aptcache show apt -o Test=File-ww-${LOCALE} | |
68 | echo "Acquire::Languages { \"ww\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages | |
69 | testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-ww | |
70 | } | |
71 | ||
72 | testrun | |
73 | ||
74 | echo "$PACKAGESTANZA | |
75 | Description: Advanced front-end for dpkg" > aptarchive/Packages | |
76 | ||
77 | echo "Package: apt | |
78 | Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c | |
79 | Description-en: Advanced front-end for dpkg | |
80 | This is Debian's next generation front-end for the dpkg package manager. | |
81 | It provides the apt-get utility and APT dselect method that provides a | |
82 | simpler, safer way to install and upgrade packages." | bzip2 > aptarchive/en.bz2 | |
83 | ||
84 | ENGLISHSTANZA="$PACKAGESTANZA | |
85 | Description-en: Advanced front-end for dpkg | |
86 | This is Debian's next generation front-end for the dpkg package manager. | |
87 | It provides the apt-get utility and APT dselect method that provides a | |
88 | simpler, safer way to install and upgrade packages. | |
89 | " | |
90 | ||
91 | testrun |