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

Bug#714427: Regex special characters need escaping in dbg-package-missing-depends test



Package: lintian
Version: 2.5.13
Severity: normal

The dbg-package-missing-depends test is broken for packages that contain
characters that have special meaning in regular expressions. Of the
characters that have special meaning in regular expressions, the full
stop (.) and the plus sign (+) are allowed in package names. These must
be escaped when the regular expression in the lintian test is created.

Proposed patch attached.

--- /usr/share/lintian/checks/fields.orig	2013-05-19 23:35:42.000000000 +0200
+++ /usr/share/lintian/checks/fields	2013-06-29 06:53:02.578878761 +0200
@@ -921,6 +921,7 @@
         }
     }
     my $dstr = join ('|', @arch_dep_pkgs);
+    $dstr =~ s/([.+])/\\$1/g;
     my $depregex = qr/^(?:$dstr)$/;
     foreach (@dbg_pkgs) {
         my $deps = Lintian::Relation->and ($info->binary_relation ($_, 'pre-depends'),

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: