]>
Commit | Line | Data |
---|---|---|
1e0f0f28 DK |
1 | #!/bin/sh |
2 | set -e | |
7d2794a2 JAK |
3 | # Cause umask failures |
4 | umask 000 | |
1e0f0f28 | 5 | |
3abb6a6a DK |
6 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
7 | . "$TESTDIR/framework" | |
1e0f0f28 DK |
8 | |
9 | setupenvironment | |
10 | configarchitecture 'amd64' | |
59148d96 | 11 | |
e93b4028 | 12 | # note that in --print-uri we talk about .xz because that is the default. |
59148d96 | 13 | # This doesn't mean it is actually attempt to download it. |
1e0f0f28 | 14 | configcompression '.' 'gz' |
0179cfa8 | 15 | LOWCOSTEXT='lz4' |
1e0f0f28 DK |
16 | |
17 | buildsimplenativepackage 'foo' 'amd64' '1' 'unstable' | |
b2fd8524 | 18 | buildsimplenativepackage 'bar' 'all' '1' 'unstable' |
1e0f0f28 DK |
19 | |
20 | setupaptarchive --no-update | |
21 | changetowebserver | |
22 | ||
6c0765c0 DK |
23 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 |
24 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
25 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
1dd20368 | 26 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 |
6c0765c0 DK |
27 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris |
28 | ||
29 | testsuccessequal "Get:1 http://localhost:${APTHTTPPORT} unstable InRelease [$(stat -c%s aptarchive/dists/unstable/InRelease) B] | |
30 | Get:2 http://localhost:${APTHTTPPORT} unstable/main Sources [$(stat -c%s aptarchive/dists/unstable/main/source/Sources.gz) B] | |
31 | Get:3 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B] | |
1dd20368 DK |
32 | Get:4 http://localhost:${APTHTTPPORT} unstable/main all Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-all/Packages.gz) B] |
33 | Get:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en [$(stat -c%s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] | |
1e0f0f28 DK |
34 | Reading package lists..." aptget update |
35 | ||
36 | testempty find rootdir/var/lib/apt/lists -name '*Contents*' | |
37 | ||
cd46d4eb | 38 | msgmsg "Normal Contents file" |
1e0f0f28 | 39 | cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF |
c2a4a8dd | 40 | Acquire::IndexTargets::deb::Contents { |
d3a869e3 | 41 | MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)"; |
1e0f0f28 | 42 | ShortDescription "Contents"; |
c2a4a8dd | 43 | Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents"; |
1e0f0f28 DK |
44 | }; |
45 | EOF | |
46 | ||
1dd20368 DK |
47 | readfile() { |
48 | while [ -n "$1" ]; do | |
49 | readlink -f "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_${1}" | |
50 | shift | |
51 | done | |
52 | } | |
53 | ||
39c724b4 DK |
54 | testequal "$(readfile Contents-amd64 Contents-all)" aptget indextargets --no-release-info --format '$(FILENAME)' 'Identifier: Contents' |
55 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' | |
3fd89e62 | 56 | # lets fake the existence of a compressed Contents file |
1dd20368 | 57 | touch "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" |
7d2794a2 | 58 | chmod 644 "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" |
39c724b4 | 59 | testequal "$(readfile Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
1dd20368 | 60 | touch "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" |
7d2794a2 | 61 | chmod 644 "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" |
39c724b4 | 62 | testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
3fd89e62 | 63 | |
6c0765c0 DK |
64 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 |
65 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
66 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
4e3c5633 DK |
67 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 |
68 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 | |
69 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0 | |
70 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all 0 " aptget update --print-uris | |
71 | ||
72 | # apt believes the Contents files we faked are good | |
73 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease | |
74 | Reading package lists..." aptget update | |
39c724b4 | 75 | testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
4e3c5633 DK |
76 | |
77 | find rootdir/var/lib/apt/lists -name '*Contents*' -delete | |
78 | ||
79 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 | |
80 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
81 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
1dd20368 | 82 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 |
6c0765c0 | 83 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 |
1dd20368 DK |
84 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0 |
85 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all 0 " aptget update --print-uris | |
59148d96 | 86 | |
6c0765c0 DK |
87 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease |
88 | Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] | |
1dd20368 | 89 | Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] |
1e0f0f28 DK |
90 | Reading package lists..." aptget update |
91 | ||
1dd20368 DK |
92 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' |
93 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" find rootdir/var/lib/apt/lists -name '*Contents-all*' | |
39c724b4 | 94 | testequal "$(readfile Contents-amd64 Contents-all)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
6c0765c0 | 95 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" 'aptarchive/dists/unstable/main/Contents-amd64' |
1dd20368 | 96 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" 'aptarchive/dists/unstable/main/Contents-all' |
1e0f0f28 | 97 | |
1dd20368 DK |
98 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 \ |
99 | ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all | |
39c724b4 | 100 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
653ef26c DK |
101 | |
102 | # if we asked for keeping it compressed, keep it | |
cd46d4eb | 103 | msgmsg "Normal Contents file with KeepCompressed" |
c2a4a8dd | 104 | echo 'Acquire::IndexTargets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf |
6c0765c0 DK |
105 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease |
106 | Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] | |
1dd20368 | 107 | Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] |
653ef26c DK |
108 | Reading package lists..." aptget update |
109 | ||
0179cfa8 DK |
110 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.$LOWCOSTEXT" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' |
111 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.$LOWCOSTEXT" find rootdir/var/lib/apt/lists -name '*Contents-all*' | |
39c724b4 | 112 | testequal "$(readfile Contents-amd64.$LOWCOSTEXT Contents-all.$LOWCOSTEXT)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
0179cfa8 | 113 | testequal "$(apthelper cat-file rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.$LOWCOSTEXT)" apthelper cat-file 'aptarchive/dists/unstable/main/Contents-amd64.gz' |
b2fd8524 | 114 | testequal "$(apthelper cat-file rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.$LOWCOSTEXT)" apthelper cat-file 'aptarchive/dists/unstable/main/Contents-all.gz' |
653ef26c | 115 | |
0179cfa8 DK |
116 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.$LOWCOSTEXT |
117 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.$LOWCOSTEXT | |
39c724b4 | 118 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
653ef26c | 119 | |
cd46d4eb | 120 | msgmsg "Compressed Contents file" |
653ef26c | 121 | # and no automatic uncompress based on the name please, |
1e0f0f28 DK |
122 | # only if we downloaded a compressed file, but target was uncompressed |
123 | cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF | |
c2a4a8dd | 124 | Acquire::IndexTargets::deb::Contents { |
d3a869e3 | 125 | MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE).gz"; |
1e0f0f28 | 126 | ShortDescription "Contents.gz"; |
c2a4a8dd | 127 | Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents.gz"; |
1e0f0f28 DK |
128 | }; |
129 | EOF | |
130 | ||
7c1dca14 DK |
131 | runthistest() { |
132 | # the last lines are utter bogus of course, but how should apt know… | |
133 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 | |
6c0765c0 DK |
134 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 |
135 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
1dd20368 | 136 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 |
6c0765c0 | 137 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 |
1dd20368 DK |
138 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.gz.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz 0 |
139 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.gz.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz 0 " aptget update --print-uris | |
6c0765c0 | 140 | |
7c1dca14 | 141 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease |
6c0765c0 | 142 | Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] |
1dd20368 | 143 | Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] |
1e0f0f28 DK |
144 | Reading package lists..." aptget update |
145 | ||
7c1dca14 DK |
146 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' |
147 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" find rootdir/var/lib/apt/lists -name '*Contents-all*' | |
39c724b4 | 148 | testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7c1dca14 DK |
149 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" 'aptarchive/dists/unstable/main/Contents-amd64.gz' |
150 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" 'aptarchive/dists/unstable/main/Contents-all.gz' | |
151 | } | |
152 | runthistest | |
153 | ||
154 | msgmsg "Compressed Contents file from native architecture" | |
155 | echo 'Acquire::IndexTargets::deb::Contents::MetaKey "$(COMPONENT)/Contents-$(NATIVE_ARCHITECTURE).gz";' >> rootdir/etc/apt/apt.conf.d/content-target.conf | |
156 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz | |
157 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz | |
39c724b4 | 158 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7c1dca14 | 159 | runthistest |
59148d96 | 160 | |
7f2d1eef DK |
161 | msgmsg "Contents with 3 MetaKeys, first match" |
162 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz | |
163 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz | |
39c724b4 | 164 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7f2d1eef DK |
165 | cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF |
166 | Acquire::IndexTargets::deb::Contents3 { | |
167 | MetaKey "main/Contents-all"; | |
168 | ShortDescription "Contents3"; | |
169 | Description "\$(RELEASE) all Contents3"; | |
170 | Fallback-Of "Contents2"; | |
39c724b4 | 171 | Identifier "Contents"; |
7f2d1eef DK |
172 | }; |
173 | Acquire::IndexTargets::deb::Contents { | |
174 | MetaKey "\$(COMPONENT)/Contents-amd64"; | |
175 | ShortDescription "Contents"; | |
176 | Description "\$(RELEASE)/\$(COMPONENT) amd64 Contents"; | |
177 | }; | |
178 | Acquire::IndexTargets::deb::Contents2 { | |
179 | MetaKey "Contents-all"; | |
180 | ShortDescription "Contents2"; | |
181 | Description "\$(RELEASE) all Contents2"; | |
182 | Fallback-Of "Contents"; | |
39c724b4 | 183 | Identifier "Contents"; |
7f2d1eef DK |
184 | }; |
185 | EOF | |
186 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 | |
187 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
188 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
189 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 | |
190 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 | |
191 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris | |
192 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease | |
193 | Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] | |
194 | Reading package lists..." aptget update | |
195 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" find rootdir/var/lib/apt/lists -name '*Contents*' | |
39c724b4 | 196 | testequal "$(readfile Contents-amd64)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7f2d1eef DK |
197 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" 'aptarchive/dists/unstable/main/Contents-amd64' |
198 | ||
199 | msgmsg "Contents with 3 MetaKeys, third match" | |
200 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 | |
39c724b4 | 201 | testempty aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7f2d1eef DK |
202 | echo 'Acquire::IndexTargets::deb::Contents::MetaKey "$(COMPONENT)/Contents-i386";' >> rootdir/etc/apt/apt.conf.d/content-target.conf |
203 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 | |
204 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
205 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
206 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 | |
207 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 | |
208 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-i386.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-i386 0 " aptget update --print-uris | |
209 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease | |
210 | Get:2 http://localhost:${APTHTTPPORT} unstable all Contents3 [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] | |
211 | Reading package lists..." aptget update | |
212 | testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" find rootdir/var/lib/apt/lists -name '*Contents*' | |
39c724b4 | 213 | testequal "$(readfile Contents-all)" aptget indextargets --format '$(FILENAME)' 'Identifier: Contents' |
7f2d1eef DK |
214 | testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" 'aptarchive/dists/unstable/main/Contents-all' |
215 | ||
216 | rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all | |
59148d96 | 217 | rm -f rootdir/etc/apt/apt.conf.d/content-target.conf |
cd46d4eb | 218 | msgmsg "No Contents file" |
59148d96 | 219 | |
6c0765c0 DK |
220 | testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 |
221 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 | |
222 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 | |
1dd20368 | 223 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 |
6c0765c0 | 224 | 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris |
59148d96 | 225 | |
6c0765c0 | 226 | testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease |
59148d96 DK |
227 | Reading package lists..." aptget update |
228 | ||
229 | testempty find rootdir/var/lib/apt/lists -name '*Contents*' |