<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/acquire-item.cc, branch 2.9.14</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.14</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.14'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-11-22T16:12:34Z</updated>
<entry>
<title>Merge branch 'fix/partialfilemirror' into 'main'</title>
<updated>2024-11-22T16:12:34Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-22T16:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1818699c1bc8a5be2d6542fe3212f26af7fa912a'/>
<id>urn:sha1:1818699c1bc8a5be2d6542fe3212f26af7fa912a</id>
<content type='text'>
Support uncompressed indexes from partial file:/ mirrors

See merge request apt-team/apt!235</content>
</entry>
<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>Never consider file/copy/cdrom sources bad sites due to errors</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-29T14:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=041317084a8f74e4a571f308e4a099f9a8090da0'/>
<id>urn:sha1:041317084a8f74e4a571f308e4a099f9a8090da0</id>
<content type='text'>
As the hostname for them is likely empty (for absolute or . or .. for
relative paths) considering one a bad site causes all of the sites from
this scheme to be considered bad.

In a perfect world, we would figure out a good site-path to use for
these sources, but as they are local sources which means we don't have
to perform costly requests to the internet we just let them happen
instead for now.
</content>
</entry>
<entry>
<title>Do not change UsedMirror on local copy of InRelease</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-29T10:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=83ff257477c9e5d4ef1b74cb42780f22660af109'/>
<id>urn:sha1:83ff257477c9e5d4ef1b74cb42780f22660af109</id>
<content type='text'>
While we pick most files from the file:/ mirror directly, we explicitly
bring in the InRelease file with a copy one if-clause later, which
causes this code to be run again and ends up considering the copy:/ the
mirror the file was picked up from, which works, but isn't what we had
signed up for.
</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>
<entry>
<title>Tag hidden acquire classes as final for devirtualization</title>
<updated>2024-11-22T12:13:25Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2024-11-19T22:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8c760266c8c736bff62055c008ab74d78f3ed82a'/>
<id>urn:sha1:8c760266c8c736bff62055c008ab74d78f3ed82a</id>
<content type='text'>
gcc reports `warning: Declaring type ‘class X’ final would
enable devirtualization of Y calls [-Wsuggest-final-types]`.
Not that this would massively improve performance, but it
shouldn't hurt telling the compiler what is obvious for a human.
</content>
</entry>
<entry>
<title>apt-pkg/acquire-item.cc: prepare for APT::StringView -&gt; std::string_view</title>
<updated>2024-11-12T19:36:19Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-12T16:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4793c0875dcb82151e1c2d7f38964e738f20f056'/>
<id>urn:sha1:4793c0875dcb82151e1c2d7f38964e738f20f056</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ReportMirrorFailureToCentral: fix use-after-free</title>
<updated>2024-11-12T17:00:33Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-12T15:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=89a77d19c9404ffde9955123cfea3b3c3aa906b2'/>
<id>urn:sha1:89a77d19c9404ffde9955123cfea3b3c3aa906b2</id>
<content type='text'>
</content>
</entry>
</feed>
