Hi, I noticed an inconsistency that feels weird to me. Support for zstd was added to dpkg-deb for binary packages at https://git.dpkg.org/cgit/dpkg/dpkg.git/diff/src/deb/main.c?id=2c2f7066bd8c3209762762fa6905fa567b08ca5a You'll note there that the names of the supported compression algorithms is baked into the parsing logic and help text for -Z (--compression), but this seems like duplication of code. At https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/lib/dpkg/compress.c#n1345 is an array of all compression algorithms known to dpkg with metainformation like the user-presentable names, so it would seem this could be used for the command-line option and help text code.
Other commands didn't have support for zstd added, and because they don't use that central roster of compression methods, they've been allowed to fall out of sync. In particular dpkg-buildpackage says for -Z "Passed unchanged to dpkg-source. See its manual page." and dpkg-source does not have the zstd support, as it wasn't added when the support for dpkg-deb was; dpkg-source -Zzstd simply fails saying the algorithm is unknown. The disparity is a little weird. Shouldn't zstd be allowed for source packages if dpkg is already carrying the same support for binary packages anyway? Thanks, John
signature.asc
Description: This is a digitally signed message part

