[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.1.4-1-g9e12b74



The following commit has been merged in the master branch:
commit 9e12b74b7a1084ea9b885c7e04807641bfd426b2
Author: Russ Allbery <rra@debian.org>
Date:   Mon Jan 5 10:41:53 2009 -0800

    Treat define as the end of a makefile target
    
    * checks/rules:
      + [RA] Consider a define command to be the end of a list of target
        commands, avoiding binary-arch-rules-but-pkg-is-arch-indep false
        positives when an empty rule is followed by a definition.
        (Closes: #510869)

diff --git a/checks/rules b/checks/rules
index 04ee5de..5ecac73 100644
--- a/checks/rules
+++ b/checks/rules
@@ -135,6 +135,12 @@ while (<RULES>) {
             }
 	}
         $debhelper_group = 0;
+    } elsif (/^define /) {
+        # We don't want to think the body of the define is part of the
+        # previous rule or we'll get false positives on tags like
+        # binary-arch-rules-but-pkg-is-arch-indep.  Treat a define as the
+        # end of the current rule, although that isn't very accurate either.
+        @current_targets = ();
     } else {
     	# If we have non-empty, non-comment lines, store them for all current
     	# targets and check whether debhelper programs are called in a
diff --git a/debian/changelog b/debian/changelog
index e9e3998..6d70668 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+lintian (2.1.5) UNRELEASED; urgency=low
+
+  * checks/rules:
+    + [RA] Consider a define command to be the end of a list of target
+      commands, avoiding binary-arch-rules-but-pkg-is-arch-indep false
+      positives when an empty rule is followed by a definition.
+      (Closes: #510869)
+
+ -- Russ Allbery <rra@debian.org>  Mon, 05 Jan 2009 10:41:18 -0800
+
 lintian (2.1.4) unstable; urgency=low
 
   * Summary of tag changes:
diff --git a/t/tests/6000_rules-ignore-define.desc b/t/tests/6000_rules-ignore-define.desc
new file mode 100644
index 0000000..4bb7035
--- /dev/null
+++ b/t/tests/6000_rules-ignore-define.desc
@@ -0,0 +1,5 @@
+Testname: rules-ignore-define
+Version: 1.0
+Description: Ignore define blocks when checking rule files
+Test-Against: binary-arch-rules-but-pkg-is-arch-indep
+References: Debian Bug#510869
diff --git a/t/tests/rules-ignore-define/debian/debian/rules b/t/tests/rules-ignore-define/debian/debian/rules
new file mode 100755
index 0000000..3445f5c
--- /dev/null
+++ b/t/tests/rules-ignore-define/debian/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+%:
+	dh $@
+
+binary-arch:
+	# EMPTY
+
+define checkdir
+	test -f debian/rules
+endef
diff --git a/t/tests/basic-non-native/tags b/t/tests/rules-ignore-define/tags
similarity index 100%
copy from t/tests/basic-non-native/tags
copy to t/tests/rules-ignore-define/tags

-- 
Debian package checker


Reply to: