Bug#629453: lintian: --checksums does not do anything
On Mon, 2011-06-06 at 22:13 +0200, Niels Thykier wrote:
> ... and by the looks of it; it did not do anything in the 2.4.3
> release either. I checked the $check_checksums variable in frontend/lintian
> in 2.4.3 and a modified local branch based on 2.5.0; none of them ever
> reads the variable (although they both pass it to GetOptions).
The front-end doesn't use it indeed, but:
./checks/changes-file:our $CHECK_CHECKSUMS = $main::check_checksums;
[...]
./checks/changes-file: if ($CHECK_CHECKSUMS or $file =~ m/\.dsc$/o) {
It's possible that I broke this when splitting out the .changes parsing
stuff; we certainly don't appear to have a test for it. :-/ It's
trivial to fix, though - $check_checksums in the frontend needs to be
declared "our", so that the check script can access it.
> Question is; should we re-instate it or deprecate it? A little manual test
> suggests that currently is "on by default" making the option redundant.
Really? My testing suggests precisely the opposite. With the current code:
adam@hathi:~/code/debian/packages/lintian$ LINTIAN_ROOT=. frontend/lintian changes-foo-bar-moo.changes
adam@hathi:~/code/debian/packages/lintian$ LINTIAN_ROOT=. frontend/lintian --checksums changes-foo-bar-moo.changes
After applying the above fix:
adam@hathi:~/code/debian/packages/lintian$ LINTIAN_ROOT=. frontend/lintian changes-foo-bar-moo.changes
adam@hathi:~/code/debian/packages/lintian$ LINTIAN_ROOT=. frontend/lintian --checksums changes-foo-bar-moo.changes
E: changes-foo-bar-moo changes: checksum-mismatch-in-changes-file md5 foo-bar-moo
Note that the option *only* controls whether the checksums of .changes
files are verified; the checks always occur for .dscs.
Regards,
Adam
Reply to: