]>
Commit | Line | Data |
---|---|---|
a537ce19 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | BASE="Type: deb | |
11 | URL: http://ftp.debian.org/debian | |
12 | Dist: stable | |
13 | Section: main | |
14 | Comment: Some random string | |
15 | that can be very long" | |
16 | ||
17 | # simple case | |
18 | echo "$BASE" > rootdir/etc/apt/sources.list | |
19 | ||
20 | testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : | |
21 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
22 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris | |
23 | ||
24 | ||
300b15e3 MV |
25 | # two sections (we support both "," and " " as seperator) |
26 | echo "$BASE" | sed s/main/"main,contrib"/ > rootdir/etc/apt/sources.list | |
27 | ||
28 | testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : | |
29 | 'http://ftp.debian.org/debian/dists/stable/contrib/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_contrib_binary-i386_Packages 0 : | |
30 | 'http://ftp.debian.org/debian/dists/stable/contrib/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_contrib_i18n_Translation-en 0 : | |
31 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
32 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris | |
33 | ||
34 | ||
a537ce19 MV |
35 | # Two entries |
36 | echo "$BASE" > rootdir/etc/apt/sources.list | |
37 | echo "" >> rootdir/etc/apt/sources.list | |
38 | echo "$BASE" | sed s/stable/unstable/ >> rootdir/etc/apt/sources.list | |
39 | ||
40 | testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : | |
41 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
42 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 | |
43 | 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 : | |
44 | 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 : | |
45 | 'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 " aptget update --print-uris | |
46 | ||
47 | ||
48 | # ARCH option | |
49 | echo "$BASE" > rootdir/etc/apt/sources.list | |
50 | echo "Arch: amd64,armel" >> rootdir/etc/apt/sources.list | |
51 | ||
52 | testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 : | |
53 | 'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 : | |
54 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
55 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris |