[SCM] Debian package checker branch, master, updated. 2.5.6-5-g2da8f63
The following commit has been merged in the master branch:
commit 2da8f63ddac0f761309d7ce1ae065f99b08e7f56
Author: Niels Thykier <niels@thykier.net>
Date: Fri Mar 16 10:30:42 2012 +0100
files,menus: Skip manual lazy loading of data files
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/files b/checks/files
index f898f95..a59c791 100644
--- a/checks/files
+++ b/checks/files
@@ -28,10 +28,10 @@ use Lintian::Data;
use Lintian::Tags qw(tag);
use Util;
-my $FONT_PACKAGES;
-my $TRIPLETS;
-my $LOCALE_CODES;
-my $INCORRECT_LOCALE_CODES;
+my $FONT_PACKAGES = Lintian::Data->new ('files/fonts', qr/\s++/);
+my $TRIPLETS = Lintian::Data->new ('files/triplets', qr/\s++/);
+my $LOCALE_CODES = Lintian::Data->new ('files/locale-codes', qr/\s++/);
+my $INCORRECT_LOCALE_CODES = Lintian::Data->new ('files/incorrect-locale-codes', qr/\s++/);
# A list of known packaged Javascript libraries
# and the packages providing them
@@ -749,8 +749,6 @@ foreach my $file (@{$info->sorted_index}) {
if ($file =~ m,^(?:usr/)?lib/([^/]+)/$,o) {
my $subdir = $1;
- $TRIPLETS = Lintian::Data->new('files/triplets', '\s+')
- unless defined($TRIPLETS);
if ($TRIPLETS->known($subdir)) {
tag 'triplet-dir-and-architecture-mismatch', "$file is for", $TRIPLETS->value($subdir)
unless ($arch eq $TRIPLETS->value($subdir));
@@ -762,8 +760,6 @@ foreach my $file (@{$info->sorted_index}) {
my $subdir = $1;
# Skip if it not an ELF file (probably a .so script)
next unless ($info->file_info->{$file}//'') =~ m/\bELF\b/o;
- $TRIPLETS = Lintian::Data->new('files/triplets', qr/\s++/o)
- unless defined($TRIPLETS);
if ($TRIPLETS->known($subdir) && $arch eq $TRIPLETS->value($subdir)) {
my $dep = $info->relation('pre-depends');
tag 'missing-pre-dependency-on-multiarch-support' unless ($dep->implies('multiarch-support'));
@@ -1040,8 +1036,6 @@ foreach my $file (@{$info->sorted_index}) {
# ---------------- fonts
if ($file =~ m,/([\w-]+\.(?:[to]tf|pfb))$,i) {
my $font = lc $1;
- $FONT_PACKAGES = Lintian::Data->new('files/fonts', '\s+')
- unless defined($FONT_PACKAGES);
if ($FONT_PACKAGES->known($font)) {
tag 'duplicate-font-file', "$file also in", $FONT_PACKAGES->value($font)
if ($pkg ne $FONT_PACKAGES->value($font) and $type ne 'udeb');
@@ -1229,11 +1223,6 @@ foreach my $file (@{$info->sorted_index}) {
# special exception:
if ($lwccode ne 'l10n') {
- $INCORRECT_LOCALE_CODES = Lintian::Data->new('files/incorrect-locale-codes', '\s+')
- unless defined($INCORRECT_LOCALE_CODES);
- $LOCALE_CODES = Lintian::Data->new('files/locale-codes', '\s+')
- unless defined($LOCALE_CODES);
-
if ($INCORRECT_LOCALE_CODES->known($lwccode)) {
tag 'incorrect-locale-code',
"$lwccode ->", $INCORRECT_LOCALE_CODES->value($lwccode);
diff --git a/checks/menus b/checks/menus
index b2b73b0..5cd51f4 100644
--- a/checks/menus
+++ b/checks/menus
@@ -47,10 +47,7 @@ our %KNOWN_DOCBASE_FORMAT_FIELDS = (
'index' => 0
);
-# Will contain the list of valid sections as a Lintian::Data object if it's
-# needed. We don't load it unless we need it since many packages don't have
-# doc-base files.
-our $SECTIONS;
+our $SECTIONS = Lintian::Data->new ('doc-base/sections');
sub run {
@@ -413,7 +410,6 @@ sub check_doc_base_field {
# Section field.
} elsif ($field eq 'section') {
- $SECTIONS = Lintian::Data->new('doc-base/sections') unless $SECTIONS;
$_ = join (' ', @$vals);
unless ($SECTIONS->known($_)) {
if (m,^App(?:lication)?s/(.+)$, and $SECTIONS->known($1)) {
diff --git a/debian/changelog b/debian/changelog
index f35914a..3b5871d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
lintian (2.5.7) UNRELEASED; urgency=low
+ * checks/files:
+ + [NT] Remove "manual" lazy loads of data files.
+ * checks/menus:
+ + [NT] Remove "manual" lazy load of data file.
+
* frontend/lintian:
+ [JW] Fix typo in error message.
--
Debian package checker
Reply to: