Commit 4ad46362 authored by Chris Lamb's avatar Chris Lamb 💬

Avoid a number of false-positives in documentation files when processing the...

Avoid a number of false-positives in documentation files when processing the uses-dpkg-database-directly tag as these are invariably legitimate.
parent deb6d4c6
......@@ -2359,6 +2359,9 @@ sub get_checks_for_file {
$checks{'uses-dpkg-database-directly'} = '/var/lib/dpkg'
if $file !~ m,^usr/share/(?:doc|locale)/,
and $file->basename !~ m/^README(?:\..*)?$/
and $file->basename !~ m/^changelog(?:\..*)?$/i
and $file->basename !~ m/\.(?:html|txt)$/i
and $info->field('section', '') ne 'debian-installer'
and none { $_ eq $source_pkg } qw(base-files dpkg lintian);
......
......@@ -7,6 +7,9 @@ lintian (2.5.118) UNRELEASED; urgency=medium
should accept files under "/usr/share/help"; these are being
installed by a number of GNOME packages. Thanks to Jeremy Bicha for
the report. (Closes: #916497)
+ [CL] Avoid a number of false-positives in documentation files when
processing the uses-dpkg-database-directly tag as these are
invariably legitimate.
* checks/testsuite.{desc,pm}:
+ [CL] Apply a patch series from Paul Gevers to warn about obsolete
debian/tests/control.autodep8 files. (MR: !95)
......
test-1 var/lib/test
test-2 var/lib/test
README var/lib/test
misc.txt var/lib/test
test-1 usr/share/locale
test-2 usr/share/locale
......@@ -3,4 +3,5 @@ Version: 1.0
Description: Check for code using dpkg internals
Package-Architecture: any
Test-For:
package-contains-documentation-outside-usr-share-doc
uses-dpkg-database-directly
/var/lib/dpkg/foo is a false positive.
This file is false positive as it references /var/lib/dpkg/foo.
I: files-uses-dpkg-database-directly: package-contains-documentation-outside-usr-share-doc var/lib/test/README
W: files-uses-dpkg-database-directly: binary-without-manpage usr/bin/test
W: files-uses-dpkg-database-directly: uses-dpkg-database-directly usr/bin/test
W: files-uses-dpkg-database-directly: uses-dpkg-database-directly var/lib/test/test-1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment