lintian: r912 - in trunk: checks debian testset
Author: rra
Date: 2007-06-18 15:01:17 +0200 (Mon, 18 Jun 2007)
New Revision: 912
Modified:
trunk/checks/rules
trunk/checks/rules.desc
trunk/debian/changelog
trunk/testset/tags.dh-test
Log:
* checks/rules{.desc,}:
+ [RA] Check for ignoring all errors from make clean or make distclean
and recommend skipping the call if there's no Makefile instead.
Thanks, Branden Robinson. (Closes: #325372)
Modified: trunk/checks/rules
===================================================================
--- trunk/checks/rules 2007-06-18 10:43:56 UTC (rev 911)
+++ trunk/checks/rules 2007-06-18 13:01:17 UTC (rev 912)
@@ -69,6 +69,9 @@
if (/\$[\(\{]PWD[\)\}]/) {
tag "debian-rules-uses-pwd", "line $.";
}
+ if (/^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/) {
+ tag "debian-rules-ignores-make-clean-error", "line $.";
+ }
# Listing a rule as a dependency of .PHONY is sufficient to make it
# present for the purposes of GNU make and therefore the Policy
Modified: trunk/checks/rules.desc
===================================================================
--- trunk/checks/rules.desc 2007-06-18 10:43:56 UTC (rev 911)
+++ trunk/checks/rules.desc 2007-06-18 13:01:17 UTC (rev 912)
@@ -46,6 +46,23 @@
Instead of $(PWD), use $(CURDIR), which is set by GNU make, ignores the
environment, and is guaranteed to always be set.
+Tag: debian-rules-ignores-make-clean-error
+Type: warning
+Info: A rule in the <tt>debian/rules</tt> file for this package calls the
+ package's clean or distclean target with a line like:
+ .
+ -$(MAKE) distclean
+ .
+ The leading - tells make to ignore all errors. Normally this is done
+ for packages using Autoconf since Makefile may not exist. However, this
+ line ignores all other error messages, not just the missing Makefile
+ error. It's better to use:
+ .
+ [ ! -f Makefile ] || $(MAKE) distclean
+ .
+ so that other error messages from the clean or distclean rule will still
+ be caught.
+
Tag: debian-rules-sets-DH_COMPAT
Type: warning
Ref: debhelper(7)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-06-18 10:43:56 UTC (rev 911)
+++ trunk/debian/changelog 2007-06-18 13:01:17 UTC (rev 912)
@@ -21,6 +21,10 @@
* checks/po-debconf:
+ [RA] Close the template file handle between files so that the line
numbers for translated default fields are correct.
+ * checks/rules{.desc,}:
+ + [RA] Check for ignoring all errors from make clean or make distclean
+ and recommend skipping the call if there's no Makefile instead.
+ Thanks, Branden Robinson. (Closes: #325372)
* checks/scripts:
+ [RA] Add Octave as an interpreter, and allow both versioned and
unversioned forms. Thanks, Sebastian Harl. (Closes: #428403)
@@ -32,7 +36,7 @@
output will be stable regardless of the hash order of the directory
when the tar file was built.
- -- Russ Allbery <rra@debian.org> Mon, 18 Jun 2007 03:42:59 -0700
+ -- Russ Allbery <rra@debian.org> Mon, 18 Jun 2007 06:00:48 -0700
lintian (1.23.31) unstable; urgency=low
Modified: trunk/testset/tags.dh-test
===================================================================
--- trunk/testset/tags.dh-test 2007-06-18 10:43:56 UTC (rev 911)
+++ trunk/testset/tags.dh-test 2007-06-18 13:01:17 UTC (rev 912)
@@ -1,6 +1,7 @@
E: dh-test: description-is-dh_make-template
E: dh-test: helper-templates-in-copyright
E: dh-test: section-is-dh_make-template
+W: dh-test source: debian-rules-ignores-make-clean-error line 48
W: dh-test source: debian-rules-sets-DH_COMPAT line 12
W: dh-test source: dh_suidregister-is-obsolete
W: dh-test source: dh_testversion-is-deprecated
Reply to: