]> git.saurik.com Git - apt.git/blob - test/integration/skip-bug-601016-description-translation
Add new configallowinsecurerepositories to the test framework
[apt.git] / test / integration / skip-bug-601016-description-translation
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'i386' 'amd64'
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 MD5Sum='Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
13
14 PACKAGESTANZA='Package: apt
15 Priority: important
16 Section: admin
17 Installed-Size: 5984
18 Maintainer: APT Development Team <deity@lists.debian.org>
19 Architecture: i386
20 Version: 0.8.7
21 Filename: pool/main/a/apt/apt_0.8.7_i386.deb
22 Size: 2140230
23 MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08'
24
25 PACKAGESTANZA2='Package: apt
26 Priority: important
27 Section: admin
28 Installed-Size: 5984
29 Maintainer: APT Development Team <deity@lists.debian.org>
30 Architecture: amd64
31 Version: 0.8.7
32 Filename: pool/main/a/apt/apt_0.8.7_amd64.deb
33 Size: 2210342
34 MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a'
35
36 echo "$PACKAGESTANZA
37 Description: Advanced front-end for dpkg
38 $MD5Sum
39
40 $PACKAGESTANZA2
41 Description: Advanced front-end for dpkg
42 $MD5Sum" > aptarchive/Packages
43
44 echo "Package: apt
45 Description-${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-*)
54 echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate
55
56 NOLONGSTANZA="$PACKAGESTANZA
57 Description: Advanced front-end for dpkg
58 $MD5Sum
59 "
60
61 ENGLISHSTANZA="$PACKAGESTANZA
62 Description: Advanced front-end for dpkg
63 $MD5Sum
64 "
65
66 LOCALESTANZA="$PACKAGESTANZA
67 Description-${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 "
74 LOCALESTANZA2="$PACKAGESTANZA2
75 Description-${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
83 testrun() {
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
101 testrun
102
103 echo "$PACKAGESTANZA
104 Description: Advanced front-end for dpkg
105 $MD5Sum
106
107 $PACKAGESTANZA2
108 Description: Advanced front-end for dpkg
109 $MD5Sum" > aptarchive/Packages
110
111 echo "Package: apt
112 Description-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
118 ENGLISHSTANZA="$PACKAGESTANZA
119 Description-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 "
125 ENGLISHSTANZA2="$PACKAGESTANZA2
126 Description-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
133 testrun