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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc3-29-g026c42f



The following commit has been merged in the master branch:
commit 026c42f26f28cc36ce051dc89e534c51ffbaef16
Author: Niels Thykier <niels@thykier.net>
Date:   Tue May 3 11:20:58 2011 +0200

    Made the tag-parsing regex slightly stricter

diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index ba25545..4b48276 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -550,12 +550,12 @@ sub file_overrides {
         my $override = $_;
         # The override looks like the following:
         # [[pkg-name] [arch-list] [pkg-type]:] <tag> [extra]
-        if ($override =~ m/^(?:                 # start optional part
-                  (?:\Q$info->{package}\E)?     # Optionally starts with package name
-                  (?: \s*+ \[([^\]]+?)\])?      # optionally followed by an [arch-list] (like in B-D) -> $1
-                  (?: \s*+ \Q$info->{type}\E)?  # optionally followed by the type
-                :\s++)?                         # end optional part
-                (.+)$/x){                       # <tag-name> [extra] -> $2
+        if ($override =~ m/^(?:                    # start optional part
+                  (?:\Q$info->{package}\E)?        # Optionally starts with package name
+                  (?: \s*+ \[([^\]]+?)\])?         # optionally followed by an [arch-list] (like in B-D) -> $1
+                  (?: \s*+ \Q$info->{type}\E)?     # optionally followed by the type
+                :\s++)?                            # end optional part
+                ([\-\.a-zA-Z_0-9]+ (?:\s.+)?)$/x){ # <tag-name> [extra] -> $2
             # Valid - so far at least
             my ($archlist, $tagdata) = ($1, $2);
             my ($tag, $extra) = split(m/ /o, $tagdata, 2);

-- 
Debian package checker


Reply to: