[SCM] Debian package checker branch, master, updated. 2.2.14-9-g37374b7
The following commit has been merged in the master branch:
commit b76240b6300cebf3a0294fd1c07303d04136da5a
Author: Russ Allbery <rra@debian.org>
Date: Sat Sep 12 13:54:22 2009 -0700
Move the essential package list into data
* checks/common_data.pm:
+ [RA] Moved the essential package list to data/fields.
* checks/copyright-file:
+ [RA] Use Lintian::Data to read the essential package list.
* checks/fields:
+ [RA] Use Lintian::Data to read the essential package list.
* data/fields/essential:
+ [RA] New list of essential packages.
diff --git a/checks/common_data.pm b/checks/common_data.pm
index 3aa5884..cb5b1a6 100644
--- a/checks/common_data.pm
+++ b/checks/common_data.pm
@@ -5,13 +5,13 @@ use base qw(Exporter);
our @EXPORT = qw
(
- %known_source_fields %known_essential $known_shells_regex
+ %known_source_fields $known_shells_regex
);
# To let "perl -cw" test know we use these variables;
use vars qw
(
- %known_source_fields %known_essential $known_shells_regex
+ %known_source_fields $known_shells_regex
);
# simple defines for commonly needed data
@@ -26,12 +26,6 @@ use vars qw
'vcs-svn', 'vcs-browser', 'dm-upload-allowed', 'bugs', 'checksums-sha1',
'checksums-sha256', 'checksums-md5');
-%known_essential = map { $_ => 1 }
- ('base-files', 'base-passwd', 'bash', 'bsdutils', 'coreutils',
- 'debianutils', 'diff', 'dpkg', 'e2fsprogs', 'findutils', 'grep', 'gzip',
- 'hostname', 'login', 'mktemp', 'mount', 'ncurses-base', 'ncurses-bin',
- 'perl-base', 'sed', 'sysvinit', 'sysvinit-utils', 'tar', 'util-linux');
-
$known_shells_regex = qr'(?:(?:b|d)?a|t?c|(?:pd|m)?k|z)?sh';
1;
diff --git a/checks/copyright-file b/checks/copyright-file
index 07b70ab..11ab2d8 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -24,12 +24,15 @@ use strict;
use lib "$ENV{'LINTIAN_ROOT'}/checks/";
use common_data;
+use Lintian::Data ();
use Spelling;
use Tags;
use Util;
use Encode qw(decode);
+our $KNOWN_ESSENTIAL = Lintian::Data->new('fields/essential');
+
sub run {
my $pkg = shift;
@@ -321,7 +324,7 @@ if ($gpl || m,/usr/share/common-licenses/GPL,) {
# or if $package is essential.
sub depends_on {
my ($info, $package) = @_;
- return 1 if $known_essential{$package};
+ return 1 if $KNOWN_ESSENTIAL->known($package);
return 1 if $info->relation('strong')->implies($package);
return 0;
}
diff --git a/checks/fields b/checks/fields
index b00f93b..ff5d87f 100644
--- a/checks/fields
+++ b/checks/fields
@@ -36,6 +36,7 @@ use Lintian::Relation ();
use Lintian::Relation::Version qw(versions_compare);
our $KNOWN_ARCHS = Lintian::Data->new('fields/architectures');
+our $KNOWN_ESSENTIAL = Lintian::Data->new('fields/essential');
our $KNOWN_METAPACKAGES = Lintian::Data->new('fields/metapackages');
our %known_archive_parts = map { $_ => 1 }
@@ -354,7 +355,9 @@ if (defined $info->field('essential')) {
tag "essential-in-source-package", "" if ($type eq "source");
tag "essential-no-not-needed", "" if ($essential eq "no");
tag "unknown-essential-value", "" if ($essential ne "no" and $essential ne "yes");
- tag "new-essential-package", "" if ($essential eq "yes" and ! $known_essential{$pkg});
+ if ($essential eq "yes" and not $KNOWN_ESSENTIAL->known($pkg)) {
+ tag 'new-essential-package';
+ }
}
#---- Section
@@ -550,7 +553,7 @@ if (($type eq "binary") || ($type eq 'udeb')) {
if ($KNOWN_METAPACKAGES->known($d_pkg) and not $metapackage and &$is_dep_field($field));
tag "depends-on-essential-package-without-using-version", "$field: $part_d_orig"
- if ($known_essential{$d_pkg} && ! $d_version->[0] && &$is_dep_field($field));
+ if ($KNOWN_ESSENTIAL->known($d_pkg) && ! $d_version->[0] && &$is_dep_field($field));
tag "package-depends-on-an-x-font-package", "$field: $part_d_orig"
if ($field =~ /^(pre-)?depends$/ && $d_pkg =~ /^xfont.*/ && $d_pkg ne 'xfonts-utils' && $d_pkg ne 'xfonts-encodings');
@@ -676,7 +679,7 @@ if ($type eq "source") {
if ($known_build_essential{$d_pkg} && ! $d_version->[1]);
tag "build-depends-on-essential-package-without-using-version", "$field: $part_d_orig"
- if ($d_pkg ne "coreutils" && $known_essential{$d_pkg} && ! $d_version->[0]);
+ if ($d_pkg ne 'coreutils' && $KNOWN_ESSENTIAL->known($d_pkg) && ! $d_version->[0]);
push @seen_obsolete_packages, $part_d_orig
if ($OBSOLETE_PACKAGES->known($d_pkg) && &$is_dep_field($field));
diff --git a/data/fields/essential b/data/fields/essential
new file mode 100644
index 0000000..371f8c4
--- /dev/null
+++ b/data/fields/essential
@@ -0,0 +1,27 @@
+# Known essential packages. These packages can always be assumed to be
+# installed and should not have non-versioned dependencies.
+
+base-files
+base-passwd
+bash
+bsdutils
+coreutils
+debianutils
+diff
+dpkg
+e2fsprogs
+findutils
+grep
+gzip
+hostname
+login
+mktemp
+mount
+ncurses-base
+ncurses-bin
+perl-base
+sed
+sysvinit
+sysvinit-utils
+tar
+util-linux
diff --git a/debian/changelog b/debian/changelog
index 917f9eb..babdea6 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
lintian (2.2.15) UNRELEASED; urgency=low
+ * checks/common_data.pm:
+ + [RA] Moved the essential package list to data/fields.
+ * checks/copyright-file:
+ + [RA] Use Lintian::Data to read the essential package list.
* checks/fields:
+ [RA] Exclude base-files from the needlesly-depends-on-awk tag
and from the warning about depending on a virtual package without
a real package for the awk virtual package.
+ + [RA] Use Lintian::Data to read the essential package list.
* checks/files:
+ [RA] Suppress non-standard-dir-perm for /tmp, /var/tmp, /var/local,
/var/lock, and /usr/src if they have their normal owner and
@@ -17,6 +22,9 @@ lintian (2.2.15) UNRELEASED; urgency=low
+ [RA] Anchor the dh_quilt regex to not trigger on commented-out
calls. Patch from Cesare Tirabassi. (Closes: #543259)
+ * data/fields/essential:
+ + [RA] New list of essential packages.
+
* reporting/{html_reports,templates/clean.tmpl}:
+ [JP] Don't link to full report if the maintainer only has clean
packages. (Closes: #545781)
--
Debian package checker
Reply to: