Hi,
Ryan Niebur wrote:
> On Sat, Apr 10, 2010 at 01:15:07PM +0100, Joao Pinto wrote:
> > I had a crash during a package install which resulted in multiple packages
> > being corrupted.
> > The corresponding .md5sums files where truncated to 0 bytes, this
> > should be reported as an error since the package files can not be
> > verified.
Actually there are valid cases where empty .md5sums files (generated
by dpkg as it seems) are around:
Metapackages which don't contain a single file (not even a changelog
or copyright), only directories and symlinks, i.e. where
/usr/share/doc/$package is a symlink, too.
> This seems simple since debhelper is smart enough to not generate
> empty md5sums files, however when debsums generates missing md5sums
> files, it isn't that smart.
>
> Once debsums gets changed to stop generating empty md5sums files,
We are there since debsums 2.0.52 (i.e. June 2012) as far as I can see
from the changelog.
> it will also need new logic to check for when an md5sums file is
> unnecessary (so that it doesn't incorrectly complain about packages
> like "no md5sums for g++", which doesn't need one).
g++ is exactly such a case:
~ → dpkg -L g++ | xargs ls -ldF
drwxr-xr-x 23 root root 4096 Feb 7 15:32 /./
drwxr-xr-x 10 root root 4096 Sep 4 2012 /usr/
drwxr-xr-x 2 root root 151552 Mar 3 11:47 /usr/bin/
lrwxrwxrwx 1 root root 7 Oct 18 11:03 /usr/bin/g++ -> g++-4.9*
lrwxrwxrwx 1 root root 7 Oct 18 11:03 /usr/bin/x86_64-linux-gnu-g++ ->
g++-4.9*
drwxr-xr-x 745 root root 24576 Feb 11 00:45 /usr/share/
drwxr-xr-x 5516 root root 204800 Mar 2 11:23 /usr/share/doc/
lrwxrwxrwx 1 root root 3 Jan 8 2011 /usr/share/doc/g++ -> cpp/
drwxr-xr-x 55 root root 4096 Jan 23 02:12 /usr/share/man/
drwxr-xr-x 2 root root 253952 Mar 3 11:47 /usr/share/man/man1/
~ → ls -l /var/lib/dpkg/info/g++.md5sums
-rw-r--r-- 1 root root 0 Mar 3 11:47 /var/lib/dpkg/info/g++.md5sums
> It could then warn about 0 byte .md5sums files, but it would need to be
> smart enough about it to not complain about the empty md5sums files
> debsums may have created in the past.
... or dpkg has been created.
My current idea is to check all files listed by "dpkg-query -L" for
that package and check if they are either a symlink or a directory and
only emit the warning if normal files are found.
Regards, Axel
--
,''`. | Axel Beckert <[email protected]>, http://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
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]