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

[SCM] Debian package checker branch, master, updated. 2.4.1-3-gaed71d1



The following commit has been merged in the master branch:
commit aed71d1b04b02e0c028a8e8b3612864fec0cc273
Author: Russ Allbery <rra@debian.org>
Date:   Thu May 6 21:57:52 2010 -0700

    Allow a mix of package name and substvar in relations
    
    * lib/Lintian/Relation.pm:
      + [RA] Rather than allowing only a package name or a substvar, allow
        substvars mixed into the package name.  (Closes: #580494)

diff --git a/debian/changelog b/debian/changelog
index 1855a56..9b13f32 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,10 @@ lintian (2.4.2) UNRELEASED; urgency=low
     + [RA] Update to current unstable and add the old xserver-xorg video
       and input virtual packages.
 
+  * lib/Lintian/Relation.pm:
+    + [RA] Rather than allowing only a package name or a substvar, allow
+      substvars mixed into the package name.  (Closes: #580494)
+
   * private/refresh-virtual-packages-data:
     + [RA] Fix handling of # Keep: lines to work correctly now that
       virtual packages mentioned only once are excluded.
diff --git a/lib/Lintian/Relation.pm b/lib/Lintian/Relation.pm
index 2a4d8cd..e45f4f7 100644
--- a/lib/Lintian/Relation.pm
+++ b/lib/Lintian/Relation.pm
@@ -75,9 +75,11 @@ sub parse_element {
     $element =~ /
         ^\s*                            # skip leading whitespace
         (                               # package name or substvar (1)
-         [a-zA-Z0-9][a-zA-Z0-9+.-]+     #   package name
-         |                              #   or
-         \$\{[a-zA-Z0-9:-]+\}           #   substvar
+         (?:                            #  substvars may be mixed in
+          [a-zA-Z0-9][a-zA-Z0-9+.-]+    #   package name
+          |                             #   or
+          \$\{[a-zA-Z0-9:-]+\}          #   substvar
+         )+                             #  one or more name or substvar
         )                               # end of package name or substvar
         (?:                             # start of optional version
          \s* \(                         # open parenthesis for version part
diff --git a/t/tests/control-file-general/debian/debian/control.in b/t/tests/control-file-general/debian/debian/control.in
index fd5ff1e..269007c 100644
--- a/t/tests/control-file-general/debian/debian/control.in
+++ b/t/tests/control-file-general/debian/debian/control.in
@@ -18,8 +18,8 @@ Maintainer: {$author}
 Build-Conflicts: foo
 Architecture: {$architecture}
 Depends: {$srcpkg}, foo, baz, $\{shlibs:Depends\} $\{misc:Depends\}
-Recommends: foo, bar
-Suggests: bar | baz
+Recommends: foo, bar, no-match$\{lintian:Foo\}, match$\{lintian:Match\}
+Suggests: bar | baz, no-match$\{lintian:Bar\}, match$\{lintian:Match\}
 Description: {$description}
  This is a test package designed to exercise some feature or tag of
  Lintian.  It is part of the Lintian test suite and may do very odd
diff --git a/t/tests/control-file-general/tags b/t/tests/control-file-general/tags
index cc22ce3..b256cf3 100644
--- a/t/tests/control-file-general/tags
+++ b/t/tests/control-file-general/tags
@@ -12,3 +12,4 @@ W: control-file-general source: package-type-in-debian-control line 67
 W: control-file-general source: stronger-dependency-implies-weaker control-file-general depends -> recommends foo
 W: control-file-general source: stronger-dependency-implies-weaker control-file-general depends -> suggests bar | baz
 W: control-file-general source: stronger-dependency-implies-weaker control-file-general recommends -> suggests bar | baz
+W: control-file-general source: stronger-dependency-implies-weaker control-file-general recommends -> suggests match${lintian:Match}

-- 
Debian package checker


Reply to: