[SCM] Debian package checker branch, master, updated. 2.2.6-17-gae9fa2e
The following commit has been merged in the master branch:
commit ae9fa2e6d99f5a3d0c2acf36a64edfa51c9dee96
Author: Russ Allbery <rra@debian.org>
Date: Sat Feb 28 21:28:25 2009 -0800
Calculate the regex for Ubuntu distributions only once
diff --git a/checks/nmu b/checks/nmu
index fdec897..51fc6f6 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -25,6 +25,14 @@ use Lintian::Data;
use Tags;
use Util;
+# Used to match Ubuntu distribution names in target distributions.
+our $UBUNTU_REGEX;
+{
+ my $dists = Lintian::Data->new('changelog-file/ubuntu-dists');
+ my $string = join ('|', 'ubuntu', $dists->all);
+ $UBUNTU_REGEX = qr/$string/o;
+}
+
sub run {
my $pkg = shift;
@@ -91,9 +99,7 @@ if (defined $uploaders) {
}
# No such thing as NMUs in Ubuntu-land.
-my $ubuntu_dists = Lintian::Data->new('changelog-file/ubuntu-dists');
-my $ubuntu_regex = join('|', 'ubuntu', $ubuntu_dists->all);
-if ($version =~ /$ubuntu_regex/ or $distribution =~ /$ubuntu_regex/) {
+if ($version =~ /$UBUNTU_REGEX/ or $distribution =~ /$UBUNTU_REGEX/) {
$upload_is_nmu = 0;
$version_nmuness = 0;
}
diff --git a/debian/changelog b/debian/changelog
index e48cec1..f04132d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ lintian (2.2.7) UNRELEASED; urgency=low
* checks/menus:
+ [RA] Cache the reference to the section list. Thanks, Raphael
Geissert. Also use all caps for global variables.
+ * checks/nmu:
+ + [RA] Calculate the regex for Ubuntu distributions only once.
* checks/shared-libs:
+ [ADB] When parsing symbols files, correctly ensure that meta-information
occurs between the end of the dependency template(s) and the start of
--
Debian package checker
Reply to: