]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" | |
5 | . "$TESTDIR/framework" | |
6 | setupenvironment | |
7 | configarchitecture 'amd64' 'i386' | |
8 | ||
9 | cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF | |
10 | Acquire::IndexTargets::deb::Contents1 { | |
11 | MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)"; | |
12 | ShortDescription "Contents"; | |
13 | Description "\$(RELEASE) Contents"; | |
14 | DefaultEnabled "false"; | |
15 | }; | |
16 | Acquire::IndexTargets::deb::Contents2 { | |
17 | MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)"; | |
18 | ShortDescription "Contents"; | |
19 | Description "\$(RELEASE) Contents"; | |
20 | DefaultEnabled "false"; | |
21 | }; | |
22 | Acquire::IndexTargets::deb::Contentsflat { | |
23 | MetaKey "Contents-\$(ARCHITECTURE)"; | |
24 | ShortDescription "Contents"; | |
25 | Description "\$(RELEASE) Contents"; | |
26 | DefaultEnabled "false"; | |
27 | }; | |
28 | EOF | |
29 | ||
30 | mkdir -p ./rootdir/var/lib/apt/lists | |
31 | APTLISTS="$(readlink -f ./rootdir/var/lib/apt/lists)" | |
32 | APTETC="$(readlink -f ./rootdir/etc/apt)" | |
33 | cat > rootdir/etc/apt/sources.list <<EOF | |
34 | deb http://example.org/debian stable main rocks | |
35 | deb-src http://example.org/debian stable main rocks | |
36 | EOF | |
37 | testsuccessequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources | |
38 | ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources | |
39 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages | |
40 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages | |
41 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages | |
42 | ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en | |
43 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages | |
44 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages | |
45 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages | |
46 | ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)' | |
47 | ||
48 | cat >> rootdir/etc/apt/sources.list <<EOF | |
49 | deb http://example.org/debian stable main rocks | |
50 | EOF | |
51 | rm -r rootdir/var/cache/apt/*.bin | |
52 | testwarning aptcache gencaches | |
53 | testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources | |
54 | ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources | |
55 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages | |
56 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages | |
57 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages | |
58 | ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en | |
59 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages | |
60 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages | |
61 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages | |
62 | ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en | |
63 | W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
64 | W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
65 | W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
66 | W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
67 | W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
68 | W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
69 | W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
70 | W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3" aptget indextargets --no-release-info --format '$(FILENAME)' | |
71 | ||
72 | cat >> rootdir/etc/apt/sources.list <<EOF | |
73 | deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks | |
74 | deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks | |
75 | EOF | |
76 | rm -r rootdir/var/cache/apt/*.bin | |
77 | testwarning aptcache gencaches | |
78 | testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources | |
79 | ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources | |
80 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages | |
81 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages | |
82 | ${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages | |
83 | ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en | |
84 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages | |
85 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages | |
86 | ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages | |
87 | ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en | |
88 | ${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64 | |
89 | ${APTLISTS}/example.org_debian_dists_stable_main_Contents-all | |
90 | ${APTLISTS}/example.org_debian_dists_stable_Contents-amd64 | |
91 | ${APTLISTS}/example.org_debian_dists_stable_Contents-all | |
92 | ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64 | |
93 | ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-all | |
94 | W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
95 | W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
96 | W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
97 | W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
98 | W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
99 | W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
100 | W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
101 | W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3 | |
102 | W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4 | |
103 | W: Target Contents2 wants to acquire the same file (main/Contents-all) as Contents1 from source ${APTETC}/sources.list:4 | |
104 | W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4 | |
105 | W: Target Contents2 wants to acquire the same file (rocks/Contents-all) as Contents1 from source ${APTETC}/sources.list:4" aptget indextargets --no-release-info --format '$(FILENAME)' |