]>
Commit | Line | Data |
---|---|---|
f213b6ea DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
f213b6ea DK |
6 | |
7 | setupenvironment | |
47d2bc78 | 8 | configarchitecture 'i386' |
c5ede4ca | 9 | confighashes 'SHA1' 'SHA256' |
0179cfa8 | 10 | LOWCOSTEXT='lz4' |
f213b6ea DK |
11 | |
12 | buildaptarchive | |
13 | setupflataptarchive | |
63c71412 | 14 | changetowebserver -o aptwebserver::support::modified-since=false |
f213b6ea | 15 | |
f213b6ea | 16 | PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')" |
47d2bc78 | 17 | |
47d2bc78 | 18 | wasmergeused() { |
4e3c5633 | 19 | testsuccess apt update "$@" |
50bd6fd3 | 20 | |
34d6ece7 DK |
21 | msgtest 'No intermediate patch files' 'still exist' |
22 | local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')" | |
23 | if [ -z "$EDS" ]; then | |
24 | msgpass | |
25 | else | |
26 | echo | |
27 | echo "$EDS" | |
28 | msgfail | |
29 | fi | |
30 | ||
47d2bc78 | 31 | msgtest 'Check if the right pdiff merger was used' |
ba6b79bd | 32 | if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' rootdir/tmp/testsuccess.output; then |
47d2bc78 DK |
33 | if echo "$*" | grep -q -- '-o Acquire::PDiffs::Merge=1'; then |
34 | msgpass | |
35 | else | |
36 | msgfail "Merge shouldn't have been used, but was" | |
37 | fi | |
38 | elif echo "$*" | grep -q -- '-o Acquire::PDiffs::Merge=1'; then | |
39 | msgfail "Merge should have been used, but wasn't" | |
40 | else | |
41 | msgpass | |
42 | fi | |
43 | } | |
44 | ||
45 | testrun() { | |
4e3c5633 | 46 | configcompression '.' 'xz' |
34d6ece7 | 47 | msgmsg "Testcase: setup the base with: $*" |
4f51fd86 DK |
48 | local DOWNLOADHASH=true |
49 | if [ "$1" = 'nohash' ]; then DOWNLOADHASH=false; shift; fi | |
47d2bc78 | 50 | find aptarchive -name 'Packages*' -type f -delete |
3abb6a6a | 51 | cp "${PKGFILE}" aptarchive/Packages |
47d2bc78 DK |
52 | compressfile 'aptarchive/Packages' |
53 | generatereleasefiles | |
54 | signreleasefiles | |
146f7715 | 55 | rm -rf aptarchive/Packages.diff rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak |
47d2bc78 DK |
56 | testsuccess aptget update "$@" |
57 | cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak | |
58 | testnopackage newstuff | |
3abb6a6a | 59 | testsuccessequal "$(cat "${PKGFILE}") |
f213b6ea | 60 | " aptcache show apt oldstuff |
4e3c5633 | 61 | configcompression '.' 'gz' |
f213b6ea | 62 | |
ef3c549e DK |
63 | # see if the code deals properly with leftover partial files |
64 | touch rootdir/var/lib/apt/lists-bak/partial/localhost:${APTHTTPPORT}_Packages | |
65 | ||
34d6ece7 | 66 | msgmsg "Testcase: apply with one patch: $*" |
4e3c5633 | 67 | find aptarchive -name 'Packages*' -type f -delete |
3abb6a6a | 68 | cp "${PKGFILE}-new" aptarchive/Packages |
47d2bc78 DK |
69 | compressfile 'aptarchive/Packages' |
70 | mkdir -p aptarchive/Packages.diff | |
71 | PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" | |
3abb6a6a DK |
72 | diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true |
73 | cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz" | |
47d2bc78 | 74 | PATCHINDEX='aptarchive/Packages.diff/Index' |
3abb6a6a | 75 | echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") |
f213b6ea DK |
76 | SHA1-History: |
77 | 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 | |
3abb6a6a | 78 | $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
f213b6ea | 79 | SHA1-Patches: |
f6d4ab9a | 80 | 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28 |
3abb6a6a DK |
81 | $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE") |
82 | SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") | |
f6d4ab9a DK |
83 | SHA256-History: |
84 | 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28 | |
3abb6a6a | 85 | $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
f6d4ab9a DK |
86 | SHA256-Patches: |
87 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 | |
3abb6a6a | 88 | $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")" > "$PATCHINDEX" |
4f51fd86 DK |
89 | if $DOWNLOADHASH; then |
90 | echo "SHA1-Download: | |
91 | 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz | |
3abb6a6a | 92 | $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz") |
4f51fd86 DK |
93 | SHA256-Download: |
94 | d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz | |
3abb6a6a | 95 | $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")" >> "$PATCHINDEX" |
4f51fd86 DK |
96 | fi |
97 | ||
47d2bc78 DK |
98 | generatereleasefiles '+1hour' |
99 | signreleasefiles | |
100 | find aptarchive -name 'Packages*' -type f -delete | |
101 | wasmergeused "$@" | |
102 | testnopackage oldstuff | |
3abb6a6a | 103 | testsuccessequal "$(cat "${PKGFILE}-new") |
47d2bc78 | 104 | " aptcache show apt newstuff |
f213b6ea | 105 | |
34d6ece7 | 106 | msgmsg "Testcase: apply with two patches: $*" |
3abb6a6a | 107 | cp "${PKGFILE}-new" aptarchive/Packages |
47d2bc78 DK |
108 | echo ' |
109 | Package: futurestuff | |
110 | Version: 1.0 | |
111 | Architecture: i386 | |
112 | Maintainer: Joe Sixpack <joe@example.org> | |
113 | Installed-Size: 202 | |
114 | Filename: pool/futurestuff_1.0_i386.deb | |
115 | Size: 202200 | |
116 | MD5sum: 311aeeaaae5ba33aff1ceaf3e1f76671 | |
117 | SHA1: 3c695e028f7a1ae324deeaae5ba332desa81088c | |
118 | SHA256: b46fd154615edaae5ba33c56a5cc0e7deaef23e2da3e4f129727fd660f28f050 | |
119 | Description: some cool and shiny future stuff | |
120 | This package will appear in the next next mirror update | |
121 | Description-md5: d5f89fbbc2ce34c455dfee9b67d82b6b' >> aptarchive/Packages | |
122 | ||
123 | compressfile 'aptarchive/Packages' | |
124 | PATCHFILE2="aptarchive/Packages.diff/$(date -d 'now + 1hour' '+%Y-%m-%d-%H%M.%S')" | |
3abb6a6a DK |
125 | diff -e "${PKGFILE}-new" aptarchive/Packages > "${PATCHFILE2}" || true |
126 | cat "$PATCHFILE2" | gzip > "${PATCHFILE2}.gz" | |
47d2bc78 DK |
127 | echo "SHA1-Current: $(sha1sum aptarchive/Packages | cut -d' ' -f 1) $(stat -c%s aptarchive/Packages) |
128 | SHA1-History: | |
129 | 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 | |
3abb6a6a DK |
130 | $(sha1sum "${PKGFILE}" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}") $(basename "${PATCHFILE}") |
131 | $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") $(basename "${PATCHFILE2}") | |
47d2bc78 | 132 | SHA1-Patches: |
f6d4ab9a | 133 | 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28 |
3abb6a6a DK |
134 | $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE") |
135 | $(sha1sum "${PATCHFILE2}" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}") $(basename "${PATCHFILE2}") | |
f6d4ab9a DK |
136 | SHA256-Current: $(sha256sum aptarchive/Packages | cut -d' ' -f 1) $(stat -c%s aptarchive/Packages) |
137 | SHA256-History: | |
138 | 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28 | |
3abb6a6a DK |
139 | $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
140 | $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") $(basename "${PATCHFILE2}") | |
f6d4ab9a DK |
141 | SHA256-Patches: |
142 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 | |
3abb6a6a DK |
143 | $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE") |
144 | $(sha256sum "${PATCHFILE2}" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}") $(basename "${PATCHFILE2}")" > "$PATCHINDEX" | |
4f51fd86 DK |
145 | if $DOWNLOADHASH; then |
146 | echo "SHA1-Download: | |
147 | 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz | |
3abb6a6a DK |
148 | $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz") |
149 | $(sha1sum "${PATCHFILE2}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}.gz") $(basename "${PATCHFILE2}.gz") | |
4f51fd86 DK |
150 | SHA256-Download: |
151 | d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz | |
3abb6a6a DK |
152 | $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz") |
153 | $(sha256sum "${PATCHFILE2}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}.gz") $(basename "${PATCHFILE2}.gz")" >> "$PATCHINDEX" | |
4f51fd86 DK |
154 | fi |
155 | ||
47d2bc78 DK |
156 | generatereleasefiles '+2hour' |
157 | signreleasefiles | |
158 | cp -a aptarchive/Packages Packages-future | |
159 | find aptarchive -name 'Packages*' -type f -delete | |
160 | rm -rf rootdir/var/lib/apt/lists | |
161 | cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists | |
162 | wasmergeused "$@" | |
163 | testnopackage oldstuff | |
25b86db1 | 164 | testsuccessequal "$(cat Packages-future) |
47d2bc78 DK |
165 | " aptcache show apt newstuff futurestuff |
166 | ||
34d6ece7 | 167 | msgmsg "Testcase: patch applying fails, but successful fallback: $*" |
47d2bc78 DK |
168 | rm -rf rootdir/var/lib/apt/lists |
169 | cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists | |
3abb6a6a | 170 | cp "${PKGFILE}-new" aptarchive/Packages |
47d2bc78 DK |
171 | compressfile 'aptarchive/Packages' |
172 | mkdir -p aptarchive/Packages.diff | |
173 | PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" | |
3abb6a6a DK |
174 | diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true |
175 | cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz" | |
47d2bc78 | 176 | PATCHINDEX='aptarchive/Packages.diff/Index' |
3abb6a6a | 177 | echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") |
47d2bc78 DK |
178 | SHA1-History: |
179 | 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 | |
3abb6a6a | 180 | $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
47d2bc78 | 181 | SHA1-Patches: |
f6d4ab9a | 182 | 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28 |
3abb6a6a DK |
183 | $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE") |
184 | SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") | |
f6d4ab9a DK |
185 | SHA256-History: |
186 | 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28 | |
3abb6a6a | 187 | $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
f6d4ab9a DK |
188 | SHA256-Patches: |
189 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 | |
3abb6a6a | 190 | $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")" > $PATCHINDEX |
4f51fd86 DK |
191 | if $DOWNLOADHASH; then |
192 | echo "SHA1-Download: | |
193 | 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz | |
3abb6a6a | 194 | $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz") |
4f51fd86 DK |
195 | SHA256-Download: |
196 | d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz | |
3abb6a6a | 197 | $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")" >> $PATCHINDEX |
4f51fd86 | 198 | fi |
6d3e5bd8 | 199 | # needs to look like a valid command, otherwise the parser will fail before hashes are checked |
3abb6a6a DK |
200 | echo '1d' > "$PATCHFILE" |
201 | cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz" | |
47d2bc78 DK |
202 | generatereleasefiles '+1hour' |
203 | signreleasefiles | |
4e3c5633 DK |
204 | testsuccess apt update "$@" |
205 | cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptupdate.output | |
206 | testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptupdate.output | |
47d2bc78 | 207 | testnopackage oldstuff |
3abb6a6a | 208 | testsuccessequal "$(cat "${PKGFILE}-new") |
47d2bc78 | 209 | " aptcache show apt newstuff |
c355ea30 DK |
210 | |
211 | msgmsg "Testcase: pdiff patch bigger than index itself: $*" | |
212 | rm -rf rootdir/var/lib/apt/lists | |
213 | cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists | |
ef3c549e DK |
214 | # the general testcode checks for leftovers in partial, but as this file |
215 | # is never touched in this test as it exits earlier its not a leftover… | |
216 | rm -f rootdir/var/lib/apt/lists/partial/localhost:${APTHTTPPORT}_Packages | |
3abb6a6a | 217 | cp "${PKGFILE}-new" aptarchive/Packages |
c355ea30 DK |
218 | compressfile 'aptarchive/Packages' |
219 | mkdir -p aptarchive/Packages.diff | |
220 | PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" | |
3abb6a6a DK |
221 | diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true |
222 | cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz" | |
c355ea30 | 223 | PATCHINDEX='aptarchive/Packages.diff/Index' |
4e6219da DK |
224 | BIGSIZE="$(stat -c%s "$PATCHFILE")" |
225 | if ! $DOWNLOADHASH; then | |
226 | BIGSIZE="${BIGSIZE}000" | |
227 | fi | |
3abb6a6a | 228 | echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") |
c355ea30 DK |
229 | SHA1-History: |
230 | 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 | |
3abb6a6a | 231 | $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
c355ea30 DK |
232 | SHA1-Patches: |
233 | 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28 | |
4e6219da | 234 | $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $BIGSIZE $(basename "$PATCHFILE") |
3abb6a6a | 235 | SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") |
c355ea30 DK |
236 | SHA256-History: |
237 | 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28 | |
3abb6a6a | 238 | $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE") |
c355ea30 DK |
239 | SHA256-Patches: |
240 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 | |
4e6219da | 241 | $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $BIGSIZE $(basename "$PATCHFILE")" > "$PATCHINDEX" |
4f51fd86 DK |
242 | if $DOWNLOADHASH; then |
243 | echo "SHA1-Download: | |
244 | 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz | |
3abb6a6a | 245 | $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz")000 $(basename "${PATCHFILE}.gz") |
4f51fd86 DK |
246 | SHA256-Download: |
247 | d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz | |
3abb6a6a | 248 | $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz")000 $(basename "${PATCHFILE}.gz")" >> "$PATCHINDEX" |
4f51fd86 | 249 | fi |
c355ea30 DK |
250 | generatereleasefiles '+1hour' |
251 | signreleasefiles | |
4e3c5633 DK |
252 | testsuccess apt update -o Debug::pkgAcquire::Diffs=1 "$@" |
253 | cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptupdate.output | |
254 | testsuccess grep 'bytes (Limit is' rootdir/tmp/aptupdate.output | |
c355ea30 | 255 | testnopackage oldstuff |
3abb6a6a | 256 | testsuccessequal "$(cat "${PKGFILE}-new") |
c355ea30 | 257 | " aptcache show apt newstuff |
47d2bc78 | 258 | } |
34d6ece7 | 259 | echo 'Debug::pkgAcquire::Diffs "true"; |
03bfbc96 | 260 | Debug::Acquire::Transaction "true"; |
34d6ece7 | 261 | Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf |
47d2bc78 | 262 | |
d7a51997 DK |
263 | testcase() { |
264 | testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 "$@" | |
265 | testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 "$@" | |
4f51fd86 | 266 | |
d7a51997 DK |
267 | testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 "$@" |
268 | testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 "$@" | |
269 | testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 "$@" | |
270 | testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=0 "$@" | |
f6d4ab9a | 271 | |
d7a51997 DK |
272 | sha256sum() { |
273 | echo '01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b -' | |
274 | } | |
275 | testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA1 "$@" | |
276 | testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA1 "$@" | |
277 | unset -f sha256sum | |
f6d4ab9a | 278 | |
d7a51997 DK |
279 | sha1sum() { |
280 | echo 'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc -' | |
281 | } | |
282 | testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA256 "$@" | |
283 | testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256 "$@" | |
284 | unset -f sha1sum | |
f6d4ab9a | 285 | } |
4e3c5633 DK |
286 | aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages"; } |
287 | testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=false | |
0179cfa8 | 288 | aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages.$LOWCOSTEXT"; } |
4e3c5633 | 289 | testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=true |