[lintian] 01/01: c/files: Expand the empty-binary-package test
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit d65f81ee4b0c05172fe0c77c773f3f4ff3914b1d
Author: Niels Thykier <niels@thykier.net>
Date: Wed Apr 19 15:22:09 2017 +0000
c/files: Expand the empty-binary-package test
These changes are based on Helmut Grohne's findings in packages that
claimed to be (possibly) empty but lintian did not detect as such.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/files.pm | 25 ++++++++++++++++++++-----
data/files/standard-files | 11 +++++++++--
debian/changelog | 5 +++++
t/tests/generic-dh-make-2005/tags | 1 +
t/tests/generic-dh-make-2008/tags | 1 +
t/tests/legacy-foo++/tags | 1 +
6 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/checks/files.pm b/checks/files.pm
index 85ab480..3b28d45 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -322,8 +322,14 @@ sub run {
# - except if it is a lintian override.
next
if $fname =~ m{\A
- usr/share/lintian/overrides/$ppkg(?:\.gz)?
- \Z}xsm;
+ # Except for:
+ usr/share/ (?:
+ # lintian overrides
+ lintian/overrides/$ppkg(?:\.gz)?
+ # reportbug scripts/utilities
+ | bug/$ppkg(?:/(?:control|presubj|script))?
+
+ )\Z}xsm;
$is_empty = 0;
last;
}
@@ -334,13 +340,22 @@ sub run {
}
# Skip /usr/share/doc/$pkg symlinks.
next if $fname eq "usr/share/doc/$pkg";
+ my $basename = $file->basename;
# For files directly in /usr/share/doc/$pkg, if the
# file isn't one of the uninteresting ones, the
# package isn't empty.
- unless ($STANDARD_FILES->known($file->basename)) {
- $is_empty = 0;
- last;
+ next if $STANDARD_FILES->known($basename);
+ # Ignore all READMEs
+ next if $basename =~ m/^README(?:\..*)?$/i;
+ my $pkg_arch = $proc->pkg_arch;
+ if ($pkg_arch ne 'all') {
+ # binNMU changelog (debhelper)
+ next if $basename eq "changelog.Debian.${pkg_arch}.gz";
}
+ # buildinfo file (dh-buildinfo)
+ next if $basename eq "buildinfo_${pkg_arch}.gz";
+ $is_empty = 0;
+ last;
}
}
if ($is_empty) {
diff --git a/data/files/standard-files b/data/files/standard-files
index 3b0e344..231ef53 100644
--- a/data/files/standard-files
+++ b/data/files/standard-files
@@ -1,20 +1,27 @@
# Manually maintained list of "standard" files in /usr/share/doc/$pkg
# These are not enough to consider the package "not-empty"
#
+# NB: There is a special case in Lintian for ignoring all "README.*"
+# files as well. They need not be listed here.
+#
# Please keep this sorted (ignoring case)
AUTHORS
AUTHORS.gz
+BUGS
+BUGS.gz
changelog.Debian.gz
changelog.gz
+CHANGES
+CHANGES.gz
COPYING.gz
copyright
HACKING
HACKING.gz
NEWS
+NEWS.Debian
+NEWS.Debian.gz
NEWS.gz
-README
-README.gz
TODO
TODO.gz
diff --git a/debian/changelog b/debian/changelog
index 96464fa..19bb0e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,9 @@ lintian (2.5.51) UNRELEASED; urgency=medium
and package-installs-apt-sources. (Closes: #814521).
+ [NT] Apply patch from Helmut Grohne to detect some possible invalid
uses of "Multi-Arch: foreign". (Closes: #856975)
+ + [NT] Improve the empty-binary-package tag by adding more common
+ files that should be ignored. Thanks to Helmut Grohne for all the
+ research behind it. (Closes: #856857)
* checks/menu-format.{desc,pm}:
+ [NT] Update the reference to Desktop Entry Specification to point
to version 1.1.
@@ -44,6 +47,8 @@ lintian (2.5.51) UNRELEASED; urgency=medium
* data/common/source-fields:
+ [NT] Add new "Testsuite-Restrictions" field.
+ * data/files/standard-files:
+ + [NT] Add more common files based on feedback from Helmut Grohne.
* data/obsolete-sites/obsolete-sites:
+ [BR] Apply patch from Hideki Yamane in order to warn about
fedorahosted. (Closes: #856954).
diff --git a/t/tests/generic-dh-make-2005/tags b/t/tests/generic-dh-make-2005/tags
index febf0fa..5e245d2 100644
--- a/t/tests/generic-dh-make-2005/tags
+++ b/t/tests/generic-dh-make-2005/tags
@@ -11,6 +11,7 @@ W: generic-dh-make-2005 source: debian-rules-missing-recommended-target build-in
W: generic-dh-make-2005 source: dh-clean-k-is-deprecated
W: generic-dh-make-2005 source: package-uses-deprecated-debhelper-compat-version 5
W: generic-dh-make-2005: copyright-without-copyright-notice
+W: generic-dh-make-2005: empty-binary-package
W: generic-dh-make-2005: new-package-should-close-itp-bug
W: generic-dh-make-2005: readme-debian-contains-debmake-template
W: generic-dh-make-2005: wrong-bug-number-in-closes l3:#nnnn
diff --git a/t/tests/generic-dh-make-2008/tags b/t/tests/generic-dh-make-2008/tags
index b60de1a..1add3b5 100644
--- a/t/tests/generic-dh-make-2008/tags
+++ b/t/tests/generic-dh-make-2008/tags
@@ -37,6 +37,7 @@ W: generic-dh-make-2008 source: superfluous-clutter-in-homepage <insert the upst
W: generic-dh-make-2008: bad-homepage <insert the upstream URL, if relevant>
W: generic-dh-make-2008: copyright-has-url-from-dh_make-boilerplate
W: generic-dh-make-2008: copyright-without-copyright-notice
+W: generic-dh-make-2008: empty-binary-package
W: generic-dh-make-2008: new-package-should-close-itp-bug
W: generic-dh-make-2008: readme-debian-contains-debmake-template
W: generic-dh-make-2008: superfluous-clutter-in-homepage <insert the upstream URL, if relevant>
diff --git a/t/tests/legacy-foo++/tags b/t/tests/legacy-foo++/tags
index a493e6d..88a2fd7 100644
--- a/t/tests/legacy-foo++/tags
+++ b/t/tests/legacy-foo++/tags
@@ -22,5 +22,6 @@ W: foo++ source: dm-upload-allowed-is-obsolete
W: foo++ source: uploader-address-looks-weird Jeroen van Wolffelaar<jeroen@localhost.localdomain>
W: foo++-helper: empty-binary-package
W: foo++: debian-changelog-has-wrong-day-of-week 2003-04-14 is a Monday
+W: foo++: empty-binary-package
W: foo++: latest-debian-changelog-entry-without-new-date
W: foo++: readme-debian-contains-invalid-email-address foo@unknown
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: