]>
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 | ||
d2d68aaf MV |
10 | echo "deb http://ftp.debian.org/debian stable main" > rootdir/etc/apt/sources.list |
11 | testequalwithmsg "Old style sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : | |
12 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
13 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris | |
14 | ||
15 | ||
16 | BASE="# some comment | |
17 | # that contains a : as well | |
18 | #Type: meep | |
19 | ||
20 | Type: deb | |
a537ce19 MV |
21 | URL: http://ftp.debian.org/debian |
22 | Dist: stable | |
23 | Section: main | |
24 | Comment: Some random string | |
25 | that can be very long" | |
26 | ||
27 | # simple case | |
28 | echo "$BASE" > rootdir/etc/apt/sources.list | |
29 | ||
d2d68aaf | 30 | testequalwithmsg "Simple deb822 sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : |
a537ce19 MV |
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 | ||
300b15e3 MV |
35 | # two sections (we support both "," and " " as seperator) |
36 | echo "$BASE" | sed s/main/"main,contrib"/ > rootdir/etc/apt/sources.list | |
37 | ||
d2d68aaf | 38 | testequalwithmsg "Two sections deb822 sources.list work" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : |
300b15e3 MV |
39 | 'http://ftp.debian.org/debian/dists/stable/contrib/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_contrib_binary-i386_Packages 0 : |
40 | 'http://ftp.debian.org/debian/dists/stable/contrib/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_contrib_i18n_Translation-en 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 " aptget update --print-uris | |
43 | ||
44 | ||
a537ce19 MV |
45 | # Two entries |
46 | echo "$BASE" > rootdir/etc/apt/sources.list | |
47 | echo "" >> rootdir/etc/apt/sources.list | |
48 | echo "$BASE" | sed s/stable/unstable/ >> rootdir/etc/apt/sources.list | |
49 | ||
d2d68aaf | 50 | testequalwithmsg "Multiple entries in deb822 sources.list work" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : |
a537ce19 MV |
51 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : |
52 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 | |
53 | 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 : | |
54 | 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 : | |
55 | 'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 " aptget update --print-uris | |
56 | ||
57 | ||
58 | # ARCH option | |
59 | echo "$BASE" > rootdir/etc/apt/sources.list | |
60 | echo "Arch: amd64,armel" >> rootdir/etc/apt/sources.list | |
61 | ||
d2d68aaf | 62 | testequalwithmsg "Arch: option in deb822 sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 : |
a537ce19 MV |
63 | 'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 : |
64 | 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : | |
65 | 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris | |
d2d68aaf | 66 |