[SCM] Debian package checker branch, master, updated. 2.5.6-96-g1720a04
The following commit has been merged in the master branch:
commit 1720a0444754397c553c67e8efd49d12f85e9290
Author: Niels Thykier <niels@thykier.net>
Date: Sat Apr 14 18:29:32 2012 +0200
L::Util: Export only subs on explicit request
Stop exporting all subs in L::Util by default. The only exception
is get_file_checksum due to its wide-spread use in "one-liners" in
t/source/*/Makefile.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/files b/checks/files
index 38e70a2..27a4105 100644
--- a/checks/files
+++ b/checks/files
@@ -26,7 +26,7 @@ use File::Basename;
use Lintian::Data;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail);
my $FONT_PACKAGES = Lintian::Data->new ('files/fonts', qr/\s++/);
my $TRIPLETS = Lintian::Data->new ('files/triplets', qr/\s++/);
diff --git a/checks/menu-format b/checks/menu-format
index 57970b1..9120ce8 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -37,7 +37,7 @@ use strict;
use warnings;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail);
use File::Basename;
diff --git a/checks/menus b/checks/menus
index b54baba..4dcfd18 100644
--- a/checks/menus
+++ b/checks/menus
@@ -27,7 +27,7 @@ use warnings;
use Lintian::Check qw(check_spelling check_spelling_picky $known_shells_regex);
use Lintian::Data;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail file_is_encoded_in_non_utf8);
# Supported documentation formats for doc-base files.
our %known_doc_base_formats = map { $_ => 1 }
diff --git a/checks/patch-systems b/checks/patch-systems
index 14d0613..f492c16 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -24,7 +24,7 @@ use strict;
use warnings;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail);
use Cwd qw(realpath);
sub run {
diff --git a/checks/po-debconf b/checks/po-debconf
index e665fc4..5b6f52f 100644
--- a/checks/po-debconf
+++ b/checks/po-debconf
@@ -23,7 +23,7 @@ use strict;
use warnings;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail system_env);
sub run {
diff --git a/checks/rules b/checks/rules
index f3fa3b2..cea3ca4 100644
--- a/checks/rules
+++ b/checks/rules
@@ -19,7 +19,7 @@ use warnings;
use Lintian::Data;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail);
our $PYTHON_DEPEND = 'python | python-dev | python-all | python-all-dev';
our $PYTHON3_DEPEND = 'python3 | python3-dev | python3-all | python3-all-dev';
diff --git a/checks/scripts b/checks/scripts
index 8918d20..54e774f 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -30,7 +30,7 @@ use Lintian::Check qw($known_shells_regex);
use Lintian::Data;
use Lintian::Relation;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail);
sub _parse_interpreters {
my ($interpreter, $value) = @_;
diff --git a/checks/shared-libs b/checks/shared-libs
index a479364..4dfc705 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -27,7 +27,7 @@ use File::Basename;
use Lintian::Data;
use Lintian::Relation;
use Lintian::Tags qw(tag);
-use Lintian::Util;
+use Lintian::Util qw(fail slurp_entire_file);
# Libraries that should only be used in the presence of certain capabilities
# may be located in subdirectories of the standard ldconfig search path with
diff --git a/collection/bin-pkg-control b/collection/bin-pkg-control
index a68a9a4..6325973 100755
--- a/collection/bin-pkg-control
+++ b/collection/bin-pkg-control
@@ -24,7 +24,7 @@ use warnings;
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Command qw(spawn reap);
-use Lintian::Util qw(fail);
+use Lintian::Util qw(delete_dir fail);
($#ARGV == 2) or fail 'syntax: bin-pkg-control <pkg> <type> <dir>';
my ($pkg, $type, $dir) = @ARGV;
diff --git a/debian/changelog b/debian/changelog
index daeb8b2..562e6c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,7 @@ lintian (2.5.7) UNRELEASED; urgency=low
+ [NT] Remove some old tags that are no longer useful.
(Closes: #663516)
+ [NT] Migrate to sorted_index from sorted_file_info.
+ + [NT] Explicitly import needed subs from L::Util.
* checks/binaries{,.desc}:
+ [NT] Move embedded library data to a data file.
+ [NT] Add ELF hardening checks. Thanks to Kees Cook for
@@ -164,6 +165,7 @@ lintian (2.5.7) UNRELEASED; urgency=low
+ [JW] Consider duplicate fields a syntax error in dctrl files.
Previously, duplicate fields were silently ignored (except
when a separate tag would check for it). (Closes: #664061)
+ + [NT] Stop exported a majority of all subs by default.
* profiles/ubuntu/main.profile:
+ [NT] Add a number of NMU related tags to the list of disabled
diff --git a/frontend/lintian b/frontend/lintian
index 4725e21..e8da59f 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -753,7 +753,7 @@ unshift @INC, "$opt{'LINTIAN_ROOT'}/lib";
require Lintian::Lab;
require Lintian::Util;
-import Lintian::Util;
+import Lintian::Util qw(fail read_dpkg_control);
require Lintian::Collect;
require Lintian::DepMap::Properties;
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 178f4c1..f059360 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -29,7 +29,7 @@ use Cwd();
use Lintian::Relation;
use Parse::DebianChangelog;
-use Lintian::Util;
+use Lintian::Util qw(read_dpkg_control);
# Initialize a new source package collect object. Takes the package name,
# which is currently unused.
diff --git a/lib/Lintian/Internal/FrontendUtil.pm b/lib/Lintian/Internal/FrontendUtil.pm
index 4b68faf..d56e86a 100644
--- a/lib/Lintian/Internal/FrontendUtil.pm
+++ b/lib/Lintian/Internal/FrontendUtil.pm
@@ -21,7 +21,7 @@ use strict;
use warnings;
use base qw(Exporter);
-use Lintian::Util;
+use Lintian::Util qw(check_path fail);
our @EXPORT = qw(&check_test_feature &find_default_profile);
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index bb4fde2..b4ae876 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -24,7 +24,7 @@ use warnings;
use Lintian::Collect::Group;
use Lintian::Processable;
-use Lintian::Util;
+use Lintian::Util qw(fail get_dsc_info);
=head1 NAME
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index 625623d..b055448 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -23,20 +23,19 @@ package Lintian::Util;
use strict;
use warnings;
-use Exporter;
+use base 'Exporter';
# Force export as soon as possible, since some of the modules we load also
# depend on us and the sequencing can cause things not to be exported
# otherwise.
-our (@ISA, @EXPORT);
+our (@EXPORT_OK, @EXPORT);
BEGIN {
- @ISA = qw(Exporter);
- @EXPORT = qw(parse_dpkg_control
+ @EXPORT_OK = qw(
+ parse_dpkg_control
read_dpkg_control
get_deb_info
get_dsc_info
slurp_entire_file
- get_file_checksum
file_is_encoded_in_non_utf8
fail
system_env
@@ -48,6 +47,11 @@ BEGIN {
check_path
clean_env
resolve_pkg_path);
+
+ # Export by default due to its wide spread use in "one-liners" in
+ # t/source/*/Makefile.
+ @EXPORT = qw(get_file_checksum);
+
}
use Encode ();
diff --git a/private/generate-profiles.pl b/private/generate-profiles.pl
index 401c062..7831303 100755
--- a/private/generate-profiles.pl
+++ b/private/generate-profiles.pl
@@ -23,7 +23,7 @@ BEGIN {
}
use lib "$ENV{LINTIAN_ROOT}/lib";
-use Lintian::Util;
+use Lintian::Util qw(fail read_dpkg_control);
my $root = $ENV{LINTIAN_ROOT};
my @dirs = ('profiles/debian');
diff --git a/private/graph b/private/graph
index e9b8078..4b520df 100755
--- a/private/graph
+++ b/private/graph
@@ -11,7 +11,7 @@ BEGIN {
}
use lib "$ENV{'LINTIAN_ROOT'}/lib";
-use Lintian::Util;
+use Lintian::Util qw(get_dsc_info);
my %opt = (
'checks' => 1,
diff --git a/private/tag-stats b/private/tag-stats
index c53e77e..8cc6cdc 100755
--- a/private/tag-stats
+++ b/private/tag-stats
@@ -25,7 +25,7 @@ my $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Tag::Info;
-use Lintian::Util;
+use Lintian::Util qw(fail read_dpkg_control);
my @severities = reverse qw(pedantic wishlist minor normal important serious);
my @certainties = reverse qw(wild-guess possible certain);
diff --git a/private/update-coverage b/private/update-coverage
index 73b1c6b..728ddbf 100755
--- a/private/update-coverage
+++ b/private/update-coverage
@@ -26,7 +26,7 @@ BEGIN {
my $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
use lib "$ENV{'LINTIAN_ROOT'}/lib";
-use Lintian::Util;
+use Lintian::Util qw(read_dpkg_control);
# Check that we're being run from the right place (although the above probably
# died if we weren't).
diff --git a/reporting/harness b/reporting/harness
index 2c8b700..891f8b4 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -101,7 +101,7 @@ unshift @INC, "$LINTIAN_ROOT/lib";
require Lintian::Lab;
require Lintian::Lab::Manifest;
require Lintian::Processable::Package;
-require Lintian::Util;
+require Lintian::Util; # _parse_dpkg_control_iterative
# turn file buffering off
$| = 1;
diff --git a/reporting/html_reports b/reporting/html_reports
index 5e41254..35db64d 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -54,7 +54,7 @@ use Lintian::Data;
use Lintian::Lab;
use Lintian::Profile;
use Lintian::Internal::FrontendUtil;
-use Lintian::Util;
+use Lintian::Util qw(read_dpkg_control slurp_entire_file);
my $profile = Lintian::Profile->new (find_default_profile ("$LINTIAN_ROOT/profiles"),
$LINTIAN_ROOT,
diff --git a/t/runtests b/t/runtests
index 4086506..cd31000 100755
--- a/t/runtests
+++ b/t/runtests
@@ -58,7 +58,7 @@ BEGIN {
use lib "$ENV{'LINTIAN_ROOT'}/lib";
-use Lintian::Util;
+use Lintian::Util qw(fail read_dpkg_control);
# --- Global configuration
diff --git a/testset/runtests b/testset/runtests
index a1691f0..863c5a8 100755
--- a/testset/runtests
+++ b/testset/runtests
@@ -114,7 +114,7 @@ my $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Profile;
-use Lintian::Util;
+use Lintian::Util qw(fail);
# --- Set the ways to call lintian and dpkg-buildpackage
my $lintian_options = '-I -E';
--
Debian package checker
Reply to: