diff options
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Changelog/Debian.pm | 14 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/Bzr.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Patch.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Quilt.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Vendor/Debian.pm | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/scripts/Dpkg/Changelog/Debian.pm b/scripts/Dpkg/Changelog/Debian.pm index e66f4487a..9b6c79cf8 100644 --- a/scripts/Dpkg/Changelog/Debian.pm +++ b/scripts/Dpkg/Changelog/Debian.pm @@ -102,7 +102,7 @@ sub parse { } $expect= START_CHANGES; @blanklines = (); - } elsif (m/^(;;\s*)?Local variables:/io) { + } elsif (m/^(?:;;\s*)?Local variables:/io) { last; # skip Emacs variables at end of file } elsif (m/^vim:/io) { last; # skip vim variables at end of file @@ -112,11 +112,11 @@ sub parse { next; # skip comments, even that's not supported } elsif (m{^/\*.*\*/}o) { next; # more comments - } elsif (m/^(\w+\s+\w+\s+\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\s+[\w\s]*\d{4})\s+(.*)\s+[<\(](.*)[\)>]/o - || m/^(\w+\s+\w+\s+\d{1,2},?\s*\d{4})\s+(.*)\s+[<\(](.*)[\)>]/o - || m/^(\w[-+0-9a-z.]*) \(([^\(\) \t]+)\)\;?/io - || m/^([\w.+-]+)[- ](\S+) Debian (\S+)/io - || m/^Changes from version (.*) to (.*):/io + } elsif (m/^(?:\w+\s+\w+\s+\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\s+[\w\s]*\d{4})\s+(?:.*)\s+[<\(](?:.*)[\)>]/o + || m/^(?:\w+\s+\w+\s+\d{1,2},?\s*\d{4})\s+(?:.*)\s+[<\(](?:.*)[\)>]/o + || m/^(?:\w[-+0-9a-z.]*) \((?:[^\(\) \t]+)\)\;?/io + || m/^(?:[\w.+-]+)[- ](?:\S+) Debian (?:\S+)/io + || m/^Changes from version (?:.*) to (?:.*):/io || m/^Changes for [\w.+-]+-[\w.+-]+:?\s*$/io || m/^Old Changelog:\s*$/io || m/^(?:\d+:)?\w[\w.+~-]*:?\s*$/o) { @@ -140,7 +140,7 @@ sub parse { $expect = NEXT_OR_EOF; } elsif (m/^ \-\-/) { $self->parse_error($file, $., _g('badly formatted trailer line'), "$_"); - } elsif (m/^\s{2,}(\S)/) { + } elsif (m/^\s{2,}(?:\S)/) { unless ($expect eq START_CHANGES or $expect eq CHANGES_OR_TRAILER) { $self->parse_error($file, $., sprintf(_g('found change data' . ' where expected %s'), $expect), "$_"); diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm index f0ef78b10..28ba1b734 100644 --- a/scripts/Dpkg/Source/Package/V3/Bzr.pm +++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -69,7 +69,7 @@ sub sanity_check { my $abs_srcdir = Cwd::abs_path($srcdir); find(sub { if (-l $_) { - if (Cwd::abs_path(readlink($_)) !~ /^\Q$abs_srcdir\E(\/|$)/) { + if (Cwd::abs_path(readlink($_)) !~ /^\Q$abs_srcdir\E(?:\/|$)/) { error(_g('%s is a symlink to outside %s'), $File::Find::name, $srcdir); } diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index fd0ffca92..8997697ad 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -489,7 +489,7 @@ sub analyze { while (defined($_ = _getline($self))) { # read hunk header (@@) next if /^\\ /; - last unless (/^@@ -\d+(,(\d+))? \+\d+(,(\d+))? @\@( .*)?$/); + last unless (/^@@ -\d+(,(\d+))? \+\d+(,(\d+))? @\@(?: .*)?$/); my ($olines, $nlines) = ($1 ? $2 : 1, $3 ? $4 : 1); # read hunk while ($olines || $nlines) { diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index 7716927eb..3f902a88a 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -259,7 +259,7 @@ sub read_patch_list { open(my $series_fh, '<' , $file) or syserr(_g('cannot read %s'), $file); while (defined($_ = <$series_fh>)) { chomp; s/^\s+//; s/\s+$//; # Strip leading/trailing spaces - s/(^|\s+)#.*$//; # Strip comment + s/(?:^|\s+)#.*$//; # Strip comment next unless $_; if (/^(\S+)\s+(.*)$/) { $_ = $1; diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 9ee4e003c..c5020dc0a 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -115,21 +115,21 @@ sub add_hardening_flags { } # Mask features that are not available on certain architectures. - if ($os !~ /^(linux|knetbsd|hurd)$/ or - $cpu =~ /^(hppa|mips|mipsel|avr32)$/) { + if ($os !~ /^(?:linux|knetbsd|hurd)$/ or + $cpu =~ /^(?:hppa|mips|mipsel|avr32)$/) { # Disabled on non-linux/knetbsd/hurd (see #430455 and #586215). # Disabled on hppa, mips/mipsel (#532821), avr32 # (#574716). $use_feature{pie} = 0; } - if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa|arm64)$/ or $arch eq 'arm') { + if ($cpu =~ /^(?:ia64|alpha|mips|mipsel|hppa|arm64)$/ or $arch eq 'arm') { # Stack protector disabled on ia64, alpha, arm64, mips, mipsel, hppa. # "warning: -fstack-protector not supported for this target" # Stack protector disabled on arm (ok on armel). # compiler supports it incorrectly (leads to SEGV) $use_feature{stackprotector} = 0; } - if ($cpu =~ /^(ia64|hppa|avr32)$/) { + if ($cpu =~ /^(?:ia64|hppa|avr32)$/) { # relro not implemented on ia64, hppa, avr32. $use_feature{relro} = 0; } |