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

[lintian] 03/03: checks/debhelper: Fix parsing rule targets in lines containing multiple colons



This is an automated email from the git hooks/post-receive script.

jwilk pushed a commit to branch master
in repository lintian.

commit a931bc69515cb733aab275fa6ab8d0d503e01513
Author: Jakub Wilk <jwilk@debian.org>
Date:   Mon Sep 19 17:24:58 2016 +0200

    checks/debhelper: Fix parsing rule targets in lines containing multiple colons
---
 checks/debhelper.pm                                  | 2 +-
 debian/changelog                                     | 2 ++
 t/tests/debhelper-override-typos/debian/debian/rules | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index cd1dd9f..ee7ac59 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -177,7 +177,7 @@ sub run {
             $dhcompatvalue = $1;
             # one can export and then set the value:
             $level = $1 if ($level);
-        } elsif (/(.*override_dh_.*):/) {
+        } elsif (/^([^:]*override_dh_[^:]*):/) {
             my $targets = $1;
             $needbuilddepends = 1;
             # Can be multiple targets per rule.
diff --git a/debian/changelog b/debian/changelog
index 2c806c1..7ea710a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ lintian (2.5.48) UNRELEASED; urgency=low
       hardening-includes.
   * checks/debhelper.pm:
     + [JW] Ignore comments in debian/rules.
+    + [JW] Fix parsing rule targets in lines containing multiple colons.
+      Thanks to Andreas Beckmann for the bug report.  (Closes: #838246)
   * checks/testsuite.pm:
     + [JW] Apply patch from Sean Whitton to recognise autopkgtest-pkg-elpa
       as a valid value for the Testsuite field.  (Closes: #837801)
diff --git a/t/tests/debhelper-override-typos/debian/debian/rules b/t/tests/debhelper-override-typos/debian/debian/rules
index e57d0fd..6d20de6 100755
--- a/t/tests/debhelper-override-typos/debian/debian/rules
+++ b/t/tests/debhelper-override-typos/debian/debian/rules
@@ -28,4 +28,5 @@ override_dh_python2 override_dh_perl :
 override_dh_systemd_enable override_dh_systemd_disable:
 override_dh_auto_configure-% override_dh_auto_install-%:
 foo override_dh_installdeb bar override_dh_installxmlcatalogs: # combining regular and overrides
+override_dh_install: $(PY3VERS:%=install-python%) $(PY2VERS:%=install-python%)
 # override_dh_instal: would be a typo, but in a comment it doesn't matter

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: