Bug#760987: [checks/fields] incorrectly anchored regexps
Package: lintian
Version: 2.5.26
Severity: minor
Tags: patch
--
Jakub Wilk
diff --git a/checks/fields.pm b/checks/fields.pm
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -354,7 +354,7 @@
my $march = $info->field('multi-arch');
unfold('multi-arch', \$march);
tag 'unknown-multi-arch-value', $pkg, $march
- unless $march =~ m/^no|foreign|allowed|same$/o;
+ unless $march =~ m/^(?:no|foreign|allowed|same)$/o;
if ( $march eq 'same'
&& $type eq 'binary'
&& defined $info->field('architecture')) {
@@ -368,7 +368,7 @@
if ($type eq 'binary'){
if ($pkg =~ /^fonts-/) {
tag 'font-package-not-multi-arch-foreign'
- unless $info->field('multi-arch', 'no') =~ m/^foreign|allowed$/o;
+ unless $info->field('multi-arch', 'no') =~ m/^(?:foreign|allowed)$/o;
}
}
@@ -613,7 +613,7 @@
my $uri = URI->new($homepage);
# not an absolute URI or (most likely) an invalid protocol
- unless ($uri->scheme && $uri->scheme =~ m/^ftp|https?|gopher$/o) {
+ unless ($uri->scheme && $uri->scheme =~ m/^(?:ftp|https?|gopher)$/o) {
tag 'bad-homepage', $orig;
}
Reply to: