commit e8cc4e7a942c4ce9f875b4d568c7509b0f4be692
Author: Pavlo Sukhanov <5265045+toothywalrus@users.noreply.github.com>
Date: Thu Nov 12 14:16:29 2026 -0500
Read conffiles from debs whose data.tar lacks the "./" prefix
get_md5sum_for_file_in_deb() extracted the conffile with
"tar -x -O ./etc/foo". Some tools, cargo-deb for example, store the
data.tar members as "etc/foo", which dpkg accepts, but tar then finds no
member and the function returned the md5sum of empty output. That never
matches the md5sum in the dpkg status, so a package whose shipped
conffile did not change was reported as having a conffile prompt and was
kept back on every run, although dpkg upgrades it without asking
(GH: #426).
Read the dpkg-deb --fsys-tarfile stream with the tarfile module instead
and compare the normalized member names, so "./etc/foo", "etc/foo" and
"/etc/foo" all match. If the deb holds the conffile twice, the last copy
is hashed, the one dpkg leaves on disk. As before, a missing member or
an unreadable deb gives the md5sum of empty content, which is treated as
a conffile prompt; both are now logged as warnings, where tar used to
print its error, and so is a dpkg-deb failure. The rest of the stream is
read before dpkg-deb is waited for, so that padding after the end of the
archive does not make it fail on a closed pipe.
In the loop over the package's conffiles, skip entries with flags, like
"remove-on-upgrade /etc/foo", which are not files in the deb, and check
the installed file first: without one there is no prompt, so the deb is
not read.
The test repacks conf-test-package_1.0.deb without the "./" prefix in
test/packages/Makefile.
commit 5d4ae95eb07af6160e48a9bdd0dd09b429d4d2f0
Author: Pavlo Sukhanov <5265045+toothywalrus@users.noreply.github.com>
Date: Thu Nov 12 14:16:19 2026 -0500
Add an md5sum() helper for the apt_pkg.Hashes loop
get_md5sum_for_file_installed() looks for the MD5Sum among
apt_pkg.Hashes().hashes; move that into md5sum(), which takes bytes or a
binary file object, so the next commit can use it for content read from
the deb as well.
Automatic checks made by the Debian l10n team found some issues with the translations contained in this package. You should check the l10n status report for more information.
Issues can be things such as missing translations, problematic translated strings, outdated PO files, unknown languages, etc.