<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/integration/test-apt-update-incomplete-file-mirror, branch main</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=main</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-11-22T12:40:10Z</updated>
<entry>
<title>Look at non by-hash paths in copy and file methods</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-05-09T09:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7adf8c1fa8d519b8b57292763eb7703e7d3cc580'/>
<id>urn:sha1:7adf8c1fa8d519b8b57292763eb7703e7d3cc580</id>
<content type='text'>
Ideally copy and file mirrors would support by-hash as well, but its
harder to setup and maintain especially if you want to cache an online
mirror who has by-hash enabled.

We can avoid unneeded roundtrips (in the best case) and entire cache
misses (in the usual worst case) by "just" telling methods that the URI
we passed it has the requested file perhaps also in other paths.

This is done in pseudo-relative paths as we would otherwise need to
teach redirection code to rewrite those URIs as well. A method like http
can easily ignore this value and await explicit instructions to look at
that file, but inspecting the path in local sources via file or copy is
(comparatively) free, so we just do it immediately. If that ends up
being the wrong version of the file as by-hash would have protected us
from we are in this feature branch now falling back to other mirrors
which are like the ones online and in support of by-hash.
</content>
</entry>
<entry>
<title>Allow HashSum mismatches to fallback to other mirrors</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-29T14:58:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=15124923b4cdb19af6bf642f396dab7c3e6bd074'/>
<id>urn:sha1:15124923b4cdb19af6bf642f396dab7c3e6bd074</id>
<content type='text'>
Perhaps a common error in the past nowadays thanks to by-hash we rarely
get mismatches due to our calling behaviour and more because the mirror
is genuinely bad especially if this mirror didn't work with by-hash.

Using our "normal" error handling allows falling back to other mirrors
which hopefully do support by-hash and/or are not broken on a filesystem
level making us more resistent to the occasional bad apple in a wild
mirror forest.
</content>
</entry>
<entry>
<title>Alternatively calculate alternative file hashes in file method</title>
<updated>2024-11-22T12:21:24Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-23T22:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=370e024224b8116840173201d51c0c2a170e0e93'/>
<id>urn:sha1:370e024224b8116840173201d51c0c2a170e0e93</id>
<content type='text'>
If we do not have the requested file we haven't calculated the hashes
for it either and it is likely that the alternative file will be used,
so to save the main thread from being busy with calculating hashes we
do the calculation here in the method.
</content>
</entry>
<entry>
<title>Show hashes calculated by main thread in error messages</title>
<updated>2024-11-22T12:21:24Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-23T22:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=496c8b4191790231258e644ac8cd4096d54f445f'/>
<id>urn:sha1:496c8b4191790231258e644ac8cd4096d54f445f</id>
<content type='text'>
The main thread calculates the hash sums if the method hasn't to be able
to verify the files, but while a failure is detected and reported, the
error messages did not include the hash sums which looks at least
puzzling.

So to have a complete error message we ensure that the hashes we
calculated are appended to the message from the method so that it looks
for the higher level code as if the method had calculated the hashes.
</content>
</entry>
<entry>
<title>Support uncompressed indexes from partial file:/ mirrors</title>
<updated>2024-11-22T12:21:24Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-23T20:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=39304fb440f62b3a9f4dd85871b7049fb5b8eb8f'/>
<id>urn:sha1:39304fb440f62b3a9f4dd85871b7049fb5b8eb8f</id>
<content type='text'>
If a file:/ mirror does not contain the requested compressed file, but
the uncompressed variant of that file the method will sent us a fitting
Done message with data only about the Alt-Filename, but the central hash
verification code in the acquire system does not expect that looking for
the non-existent compressed file to compare its hashes with the expected
result – which fails (if we are verifying at least).

That file:/ as well as the item code deals with this suggests that this
feature was broken by 448c38bdcd72b52f11ec5f326f822cf57653f81c, but I
couldn't (easily) compile that to verify, so this is only a guess.

Supporting this allows using index files from /var/lib/apt/lists –
which are likely uncompressed or can at least made so easily – to
construct a file:/ mirror.
</content>
</entry>
</feed>
