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

[SCM] Debian package checker branch, master, updated. 2.5.1-17-gf626920



The following commit has been merged in the master branch:
commit f62692067914c08493fb53fe98daabca737fd0c2
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jun 26 12:17:01 2011 +0200

    Do not consider dh_python$(VAR) for deprecated
    
    Apparently some maintainers use variables to choose between
    dh_python2 and dh_python3.

diff --git a/checks/debhelper b/checks/debhelper
index 1f11c91..24dfa8c 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -83,8 +83,9 @@ while (<RULES>) {
         $maybe_skipping--;
     }
 
-    if (m/^\s+-?(dh_\w+)/) {
+    if (m/^\s+-?(dh_\w+)(.)?/) {
         my $dhcommand = $1;
+        my $trail = $2//'';
 
 	if ($dhcommand eq 'dh_dhelp') {
 	    tag 'dh_dhelp-is-deprecated', "line $.";
@@ -95,7 +96,9 @@ while (<RULES>) {
 	if ($dhcommand eq 'dh_undocumented') {
 	    tag 'dh_undocumented-is-obsolete', "line $.";
 	}
-	if ($dhcommand eq 'dh_python') {
+	# Some use dh_python$(VER) to run dh_python2 and dh_python3,
+	# so ignore this if it is followed by a $
+	if ($dhcommand eq 'dh_python' and $trail ne '$') {
 	    tag 'dh_python-is-obsolete', "line $.";
 	}
 	if ($dhcommand eq 'dh_pycentral') {
diff --git a/debian/changelog b/debian/changelog
index b8f8151..332dc82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,12 @@ lintian (2.5.2) UNRELEASED; urgency=low
   * checks/circular-deps.desc:
     + [NT] Fixed typo; thanks to Nicolás Alvarez for the report
       and patch.  (Closes: #630925)
+  * checks/debhelper:
+    + [NT] Do not trigger deprecation warning for dh_python if it
+      is followed by a "$".  This prevents false-positives when
+      a Makefile variable is used to choose between dh_python2
+      and dh_python3.  Thanks to Leonid Borisenko for the report.
+      (Closes: #631662)
   * checks/files:
     + [NT] Check for embedded copies of the underscore javascript
       library.  Thanks to Jakub Wilk for report and the patch.
diff --git a/t/tests/debhelper-deprecated/debian/debian/rules b/t/tests/debhelper-deprecated/debian/debian/rules
index 04ad1b4..97cb658 100755
--- a/t/tests/debhelper-deprecated/debian/debian/rules
+++ b/t/tests/debhelper-deprecated/debian/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 pkg = $(shell dh_listpackages)
+VERSION=2
 
 build: build-indep build-arch
 build-arch:
@@ -23,7 +24,8 @@ binary-indep:
 	dh_desktop
 	-dh_dhelp
 	dh_scrollkeeper
-	-dh_python
+	-dh_python # Should trigger a tag
+	-dh_python$(VERSION) # This should not
 	-dh_pycentral
 # Check not warning about deprecated commands in optional portions, but
 # commands that have been toast for a long time are still warned about.
diff --git a/t/tests/debhelper-deprecated/tags b/t/tests/debhelper-deprecated/tags
index a36d7ef..cd604fc 100644
--- a/t/tests/debhelper-deprecated/tags
+++ b/t/tests/debhelper-deprecated/tags
@@ -1,7 +1,7 @@
-W: debhelper-deprecated source: dh_desktop-is-deprecated line 23
-W: debhelper-deprecated source: dh_dhelp-is-deprecated line 24
-W: debhelper-deprecated source: dh_pycentral-is-obsolete line 27
-W: debhelper-deprecated source: dh_python-is-obsolete line 26
-W: debhelper-deprecated source: dh_scrollkeeper-is-deprecated line 25
-W: debhelper-deprecated source: dh_suidregister-is-obsolete line 37
-W: debhelper-deprecated source: dh_undocumented-is-obsolete line 38
+W: debhelper-deprecated source: dh_desktop-is-deprecated line 24
+W: debhelper-deprecated source: dh_dhelp-is-deprecated line 25
+W: debhelper-deprecated source: dh_pycentral-is-obsolete line 29
+W: debhelper-deprecated source: dh_python-is-obsolete line 27
+W: debhelper-deprecated source: dh_scrollkeeper-is-deprecated line 26
+W: debhelper-deprecated source: dh_suidregister-is-obsolete line 39
+W: debhelper-deprecated source: dh_undocumented-is-obsolete line 40

-- 
Debian package checker


Reply to: