[SCM] Debian package checker branch, master, updated. 2.5.10-71-g65d4f1d
The following commit has been merged in the master branch:
commit 65d4f1d46e91b45a7ed7620c37fd07ad28d5b5a7
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jul 22 17:12:24 2012 +0200
checks/*: Update the parameter handling of the run functions
Stylistic change to all run functions in checks to read parameters
like any other function/method in Lintian. Also take the liberty of
"skipping" unused paramters.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/apache2 b/checks/apache2
index 103f2d1..bb48c54 100644
--- a/checks/apache2
+++ b/checks/apache2
@@ -30,10 +30,7 @@ use Lintian::Relation qw(:constants);
use Lintian::Util qw(fail);
sub run {
- my $pkg = shift;
- my $type = shift;
- my $info = shift;
-
+ my ($pkg, $type, $info) = @_;
# Do nothing if the package in question appears to be related to
# the web server itself
diff --git a/checks/binaries b/checks/binaries
index b70c0f8..867b54f 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -85,10 +85,7 @@ our $HARDENING = Lintian::Data->new ('binaries/hardening-tags', qr/\s*\|\|\s*/o,
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
+my ($pkg, $type, $info, $proc) = @_;
my $arch;
my $multiarch;
diff --git a/checks/changelog-file b/checks/changelog-file
index 4f52bba..a2d088e 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -32,9 +32,8 @@ use Parse::DebianChangelog;
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, $type, $info) = @_;
+
my $found_html=0;
my $found_text=0;
my $native_pkg;
diff --git a/checks/changes-file b/checks/changes-file
index d082e5d..d4ca475 100644
--- a/checks/changes-file
+++ b/checks/changes-file
@@ -31,9 +31,7 @@ my $KNOWN_DISTS = Lintian::Data->new ('changes-file/known-dists');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, undef, $info) = @_;
# If we don't have a Format key, something went seriously wrong.
# Tag the file and skip remaining processing.
diff --git a/checks/conffiles b/checks/conffiles
index 6f99fb9..5d510bf 100644
--- a/checks/conffiles
+++ b/checks/conffiles
@@ -28,9 +28,7 @@ use Lintian::Util qw(fail);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $cf = $info->control('conffiles');
diff --git a/checks/control-file b/checks/control-file
index 7536c52..6e8f89c 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -37,9 +37,7 @@ my $src_fields = Lintian::Data->new('common/source-fields');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, $type, $info) = @_;
my $dcontrol = $info->debfiles('control');
diff --git a/checks/control-files b/checks/control-files
index 98227d4..175a4ff 100644
--- a/checks/control-files
+++ b/checks/control-files
@@ -34,9 +34,7 @@ my $UDEB_PERMISSIONS = Lintian::Data->new('control-files/udeb-permissions', qr/\
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, $type, $info) = @_;
my $ctrl = $type eq 'udeb' ? $UDEB_PERMISSIONS : $DEB_PERMISSIONS;
my $ctrl_alt = $type eq 'udeb' ? $DEB_PERMISSIONS : $UDEB_PERMISSIONS;
diff --git a/checks/copyright-file b/checks/copyright-file
index 5ad1036..c4bdd11 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -33,11 +33,7 @@ our $KNOWN_ESSENTIAL = Lintian::Data->new('fields/essential');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my ($pkg, $type, $info, undef, $group) = @_;
my $found = 0;
my $linked = 0;
diff --git a/checks/cruft b/checks/cruft
index 362e144..ab7fd14 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -93,9 +93,7 @@ our @EOL_TERMINATORS_FILES = qw(control changelog);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, undef, $info) = @_;
my $droot = $info->debfiles;
diff --git a/checks/deb-format b/checks/deb-format
index dcca0b2..c86b952 100644
--- a/checks/deb-format
+++ b/checks/deb-format
@@ -32,9 +32,7 @@ our %ERRORS = ('control-errors' => 'tar-errors-from-control',
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, $type, $info) = @_;
my $deb = $info->lab_data_path ('deb');
diff --git a/checks/debconf b/checks/debconf
index 6829a3e..ac9a118 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -59,9 +59,7 @@ my $ANY_DEBCONF = Lintian::Relation->new (join (' | ', qw(debconf debconf-2.0 cd
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, $type, $info) = @_;
my $seenconfig='';
my $seentemplates='';
diff --git a/checks/debhelper b/checks/debhelper
index 4e2b960..e285dba 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -57,9 +57,7 @@ my $MISC_DEPENDS = Lintian::Relation->new ('${misc:Depends}');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $droot = $info->debfiles;
diff --git a/checks/debian-readme b/checks/debian-readme
index 2ae459c..db23a6a 100644
--- a/checks/debian-readme
+++ b/checks/debian-readme
@@ -27,9 +27,8 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, undef, $info) = @_;
+
my $readme = '';
if (open (IN, '<', $info->lab_data_path ('README.Debian'))) {
diff --git a/checks/debian-source-dir b/checks/debian-source-dir
index b797c12..7a391d3 100644
--- a/checks/debian-source-dir
+++ b/checks/debian-source-dir
@@ -33,9 +33,7 @@ our $KNOWN_FILES = Lintian::Data->new('debian-source-dir/known-files');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $dsrc = $info->debfiles('source');
diff --git a/checks/description b/checks/description
index 95a66e9..e93e7a8 100644
--- a/checks/description
+++ b/checks/description
@@ -29,9 +29,7 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, $type, $info) = @_;
my $tabs = 0;
my $lines = 0;
diff --git a/checks/duplicate-files b/checks/duplicate-files
index 6810d14..ae56059 100644
--- a/checks/duplicate-files
+++ b/checks/duplicate-files
@@ -26,9 +26,7 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my %hashmap;
diff --git a/checks/fields b/checks/fields
index d860e13..f542fa3 100644
--- a/checks/fields
+++ b/checks/fields
@@ -138,10 +138,8 @@ our $SOURCE_FIELDS = Lintian::Data->new('common/source-fields');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
+my ($pkg, $type, $info, $proc) = @_;
+
my $version;
my $arch_indep;
diff --git a/checks/filename-length b/checks/filename-length
index 423bcaa..28581e3 100644
--- a/checks/filename-length
+++ b/checks/filename-length
@@ -33,10 +33,8 @@ use constant LONGEST_ARCHITECTURE => length 'kfreebsd-amd64';
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
+my ($pkg, $type, $info, $proc) = @_;
+
# pkg_version(_arch)?.type
# - here we pay for length of "name_version"
my $len = length($pkg) + length($proc->pkg_version) + 1;
diff --git a/checks/files b/checks/files
index 4dd66c3..5197d98 100644
--- a/checks/files
+++ b/checks/files
@@ -158,10 +158,7 @@ my $STANDARD_FILES = Lintian::Data->new('files/standard-files');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
+my ($pkg, $type, $info, $proc) = @_;
my $file;
my $source_pkg;
diff --git a/checks/group-checks b/checks/group-checks
index 576b263..d98d8d0 100644
--- a/checks/group-checks
+++ b/checks/group-checks
@@ -31,11 +31,7 @@ my $KNOWN_PRIOS = Lintian::Data->new ('common/priorities', qr/\s*=\s*/o);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my (undef, undef, $info, undef, $group) = @_;
## To find circular dependencies, we will first generate
## Strongly Connected Components using Tarjan's algorithm
diff --git a/checks/huge-usr-share b/checks/huge-usr-share
index 7f79b13..5c8e7ab 100644
--- a/checks/huge-usr-share
+++ b/checks/huge-usr-share
@@ -32,9 +32,7 @@ my $THRESHOLD_PERC = 50;
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
# Skip architecture-dependent packages.
my $arch = $info->field('architecture') || '';
diff --git a/checks/infofiles b/checks/infofiles
index 9f4377a..52432f4 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -30,9 +30,7 @@ use File::Basename qw(fileparse);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
# Read package contents...
foreach my $file ($info->sorted_index) {
diff --git a/checks/init.d b/checks/init.d
index 1ec732c..7ed5eb3 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -65,9 +65,7 @@ our $VIRTUAL_FACILITIES = Lintian::Data->new('init.d/virtual_facilities');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $initd_dir = $info->lab_data_path ('init.d');
diff --git a/checks/java b/checks/java
index f86be3d..e192916 100644
--- a/checks/java
+++ b/checks/java
@@ -27,9 +27,7 @@ use Lintian::Util qw(resolve_pkg_path);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, undef, $info) = @_;
my $java_info = $info->java_info;
my $missing_jarwrapper = 0;
diff --git a/checks/manpages b/checks/manpages
index 8b1d87c..c4320cc 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -31,11 +31,7 @@ use File::Basename;
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my ($pkg, undef, $info, $proc, $group) = @_;
my $ginfo = $group->info;
my %binary;
diff --git a/checks/md5sums b/checks/md5sums
index 9cddaff..6011e79 100644
--- a/checks/md5sums
+++ b/checks/md5sums
@@ -27,9 +27,7 @@ use Lintian::Util qw(fail);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $control = $info->control('md5sums');
diff --git a/checks/menu-format b/checks/menu-format
index f92f23c..ca812f6 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -326,11 +326,7 @@ my %needs_tag_vals_hash = map { $_ => 1 } @needs_tag_vals;
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my ($pkg, $type, $info, $proc, $group) = @_;
my $mdir = $info->lab_data_path ('menu');
my @menufiles;
diff --git a/checks/menus b/checks/menus
index 6a9c85c..c391592 100644
--- a/checks/menus
+++ b/checks/menus
@@ -52,9 +52,7 @@ our $SECTIONS = Lintian::Data->new ('doc-base/sections');
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, $type, $info) = @_;
my %all_files = ();
my %all_links = ();
diff --git a/checks/nmu b/checks/nmu
index 85ebb83..9450dbe 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -26,9 +26,7 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $changelog_mentions_nmu = 0;
my $changelog_mentions_local = 0;
diff --git a/checks/ocaml b/checks/ocaml
index 597af78..1db974d 100644
--- a/checks/ocaml
+++ b/checks/ocaml
@@ -34,9 +34,7 @@ our $MAX_CMI = 3;
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my ($pkg, undef, $info) = @_;
# Collect information about .a files from ar-info dump
my %provided_o;
diff --git a/checks/patch-systems b/checks/patch-systems
index f492c16..1a3eb18 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -28,7 +28,7 @@ use Lintian::Util qw(fail);
use Cwd qw(realpath);
sub run {
- my ($pkg, $type, $info) = @_;
+ my (undef, undef, $info) = @_;
#Some (cruft) checks are valid for every patch system, so we need to record that:
my $uses_patch_system = 0;
diff --git a/checks/po-debconf b/checks/po-debconf
index 5b6f52f..7172733 100644
--- a/checks/po-debconf
+++ b/checks/po-debconf
@@ -27,9 +27,7 @@ use Lintian::Util qw(fail system_env);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $full_translation = 0;
my $debfiles = $info->debfiles;
diff --git a/checks/rules b/checks/rules
index e02d7a6..4d88897 100644
--- a/checks/rules
+++ b/checks/rules
@@ -104,11 +104,7 @@ my %debhelper_order =
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my (undef, undef, $info, undef, $group) = @_;
my $rules = $info->debfiles('rules');
diff --git a/checks/scripts b/checks/scripts
index 5b97e5a..edfbb9e 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -191,6 +191,8 @@ sub script_tag {
sub run {
+my ($pkg, undef, $info) = @_;
+
my %executable = ();
my %ELF = ();
my %scripts = ();
@@ -198,10 +200,6 @@ my %scripts = ();
# no dependency for install-menu, because the menu package specifically
# says not to depend on it.
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-
foreach my $file ($info->sorted_index) {
next if $file eq '';
$ELF{$file} = 1 if $info->file_info ($file) =~ /^[^,]*\bELF\b/o;
diff --git a/checks/shared-libs b/checks/shared-libs
index 792694b..cbe4c8f 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -52,6 +52,8 @@ my $ldconfig_dirs = Lintian::Data->new('shared-libs/ldconfig-dirs');
sub run {
+my ($pkg, $type, $info, undef, $group) = @_;
+
my $file;
my $must_call_ldconfig;
my %SONAME;
@@ -61,12 +63,6 @@ my @words;
# ---end-of-configuration-part---
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
-
my $objdump = $info->objdump_info;
my @devpkgs;
diff --git a/checks/source-copyright b/checks/source-copyright
index 916dadd..07918ab 100644
--- a/checks/source-copyright
+++ b/checks/source-copyright
@@ -41,7 +41,7 @@ my %dep5_renamed_fields = (
sub run {
-my ($pkg, $type, $info) = @_;
+my (undef, undef, $info) = @_;
my $copyright_filename = $info->debfiles('copyright');
diff --git a/checks/standards-version b/checks/standards-version
index 04ced65..0a79cb5 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -52,9 +52,7 @@ my @CURRENT = split(m/\./, $CURRENT);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
# udebs aren't required to conform to policy, so they don't need
# Standards-Version. (If they have it, though, it should be valid.)
diff --git a/checks/symlinks b/checks/symlinks
index 7279c47..01c5213 100644
--- a/checks/symlinks
+++ b/checks/symlinks
@@ -27,11 +27,7 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
-my $proc = shift;
-my $group = shift;
+my ($pkg, undef, $info, $proc, $group) = @_;
my $ginfo = $group->info;
my @brokenlinks;
diff --git a/checks/version-substvars b/checks/version-substvars
index a7de75c..cc5c3ae 100644
--- a/checks/version-substvars
+++ b/checks/version-substvars
@@ -43,9 +43,7 @@ use Lintian::Tags qw(tag);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $binpkgs = $info->binaries;
diff --git a/checks/watch-file b/checks/watch-file
index 7f1d26b..9943da2 100644
--- a/checks/watch-file
+++ b/checks/watch-file
@@ -31,9 +31,7 @@ use Lintian::Util qw(fail);
sub run {
-my $pkg = shift;
-my $type = shift;
-my $info = shift;
+my (undef, undef, $info) = @_;
my $template = 0;
my $wfile = $info->debfiles('watch');
--
Debian package checker
Reply to: