[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1121878: Default::Packages::Compress=zstd does not work (Packges.zst without Packages is ignored)



On 4 December 2025 04:37:42 CET, "Trent W. Buck" <trentbuck@gmail.com> wrote:
>Package: apt
>Version: 3.1.12
>Severity: minor
>
>If an InRelease file lists Packages and Packages.zst, then
>apt will download Packages.zst (good, normal).
>
>If an InRelease File lists only Packages.zst, then
>apt will silently ignore it and exit successfully.
>This results in "apt update" appearing to work, but
>none of the packages in the repo are available.
>
>An attached transcript demonstrates the problem on sid.
>
>This issue affects apt 3.1.12 (current sid) as at December 2025.
>This issue affects apt 3.0.3 (current stable) as at December 2025.
>This issue affects apt 1.8.4 (using xz instead of zst) as at February 2020.
>This issue affects apt 1.4.9 (using xz instead of zst) as at February 2020.
>
>I couldn't immediately work out where in the apt source code this issue is happening.
>Is this intended behaviour, or a logic bug?
>I speculate the current logic might be something like
>
>    for each Packages (no suffix) in Release
>        if it is for our architecture
>            get url of best available compression
>            download that url
>
>and since there's no Packages (without suffix), the loop never runs at all.
>
>It is not a big deal for me to continue doing
>
>    Default::Packages::Compress    ". zstd";
>    Default::Sources::Compress     ". zstd";
>    Default::Contents::Compress    ". zstd";
>    Default::Translation::Compress ". zstd";
>
>instead of
>
>    Default::Packages::Compress    "zstd";
>    Default::Sources::Compress     "zstd";
>    Default::Contents::Compress    "zstd";
>    Default::Translation::Compress "zstd";
>
>it is just confusing/irritating that Packages has to exist,
>even though nothing ever downloads it.

Control: severity -1 wishlist

A Release file always needs to list the decompressed file otherwise the file cannot be verified for correctness post extraction. The uncompressed file doesn't need to exist for that.

This is documented in the repository format specification

> If indexes are compressed, checksum data must be provided for uncompressed files as well, even if not present on the server. 

<https://wiki.debian.org/DebianRepository/Format?action=show&redirect=RepositoryFormat#MD5Sum.2C_SHA1.2C_SHA256>

The apt-ftparchive command does not handle decompressing files to calculate the decompressed checksum and ensure correctness across multiple compressors I suppose
-- 
sent from my phone, excuse the brevity, if any


Reply to: