Bug#944965: debsums: Script accesses internal dpkg database
Axel Beckert
abe at debian.org
Fri May 22 18:56:27 BST 2020
Control: clone -1 -2
Control: reassign -2 dpkg
Control: retitle -2 dpkg: Please provide a command-line option to show md5sums for multiple or all packages with one call
Control: submitter -2 !
Control: block -1 by -2
Hi Guillem,
while trying to check what's left to implement this, I got reminded by
this source code comment which currently IMHO very well validates
direct database usage (as you seem to have noticed, too):
# Calling dpkg-query --control-path for every package is too slow,
# so we cheat a little bit.
Guillem Jover wrote:
> The debsums program should be switched to use something like:
>
> «dpkg-query --control-show $pkg md5sums»
>
> to get the md5sums file contents. [...] While this is not ideal,
> because this interface does not allow batching, at least it will
> stop accessing the internal database. I will be adding in the near
> future a new virtual field to dpkg-query to be able to fetch all
> md5sums for all packages with something like:
>
> «dpkg-query \
> --showformat 'Package: ${Package}\nMd5sums: ${db-fsys:Md5sums}\n' \
> --show»
So please do so. Cloning this bug as a reminder and blocker.
Will for now upload debsums with just debsums_init removed, so at
least a bit of this issue is resolved that way.
> The other question though, is whether it still makes sense to ship
> debsums, with «dpkg --audit» checking for missing md5sums files,
> «dpkg --verify» checking for hash mismatches, and «dpkg --unpack»
> generating these when the to be installed does not provide one?
>From my point of view alone the different (IMHO way more comfortable)
command-line user interface and more readable output still validates
it's existence. (I really dislike that rpm format. :-)
I also haven't found an quick and easy way to just show conffiles or
non-conffiles with dpkg --verify on a quick glance. Even to grep out
the just changed ones is not that trivial.
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
More information about the pkg-perl-maintainers
mailing list