[SCM] Debian package checker branch, master, updated. 2.4.3-186-g837fc42
The following commit has been merged in the master branch:
commit 837fc42c84509823d5e72c5a387acb6599a54a77
Author: Raphael Geissert <atomo64@gmail.com>
Date: Thu Jan 27 02:52:41 2011 -0600
Get rid of lots of useless variable interpolation
diff --git a/checks/binaries b/checks/binaries
index 5526e35..a99b0ee 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -145,23 +145,23 @@ foreach my $file (sort keys %{$info->objdump_info}) {
if ($arch ne 'hppa') {
if ($foo eq '.text' and $sec eq 'Base' and
$sym eq '__gmon_start__') {
- tag 'binary-compiled-with-profiling-enabled', "$file";
+ tag 'binary-compiled-with-profiling-enabled', $file;
}
} else {
if ( ($sec =~ /^GLIBC_.*/) and ($sym eq '_mcount') ) {
- tag 'binary-compiled-with-profiling-enabled', "$file";
+ tag 'binary-compiled-with-profiling-enabled', $file;
}
}
}
foreach (@{$objdump->{NOTES}}) {
if ($_ eq 'File format not recognized') {
- tag 'apparently-corrupted-elf-binary', "$file";
+ tag 'apparently-corrupted-elf-binary', $file;
} elsif ($_ eq 'File truncated') {
- tag 'apparently-truncated-elf-binary', "$file";
+ tag 'apparently-truncated-elf-binary', $file;
} elsif ($_ eq 'Packed with UPX') {
- tag 'binary-file-compressed-with-upx', "$file";
+ tag 'binary-file-compressed-with-upx', $file;
} elsif ($_ eq 'Invalid operation') {
- tag 'binary-with-bad-dynamic-table', "$file" unless $file =~ m%^usr/lib/debug/%;
+ tag 'binary-with-bad-dynamic-table', $file unless $file =~ m%^usr/lib/debug/%;
}
}
}
@@ -238,7 +238,7 @@ foreach my $file (@{$info->sorted_file_info}) {
$multiarch = Lintian::Data->new('binaries/multiarch')
unless defined($multiarch);
unless ($arch_path and $multiarch->known($arch_path)) {
- tag 'arch-independent-package-contains-binary-or-object', "$file";
+ tag 'arch-independent-package-contains-binary-or-object', $file;
}
}
@@ -246,11 +246,11 @@ foreach my $file (@{$info->sorted_file_info}) {
next unless $fileinfo =~ m/^[^,]*\bELF\b/o;
if ($file =~ m,^etc/,) {
- tag 'binary-in-etc', "$file";
+ tag 'binary-in-etc', $file;
}
if ($file =~ m,^usr/share/,) {
- tag 'arch-dependent-file-in-usr-share', "$file";
+ tag 'arch-dependent-file-in-usr-share', $file;
}
if ($arch ne 'all' and $fileinfo !~ m/$ARCH_REGEX{$arch}/) {
@@ -285,13 +285,13 @@ foreach my $file (@{$info->sorted_file_info}) {
# Check for OCaml custom executables (#498138)
tag 'ocaml-custom-executable', $file;
} else {
- tag 'unstripped-binary-or-object', "$file";
+ tag 'unstripped-binary-or-object', $file;
}
}
} else {
# stripped but a debug or profiling library?
if (($file =~ m,/lib/debug/,o) or ($file =~ m,/lib/profile/,o)) {
- tag 'library-in-debug-or-profile-should-not-be-stripped', "$file";
+ tag 'library-in-debug-or-profile-should-not-be-stripped', $file;
} else {
# appropriately stripped, but is it stripped enough?
if (exists $objdump->{NOTE_SECTION}) {
@@ -362,7 +362,7 @@ foreach my $file (@{$info->sorted_file_info}) {
# loader (which itself has no dependencies).
next if ($file =~ m%^usr/lib/debug/%);
next if ($file =~ m%^lib(?:|32|64)/(?:[\w/]+/)?ld-[\d.]+\.so$%);
- tag 'shared-lib-without-dependency-information', "$file";
+ tag 'shared-lib-without-dependency-information', $file;
} else {
# Some exceptions: files in /boot, /usr/lib/debug/*, named *-static or
# *.static, or *-static as package-name.
@@ -375,7 +375,7 @@ foreach my $file (@{$info->sorted_file_info}) {
next if ($file =~ m%^usr/lib/debug/%);
# ldconfig must be static.
next if ($file eq 'sbin/ldconfig');
- tag 'statically-linked-binary', "$file";
+ tag 'statically-linked-binary', $file;
}
} else {
my $lib;
@@ -391,9 +391,9 @@ foreach my $file (@{$info->sorted_file_info}) {
}
if ($no_libc and not $file =~ m,/libc\b,) {
if ($fileinfo =~ m/shared object/) {
- tag 'library-not-linked-against-libc', "$file";
+ tag 'library-not-linked-against-libc', $file;
} else {
- tag 'program-not-linked-against-libc', "$file";
+ tag 'program-not-linked-against-libc', $file;
}
}
}
diff --git a/checks/changelog-file b/checks/changelog-file
index 80444a1..e97aded 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -97,9 +97,9 @@ foreach (@{$info->sorted_index}) {
# Check a few things about the NEWS.Debian file.
if ($file =~ /^NEWS.Debian(?:\.gz)?$/i) {
if (not $file =~ /\.gz$/) {
- tag 'debian-news-file-not-compressed', "$file1";
+ tag 'debian-news-file-not-compressed', $file1;
} elsif ($file ne 'NEWS.Debian.gz') {
- tag 'wrong-name-for-debian-news-file', "$file1";
+ tag 'wrong-name-for-debian-news-file', $file1;
}
}
@@ -110,7 +110,7 @@ foreach (@{$info->sorted_index}) {
next unless $file =~ m/^changelog(?:\.html)?(?:\.gz)?$|changelog.Debian(?:\.gz)?$/;
if (not $file =~ m/\.gz$/) {
- tag 'changelog-file-not-compressed', "$file";
+ tag 'changelog-file-not-compressed', $file;
} else {
my $max_compressed = 0;
if (exists $file_info{$file1} && defined $file_info{$file1}) {
@@ -120,7 +120,7 @@ foreach (@{$info->sorted_index}) {
}
if (not $max_compressed and $file_info{$file1} =~ m/gzip compressed/) {
unless ($is_a_symlink{$file1}) {
- tag 'changelog-not-compressed-with-max-compression', "$file";
+ tag 'changelog-not-compressed-with-max-compression', $file;
}
}
}
@@ -326,7 +326,7 @@ if (@entries) {
}
my $changes = $entry->Changes || '';
while ($changes =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
- tag 'possible-missing-colon-in-closes', "$1" if $1;
+ tag 'possible-missing-colon-in-closes', $1 if $1;
}
my $closes = $entry->Closes;
for my $bug (@$closes) {
diff --git a/checks/control-file b/checks/control-file
index 2ceec48..f87a440 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -70,7 +70,7 @@ while (<CONTROL>) {
if ($field =~ /^xs-vcs-/) {
my $base = $field;
$base =~ s/^xs-//;
- tag 'xs-vcs-header-in-debian-control', "$field"
+ tag 'xs-vcs-header-in-debian-control', $field
if $src_fields->known($base);
}
if ($field eq 'xc-package-type') {
diff --git a/checks/control-files b/checks/control-files
index 1ab86c6..9de63bf 100644
--- a/checks/control-files
+++ b/checks/control-files
@@ -77,17 +77,17 @@ while (<IN>) {
# valid control file?
unless ( exists $ctrl{$file} ) {
if ( exists $ctrl_alt{$file} ) {
- tag 'not-allowed-control-file', "$file";
+ tag 'not-allowed-control-file', $file;
next;
} else {
- tag 'unknown-control-file', "$file";
+ tag 'unknown-control-file', $file;
next;
}
}
# I'm not sure about the udeb case
if ($type ne 'udeb' and $size == 0) {
- tag 'control-file-is-empty', "$file";
+ tag 'control-file-is-empty', $file;
}
diff --git a/checks/copyright-file b/checks/copyright-file
index 8e878cd..f02f714 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -83,7 +83,7 @@ foreach (@{$info->sorted_index}) {
# check if this symlink references a directory elsewhere
if ($link =~ m,^(?:\.\.)?/,) {
- tag 'usr-share-doc-symlink-points-outside-of-usr-share-doc', "$link";
+ tag 'usr-share-doc-symlink-points-outside-of-usr-share-doc', $link;
last;
}
@@ -115,7 +115,7 @@ foreach (@{$info->sorted_index}) {
# yes, everything is ok.
} else {
# no, it is not.
- tag 'usr-share-doc-symlink-to-foreign-package', "$link";
+ tag 'usr-share-doc-symlink-to-foreign-package', $link;
}
} else { # no, source is not available
tag 'cannot-check-whether-usr-share-doc-symlink-points-to-foreign-package';
@@ -229,7 +229,7 @@ if (length($_) > 10000
# wtf?
if ((m,common-licenses(/\S+),) && (! m,/usr/share/common-licenses/,)) {
- tag 'copyright-does-not-refer-to-common-license-file', "$1";
+ tag 'copyright-does-not-refer-to-common-license-file', $1;
}
# This check is a bit prone to false positives, since some other licenses
diff --git a/checks/debconf b/checks/debconf
index 94a4e64..34cd87b 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -436,7 +436,7 @@ for my $file (qw(config prerm postrm preinst postinst)) {
}
if (not $isdefault and m/db_fset.*isdefault/) {
# TODO: Perl?
- tag 'isdefault-flag-is-deprecated', "$file";
+ tag 'isdefault-flag-is-deprecated', $file;
$isdefault=1;
}
if (not $db_purge and m/db_purge/) { # TODO: Perl?
@@ -519,7 +519,7 @@ foreach my $filename (sort keys %{$info->scripts}) {
s/#.*//; # Not perfect for Perl, but should be OK
if (m,/usr/share/debconf/confmodule, or
m/(?:Debconf|Debian::DebConf)::Client::ConfModule/) {
- tag 'debconf-is-not-a-registry', "$filename";
+ tag 'debconf-is-not-a-registry', $filename;
last;
}
}
diff --git a/checks/description b/checks/description
index 8d2f325..8e17890 100644
--- a/checks/description
+++ b/checks/description
@@ -140,7 +140,7 @@ foreach (split /\n/, $description) {
m%(?:\s|^)((\w(?:\S*\w)?)(\s+(\2))+)(?:[\).,?!:;\s]|\z)%i) {
my $words = $1;
$stripped =~ s/\Q$words//;
- tag "description-contains-duplicated-word", "$words";
+ tag "description-contains-duplicated-word", $words;
}
my $first_person = $_;
diff --git a/checks/etcfiles b/checks/etcfiles
index d7e0c55..512ef7a 100644
--- a/checks/etcfiles
+++ b/checks/etcfiles
@@ -55,7 +55,7 @@ foreach my $file (@{$info->sorted_index}) {
and $file ne 'etc/init.d/skeleton'
and $file ne 'etc/init.d/rc'
and $file ne 'etc/init.d/rcS') {
- tag "file-in-etc-not-marked-as-conffile", "$file";
+ tag "file-in-etc-not-marked-as-conffile", $file;
}
}
diff --git a/checks/fields b/checks/fields
index 37d050f..fd121be 100644
--- a/checks/fields
+++ b/checks/fields
@@ -234,10 +234,10 @@ if (not defined $info->field('version')) {
if (@_ = _valid_version($version)) {
my ($epoch, $upstream, $debian) = @_;
if ($upstream !~ /^\d/i) {
- tag 'upstream-version-not-numeric', "$version";
+ tag 'upstream-version-not-numeric', $version;
}
if (defined $debian) {
- tag 'debian-revision-should-not-be-zero', "$version"
+ tag 'debian-revision-should-not-be-zero', $version
if $debian eq '-0';
my $ubuntu;
if($debian =~ /^-(?:[^.]+)(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/o){
@@ -248,20 +248,20 @@ if (not defined $info->field('version')) {
$extra = $1;
}
if (defined $extra) {
- tag 'debian-revision-not-well-formed', "$version";
+ tag 'debian-revision-not-well-formed', $version;
}
} else {
- tag 'debian-revision-not-well-formed', "$version";
+ tag 'debian-revision-not-well-formed', $version;
}
if ($debian =~ /^-[^.-]+\.[^.-]+\./ and not $ubuntu) {
- tag 'binary-nmu-uses-old-version-style', "$version"
+ tag 'binary-nmu-uses-old-version-style', $version
if $type eq 'binary';
- tag 'binary-nmu-debian-revision-in-source', "$version"
+ tag 'binary-nmu-debian-revision-in-source', $version
if $type eq 'source';
}
}
if ($version =~ /\+b\d+$/ && $type eq 'source') {
- tag 'binary-nmu-debian-revision-in-source', "$version";
+ tag 'binary-nmu-debian-revision-in-source', $version;
}
# Checks for the dfsg convention for repackaged upstream
@@ -284,7 +284,7 @@ if (not defined $info->field('version')) {
tag 'package-superseded-by-perl', "with $core_version"
}
} else {
- tag 'bad-version-number', "$version";
+ tag 'bad-version-number', $version;
}
}
@@ -304,9 +304,9 @@ if (not defined $info->field('architecture')) {
}
for my $arch (@archs) {
- tag 'unknown-architecture', "$arch"
+ tag 'unknown-architecture', $arch
unless $KNOWN_ARCHS->known($arch) || $ARCH_WILDCARDS{$arch};
- tag 'arch-wildcard-in-binary-package', "$arch"
+ tag 'arch-wildcard-in-binary-package', $arch
if ($type eq 'binary' && $ARCH_WILDCARDS{$arch});
}
@@ -388,7 +388,7 @@ if (not defined $info->field('source')) {
if ($source !~ /^[a-z0-9][-+\.a-z0-9]+ # Package name
\s*
(?:\((?:\d+:)?(?:[-\.+:a-zA-Z0-9~]+?)(?:-[\.+a-zA-Z0-9~]+)?\))?\s*$/x) { #Version
- tag 'source-field-malformed', "$source";
+ tag 'source-field-malformed', $source;
}
}
}
@@ -419,18 +419,18 @@ if (not defined $info->field('section')) {
if ($type eq 'udeb') {
unless ($section eq 'debian-installer') {
- tag 'wrong-section-for-udeb', "$section";
+ tag 'wrong-section-for-udeb', $section;
}
} else {
my @parts = split /\//, $section, 2;
if (scalar @parts > 1) {
- tag 'unknown-section', "$section" unless $known_archive_parts{$parts[0]};
- tag 'unknown-section', "$section" unless $known_sections{$parts[1]};
+ tag 'unknown-section', $section unless $known_archive_parts{$parts[0]};
+ tag 'unknown-section', $section unless $known_sections{$parts[1]};
} elsif ($parts[0] eq 'unknown') {
tag 'section-is-dh_make-template';
} else {
- tag 'unknown-section', "$section" unless $known_sections{$parts[0]};
+ tag 'unknown-section', $section unless $known_sections{$parts[0]};
}
# Check package name <-> section. oldlibs is a special case; let
@@ -456,7 +456,7 @@ if (not defined $info->field('priority')) {
unfold('priority', \$priority);
- tag 'unknown-priority', "$priority" if (! $known_prios{$priority});
+ tag 'unknown-priority', $priority if (! $known_prios{$priority});
if ($pkg =~ /-dbg$/) {
tag 'debug-package-should-be-priority-extra', $pkg
@@ -502,7 +502,7 @@ if (defined $info->field('installer-menu-item')) {
unfold('installer-menu-item', \$menu_item);
- $menu_item =~ /^\d+$/ or tag 'bad-menu-item', "$menu_item";
+ $menu_item =~ /^\d+$/ or tag 'bad-menu-item', $menu_item;
}
@@ -546,7 +546,7 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
my $is_dep_field = sub { grep { $_ eq $_[0] } qw(depends pre-depends recommends suggests) };
- tag 'alternates-not-allowed', "$field"
+ tag 'alternates-not-allowed', $field
if ($data =~ /\|/ && ! &$is_dep_field($field));
for my $dep (split /\s*,\s*/, $data) {
@@ -584,18 +584,18 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
for my $part_d (@alternatives) {
my ($d_pkg, $d_version, $d_arch, $rest, $part_d_orig) = @$part_d;
- tag 'versioned-provides', "$part_d_orig"
+ tag 'versioned-provides', $part_d_orig
if ($field eq 'provides' && $d_version->[0]);
tag 'bad-provided-package-name', $d_pkg
if $d_pkg !~ /^[a-z0-9][-+\.a-z0-9]+$/;
- tag 'breaks-without-version', "$part_d_orig"
+ tag 'breaks-without-version', $part_d_orig
if ($field eq 'breaks' && !$d_version->[0] && !$VIRTUAL_PACKAGES->known($d_pkg)
- && !$replaces->implies("$part_d_orig")
+ && !$replaces->implies($part_d_orig)
);
- tag 'conflicts-with-version', "$part_d_orig"
+ tag 'conflicts-with-version', $part_d_orig
if ($field eq 'conflicts' && $d_version->[0]);
tag 'obsolete-relation-form', "$field: $part_d_orig"
@@ -626,17 +626,17 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
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');
- tag 'needlessly-depends-on-awk', "$field"
+ tag 'needlessly-depends-on-awk', $field
if ($d_pkg eq 'awk' && ! $d_version->[0] && &$is_dep_field($field) && $pkg ne 'base-files');
- tag 'depends-on-libdb1-compat', "$field"
+ tag 'depends-on-libdb1-compat', $field
if ($d_pkg eq 'libdb1-compat' && $pkg !~ /^libc(?:6|6.1|0.3)/ && $field =~ /^(pre-)depends$/);
- tag 'depends-on-python-minimal', "$field",
+ tag 'depends-on-python-minimal', $field,
if ($d_pkg =~ /^python[\d.]*-minimal$/ && &$is_dep_field($field)
&& $pkg !~ /^python[\d.]*-minimal$/);
- tag 'doc-package-depends-on-main-package', "$field"
+ tag 'doc-package-depends-on-main-package', $field
if ("$d_pkg-doc" eq $pkg && $field =~ /^(pre-)depends$/);
tag 'old-versioned-python-dependency', "$field: $part_d_orig"
@@ -650,7 +650,7 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
&& &$is_dep_field($field)
&& perl_core_has_version($d_pkg, $d_version->[0], $d_version->[1]);
- tag 'depends-exclusively-on-makedev', "$field",
+ tag 'depends-exclusively-on-makedev', $field,
if ($field eq 'depends' && $d_pkg eq 'makedev' && @alternatives == 1);
tag 'lib-recommends-documentation', "$field: $part_d_orig"
@@ -661,7 +661,7 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
# default-jdk-doc must depend on openjdk-X-doc (or classpath-doc) to be
# useful; other packages should depend on default-jdk-doc if they
# want the Java Core API.
- tag 'depends-on-specific-java-doc-package', "$field"
+ tag 'depends-on-specific-java-doc-package', $field
if(&$is_dep_field($field) && $pkg ne 'default-jdk-doc'
&& ($d_pkg eq 'classpath-doc' || $d_pkg =~ m/openjdk-\d+-doc/o));
@@ -897,7 +897,7 @@ if (defined $info->field('python-version')) {
my @pyversion = split(/\s*,\s*/, $pyversion);
if (@pyversion > 2) {
if (grep { !/^\d+\.\d+$/ } @pyversion) {
- tag 'malformed-python-version', "$pyversion";
+ tag 'malformed-python-version', $pyversion;
}
} else {
my $okay = 0;
@@ -909,7 +909,7 @@ if (defined $info->field('python-version')) {
last;
}
}
- tag 'malformed-python-version', "$pyversion" unless $okay;
+ tag 'malformed-python-version', $pyversion unless $okay;
}
}
@@ -921,7 +921,7 @@ if (defined $info->field('dm-upload-allowed')) {
unfold('dm-upload-allowed', \$dmupload);
unless ($dmupload eq 'yes') {
- tag 'malformed-dm-upload-allowed', "$dmupload";
+ tag 'malformed-dm-upload-allowed', $dmupload;
}
}
@@ -955,16 +955,16 @@ for my $field (readdir FIELDS) {
next if ($field eq 'original-maintainer') and $version =~ /ubuntu/;
- tag 'obsolete-field', "$field"
+ tag 'obsolete-field', $field
if $known_obsolete_fields{$field};
- tag 'unknown-field-in-dsc', "$field"
+ tag 'unknown-field-in-dsc', $field
if ($type eq 'source' && ! $SOURCE_FIELDS->known($field) && ! $known_obsolete_fields{$field});
- tag 'unknown-field-in-control', "$field"
+ tag 'unknown-field-in-control', $field
if ($type eq 'binary' && ! $known_binary_fields{$field} && ! $known_obsolete_fields{$field});
- tag 'unknown-field-in-control', "$field"
+ tag 'unknown-field-in-control', $field
if ($type eq 'udeb' && ! $known_udeb_fields{$field} && ! $known_obsolete_fields{$field});
}
closedir(FIELDS);
@@ -1028,7 +1028,7 @@ sub unfold {
$$line =~ s/\n$//;
if ($$line =~ s/\n//g) {
- tag 'multiline-field', "$field";
+ tag 'multiline-field', $field;
}
}
diff --git a/checks/infofiles b/checks/infofiles
index 872a74b..3691019 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -64,10 +64,10 @@ foreach my $file (@{$info->sorted_index}) {
if ($ext eq "gz") { # ok!
if ($index_info->{type} =~ m,^[-h],o) { # compressed with maximum compression rate?
if ($file_info !~ m/gzip compressed data/o) {
- tag "info-document-not-compressed-with-gzip", "$file";
+ tag "info-document-not-compressed-with-gzip", $file;
} else {
if ($file_info !~ m/max compression/o) {
- tag "info-document-not-compressed-with-max-compression", "$file";
+ tag "info-document-not-compressed-with-max-compression", $file;
}
}
}
@@ -75,12 +75,12 @@ foreach my $file (@{$info->sorted_index}) {
next;
} else {
push (@fname_pieces, $ext);
- tag "info-document-not-compressed", "$file";
+ tag "info-document-not-compressed", $file;
}
my $infoext = pop @fname_pieces;
unless ($infoext && $infoext =~ /^info(-\d+)?$/) { # it's not foo.info
unless (!@fname_pieces) { # it's not foo{,-{1,2,3,...}}
- tag "info-document-has-wrong-extension", "$file";
+ tag "info-document-has-wrong-extension", $file;
}
}
diff --git a/checks/init.d b/checks/init.d
index 6a45031..47082f6 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -86,7 +86,7 @@ if (open(IN, '<', $postinst)) {
my ($name,$opt) = ($1,$2);
next if $opt eq 'remove';
if ($initd_postinst{$name}++ == 1) {
- tag "duplicate-updaterc.d-calls-in-postinst", "$name";
+ tag "duplicate-updaterc.d-calls-in-postinst", $name;
next;
}
unless (m,>\s*/dev/null,o) {
@@ -104,7 +104,7 @@ if (open(IN, '<', $preinst)) {
next unless m/update-rc\.d\s+(?:$opts_r)*($name_r)\s+($action_r)/o;
my ($name,$opt) = ($1,$2);
next if $opt eq 'remove';
- tag "preinst-calls-updaterc.d", "$name";
+ tag "preinst-calls-updaterc.d", $name;
}
close(IN);
}
@@ -116,7 +116,7 @@ if (open(IN, '<', $postrm)) {
s/\#.*$//o;
next unless m/update-rc\.d\s+($opts_r)*($name_r)/o;
if ($initd_postrm{$2}++ == 1) {
- tag "duplicate-updaterc.d-calls-in-postrm", "$2";
+ tag "duplicate-updaterc.d-calls-in-postrm", $2;
next;
}
unless (m,>\s*/dev/null,o) {
@@ -132,7 +132,7 @@ if (open(IN, '<', $prerm)) {
next if /$exclude_r/o;
s/\#.*$//o;
next unless m/update-rc\.d\s+($opts_r)*($name_r)/o;
- tag "prerm-calls-updaterc.d", "$2";
+ tag "prerm-calls-updaterc.d", $2;
}
close(IN);
}
@@ -157,7 +157,7 @@ if (open(IN, '<', $conffiles)) {
$conffiles{$_} = 1;
if (m,^/?etc/rc.\.d,o) {
- tag "file-in-etc-rc.d-marked-as-conffile", "$_";
+ tag "file-in-etc-rc.d-marked-as-conffile", $_;
}
}
close(IN);
@@ -411,7 +411,7 @@ sub check_init {
"$dependency -> $implied_dependencies{$dependency}";
} elsif ($keyword =~ m/^required-/ && $dependency =~ m/^\$/) {
tag "init.d-script-depends-on-unknown-virtual-facility",
- "etc/init.d/$_", "$dependency"
+ "etc/init.d/$_", $dependency
unless ($VIRTUAL_FACILITIES->known($dependency));
}
}
diff --git a/checks/manpages b/checks/manpages
index c459aa8..45933db 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -70,7 +70,7 @@ foreach my $file (@{$info->sorted_index}) {
}
if (($path =~ m,usr/(share|X11R6)/man/$,) and ($fname ne "")) {
- tag "manpage-in-wrong-directory", "$file";
+ tag "manpage-in-wrong-directory", $file;
next;
}
@@ -82,7 +82,7 @@ foreach my $file (@{$info->sorted_index}) {
my $t = $1;
if (not $t =~ m,^.*man(\d)/$,o) {
- tag "manpage-in-wrong-directory", "$file";
+ tag "manpage-in-wrong-directory", $file;
next;
}
my ($section,$name) = ($1,$fname);
@@ -93,19 +93,19 @@ foreach my $file (@{$info->sorted_index}) {
# it's one of the known cases where the language is significantly
# different between countries.
if ($lang =~ /_/ && $lang !~ /^(pt_BR|zh_[A-Z][A-Z])$/) {
- tag "manpage-locale-dir-country-specific", "$file";
+ tag "manpage-locale-dir-country-specific", $file;
}
my @pieces = split(/\./, $name);
my $ext = pop @pieces;
if ($ext ne 'gz') {
push @pieces, $ext;
- tag "manpage-not-compressed", "$file";
+ tag "manpage-not-compressed", $file;
} elsif ($perm =~ m,^[-h],o) { # so it's .gz... files first; links later
if ($file_info !~ m/gzip compressed data/o) {
- tag "manpage-not-compressed-with-gzip", "$file";
+ tag "manpage-not-compressed-with-gzip", $file;
} elsif ($file_info !~ m/max compression/o) {
- tag "manpage-not-compressed-with-max-compression", "$file";
+ tag "manpage-not-compressed-with-max-compression", $file;
}
}
my $fn_section = pop @pieces;
@@ -117,15 +117,15 @@ foreach my $file (@{$info->sorted_index}) {
# number of directory and manpage extension equal?
if ($section_num != $section) {
- tag "manpage-in-wrong-directory", "$file";
+ tag "manpage-in-wrong-directory", $file;
}
} else {
- tag "manpage-has-wrong-extension", "$file";
+ tag "manpage-has-wrong-extension", $file;
}
# special check for manual pages for X11 games
if ($path =~ m,^usr/X11R6/man/man6/,o) {
- tag "x11-games-should-be-in-usr-games", "$file";
+ tag "x11-games-should-be-in-usr-games", $file;
}
# check symbolic links to other manual pages
@@ -144,9 +144,9 @@ foreach my $file (@{$info->sorted_index}) {
($link =~ m,^\.\./\.\./man/man[237]/undocumented\.[237]\.gz$,o) or
($link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o) or
($link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o)) {
- tag "link-to-undocumented-manpage", "$file";
+ tag "link-to-undocumented-manpage", $file;
} else {
- tag "bad-link-to-undocumented-manpage", "$file";
+ tag "bad-link-to-undocumented-manpage", $file;
}
} else {
# undocumented link in /usr/X11R6/man -- possibilities:
@@ -154,9 +154,9 @@ foreach my $file (@{$info->sorted_index}) {
# ../../../../usr/share/man/man?/undocumented...
if (($link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o) or
($link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o)) {
- tag "link-to-undocumented-manpage", "$file";
+ tag "link-to-undocumented-manpage", $file;
} else {
- tag "bad-link-to-undocumented-manpage", "$file";
+ tag "bad-link-to-undocumented-manpage", $file;
}
}
}
@@ -174,7 +174,7 @@ foreach my $file (@{$info->sorted_index}) {
} while ($first =~ /^\.\\"/ && $manfile[$i]); #");
unless ($first) {
- tag "empty-manual-page", "$file";
+ tag "empty-manual-page", $file;
} elsif ($first =~ /^\.so\s+(.+)?$/) {
my $dest = $1;
if ($dest =~ m,^([^/]+)/(.+)$,) {
@@ -185,14 +185,14 @@ foreach my $file (@{$info->sorted_index}) {
if ($rest =~ m,^([^/]+)/(.+)$,) {
my ($lang, $rest) = ($1, $2);
if ($rest !~ m,^[^/]+\.\d(?:\S+)?(?:\.gz)?$,) {
- tag "bad-so-link-within-manual-page", "$file";
+ tag "bad-so-link-within-manual-page", $file;
}
} else {
- tag "bad-so-link-within-manual-page", "$file";
+ tag "bad-so-link-within-manual-page", $file;
}
}
} else {
- tag "bad-so-link-within-manual-page", "$file";
+ tag "bad-so-link-within-manual-page", $file;
}
next;
}
@@ -222,13 +222,13 @@ foreach my $file (@{$info->sorted_index}) {
my $desc = <LEXGROG>;
$desc =~ s/^[^:]+: \"(.*)\"$/$1/;
if ($desc =~ /(\S+)\s+-\s+manual page for \1/i) {
- tag "manpage-has-useless-whatis-entry", "$file";
+ tag "manpage-has-useless-whatis-entry", $file;
} elsif ($desc =~ /(\S+)\s+-\s+programs? to do something/i) {
- tag "manpage-is-dh_make-template", "$file";
+ tag "manpage-is-dh_make-template", $file;
}
1 while <LEXGROG>;
close LEXGROG;
- tag "manpage-has-bad-whatis-entry", "$file" if $? != 0;
+ tag "manpage-has-bad-whatis-entry", $file if $? != 0;
}
# If it's not a .so link, run it through "man" to check for errors.
@@ -273,7 +273,7 @@ foreach my $file (@{$info->sorted_index}) {
next if /warning: (?:macro )?\`(Tr|IX)\' not defined/;
chomp;
s/^[^:]+://o;
- tag "manpage-has-errors-from-man", "$file", "$_";
+ tag "manpage-has-errors-from-man", $file, $_;
last;
}
close(MANERRS);
diff --git a/checks/md5sums b/checks/md5sums
index 7dc6572..e33477b 100644
--- a/checks/md5sums
+++ b/checks/md5sums
@@ -104,15 +104,15 @@ close(C);
for my $file (keys %control_entry) {
if (not exists $info_entry{$file}) {
- tag "md5sums-lists-nonexisting-file", "$file";
+ tag "md5sums-lists-nonexisting-file", $file;
} elsif ($info_entry{$file} ne $control_entry{$file}) {
- tag "md5sum-mismatch", "$file";
+ tag "md5sum-mismatch", $file;
}
delete $info_entry{$file};
}
for my $file (keys %info_entry) {
- tag "file-missing-in-md5sums", "$file"
+ tag "file-missing-in-md5sums", $file
unless ($conffile{$file} || $file =~ m%^var/lib/[ai]spell/.%);
}
diff --git a/checks/menu-format b/checks/menu-format
index 60ca96a..b54c8c9 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -400,7 +400,7 @@ foreach my $file (@{$info->sorted_index}) {
my $index_info = $info->index->{$file};
my $operm = $index_info->{operm};
- tag 'deprecated-kdelnk-file', "$file" if ($file =~ m,\.kdelnk$,);
+ tag 'deprecated-kdelnk-file', $file if ($file =~ m,\.kdelnk$,);
if ($index_info->{type} =~ m/[-h]/ &&
$file =~ m,^usr/share/applications/.*\.desktop$,) {
@@ -694,7 +694,7 @@ sub VerifyIcon {
}
if (not ($icon =~ m/\.xpm$/i)) {
- tag "menu-icon-not-in-xpm-format", "$icon";
+ tag "menu-icon-not-in-xpm-format", $icon;
return;
}
@@ -705,7 +705,7 @@ sub VerifyIcon {
}
if (! open (IN, '<', $iconfile)) {
- tag "menu-icon-missing", "$icon";
+ tag "menu-icon-missing", $icon;
return;
}
@@ -838,7 +838,7 @@ sub VerifyDesktopFile {
}
}
unless ($saw_main) {
- tag "desktop-entry-lacks-main-category", "$file";
+ tag "desktop-entry-lacks-main-category", $file;
}
}
@@ -849,7 +849,7 @@ sub VerifyDesktopFile {
if (defined $vals{OnlyShowIn} and not $in_reserved) {
my @envs = split (';', $vals{OnlyShowIn});
if (@envs > 1) {
- tag 'desktop-entry-limited-to-environments', "$file";
+ tag 'desktop-entry-limited-to-environments', $file;
}
}
}
diff --git a/checks/menus b/checks/menus
index 87a0b8d..5887399 100644
--- a/checks/menus
+++ b/checks/menus
@@ -142,7 +142,7 @@ for my $file (@{$info->sorted_index}) {
}
}
close MM;
- tag "menu-method-should-include-menu-h", "$file"
+ tag "menu-method-should-include-menu-h", $file
unless $menumethod_includes_menu_h or $pkg eq 'menu';
}
# package doc dir?
@@ -223,10 +223,10 @@ if ($anymenu_file) {
# debhelper apparently currently still adds that to the maintainer script,
# so don't warn if it's done.
if (not $postinst{'calls-updatemenus'}) {
- tag "postinst-does-not-call-updatemenus", "$anymenu_file";
+ tag "postinst-does-not-call-updatemenus", $anymenu_file;
}
if ($menumethod_file and not $postrm{'calls-updatemenus'}) {
- tag "postrm-does-not-call-updatemenus", "$menumethod_file"
+ tag "postrm-does-not-call-updatemenus", $menumethod_file
unless $pkg eq 'menu';
}
} else {
@@ -331,9 +331,9 @@ sub check_doc_base_field {
my ($pkg, $dbfile, $line, $field, $vals, $sawfields, $sawformats,
$knownfields, $all_files, $all_links) = @_;
- tag "doc-base-file-unknown-field", "$dbfile:$line", "$field"
+ tag "doc-base-file-unknown-field", "$dbfile:$line", $field
unless defined $knownfields->{$field};
- tag "doc-base-file-duplicated-field", "$dbfile:$line", "$field"
+ tag "doc-base-file-duplicated-field", "$dbfile:$line", $field
if $sawfields->{$field};
$sawfields->{$field} = 1;
@@ -398,7 +398,7 @@ sub check_doc_base_field {
} elsif ($field eq 'document') {
$_ = join (' ', @$vals);
- tag "doc-base-invalid-document-field", "$dbfile:$line", "$_"
+ tag 'doc-base-invalid-document-field', "$dbfile:$line", $_
unless /^[a-z0-9+.-]+$/;
tag "doc-base-document-field-ends-in-whitespace", "$dbfile:$line"
if /[ \t]$/;
@@ -501,7 +501,7 @@ sub check_doc_base_file_section {
&& !$sawfields->{'index'});
}
for my $field (sort keys %$knownfields) {
- tag "doc-base-file-lacks-required-field", "$dbfile:$line", "$field"
+ tag 'doc-base-file-lacks-required-field', "$dbfile:$line", $field
if ($knownfields->{$field} == 1 && !$sawfields->{$field});
}
}
@@ -694,7 +694,7 @@ sub check_script {
}
# checked first?
if (not $pres->{'checks-for-installdocs'}) {
- tag "maintainer-script-does-not-check-for-existence-of-installdocs", "$script" unless $no_check_installdocs++;
+ tag "maintainer-script-does-not-check-for-existence-of-installdocs", $script unless $no_check_installdocs++;
}
}
}
diff --git a/checks/nmu b/checks/nmu
index 602f50f..1d4dc5c 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -108,24 +108,24 @@ if ($version =~ /$UBUNTU_REGEX/ or $distribution =~ /$UBUNTU_REGEX/) {
if ($maintainer =~ /packages\@qa.debian.org/) {
tag "orphaned-package-should-not-have-uploaders", ""
if defined $uploaders;
- tag "qa-upload-has-incorrect-version-number", "$version"
+ tag "qa-upload-has-incorrect-version-number", $version
if $version_nmuness == 1;
tag "changelog-should-mention-qa", ""
if !$changelog_mentions_qa;
} elsif ($changelog_mentions_team_upload) {
- tag "team-upload-has-incorrect-version-number", "$version"
+ tag "team-upload-has-incorrect-version-number", $version
if $version_nmuness == 1;
} else {
# Local packages may be either NMUs or not.
unless ($changelog_mentions_local || $version_local) {
tag "changelog-should-mention-nmu", ""
if !$changelog_mentions_nmu && $upload_is_nmu;
- tag "source-nmu-has-incorrect-version-number", "$version"
+ tag "source-nmu-has-incorrect-version-number", $version
if $upload_is_nmu && $version_nmuness != 1;
}
tag "changelog-should-not-mention-nmu", ""
if $changelog_mentions_nmu && !$upload_is_nmu;
- tag "maintainer-upload-has-incorrect-version-number", "$version"
+ tag "maintainer-upload-has-incorrect-version-number", $version
if !$upload_is_nmu && $version_nmuness;
}
diff --git a/checks/patch-systems b/checks/patch-systems
index 73337e9..082ad22 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -67,7 +67,7 @@ sub run {
}
foreach my $listfile (glob("debfiles/patches/00list*")) {
my @patches;
- if (open(IN, '<', "$listfile")) {
+ if (open(IN, '<', $listfile)) {
while(<IN>) {
chomp;
next if (/^\#/); #ignore comments or CPP directive
diff --git a/checks/po-debconf b/checks/po-debconf
index 902c4ee..efd4504 100644
--- a/checks/po-debconf
+++ b/checks/po-debconf
@@ -109,7 +109,7 @@ if (!$yada && -f "debfiles/po/POTFILES.in") {
# Cannot check files which are not under debian/
next if m,^\.\./, or $_ eq '';
unless (-f "debfiles/$_") {
- tag "missing-file-from-potfiles-in", "$_";
+ tag "missing-file-from-potfiles-in", $_;
$missing_files = 1;
}
}
diff --git a/checks/scripts b/checks/scripts
index a6e71b1..f4ae9b9 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -644,7 +644,7 @@ while (<SCRIPTS>) {
}
# now scan the file contents themselves
- open (C, '<', "$filename")
+ open (C, '<', $filename)
or fail("cannot open maintainer script $filename for reading: $!");
my %warned;
@@ -908,7 +908,7 @@ while (<SCRIPTS>) {
}
}
if (m,\bsuidregister\b,) {
- tag "suidregister-used-in-maintainer-script", "$file";
+ tag "suidregister-used-in-maintainer-script", $file;
}
if ($file eq 'postrm') {
if (m,update\-alternatives \-\-remove,) {
@@ -924,7 +924,7 @@ while (<SCRIPTS>) {
unless ($info->relation('strong')->implies($package)) {
my $shortpackage = $package;
$shortpackage =~ s/[ \(].*//;
- tag "maintainer-script-needs-depends-on-$shortpackage", "$file";
+ tag "maintainer-script-needs-depends-on-$shortpackage", $file;
$warned{$package} = 1;
}
}
@@ -941,7 +941,7 @@ while (<SCRIPTS>) {
tag 'install-info-used-in-maintainer-script', "$file:$.";
}
if (m,/var/lib/dpkg/status\b, && $pkg ne 'base-files' && $pkg ne 'dpkg') {
- tag "maintainer-script-uses-dpkg-status-directly", "$file";
+ tag "maintainer-script-uses-dpkg-status-directly", $file;
}
if (m,$LEADIN(?:/usr/sbin/)?dpkg-divert\s, && ! /--(?:help|list|truename|version)/) {
if (/--local/ or !/--package/) {
diff --git a/checks/shared-libs b/checks/shared-libs
index 6fb812d..4e42873 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -102,12 +102,12 @@ for my $cur_file (@{$info->sorted_index}) {
# Now that we're sure this is really a shared library, report on
# non-PIC problems.
if ($cur_file eq $real_file and $objdump->{$cur_file}->{TEXTREL}) {
- tag "shlib-with-non-pic-code", "$cur_file";
+ tag "shlib-with-non-pic-code", $cur_file;
}
my @symbol_names = map { @{$_}[2] } @{$objdump->{$cur_file}->{SYMBOLS}};
if (grep /^_?exit$/, @symbol_names and !grep $_ eq 'fork', @symbol_names) {
- tag "shlib-calls-exit", "$cur_file";
+ tag "shlib-calls-exit", $cur_file;
}
# Don't apply the permission checks to links since this only results
@@ -159,7 +159,7 @@ for my $cur_file (@{$info->sorted_index}) {
} elsif (exists $objdump->{$cur_file}->{OTHER_DATA}
&& $ldconfig_dirs->known(dirname($cur_file))
&& exists $sharedobject{$cur_file}) {
- tag "sharedobject-in-library-directory-missing-soname", "$cur_file";
+ tag "sharedobject-in-library-directory-missing-soname", $cur_file;
} elsif ($cur_file =~ m/\.la$/ and not defined($cur_file_data->{link})) {
local $_;
open(LAFILE, "< unpacked/$cur_file")
@@ -292,7 +292,7 @@ if ($#shlibs == -1) {
for my $shlib (@shlibs) {
# skip it if it's not a public shared library
next unless $ldconfig_dirs->known(dirname($shlib));
- tag "no-shlibs-control-file", "$shlib";
+ tag "no-shlibs-control-file", $shlib;
}
}
} else {
@@ -368,7 +368,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
for my $shlib (@shlibs, keys %unversioned_shlibs) {
# skip it if it's not a public shared library
next unless $ldconfig_dirs->known(dirname($shlib));
- tag "no-symbols-control-file", "$shlib";
+ tag "no-symbols-control-file", $shlib;
}
}
} elsif (open(IN, '<', 'control/symbols')) {
@@ -572,7 +572,7 @@ if ($type eq 'udeb') {
} else {
tag "postinst-has-useless-call-to-ldconfig", ""
if $we_call_postinst and not $must_call_ldconfig;
- tag "postinst-must-call-ldconfig", "$must_call_ldconfig"
+ tag "postinst-must-call-ldconfig", $must_call_ldconfig
if not $we_call_postinst and $must_call_ldconfig;
}
@@ -591,7 +591,7 @@ if (-f 'control/postrm') {
tag "postrm-has-useless-call-to-ldconfig", ""
unless $must_call_ldconfig;
} else {
- tag "postrm-should-call-ldconfig", "$must_call_ldconfig"
+ tag "postrm-should-call-ldconfig", $must_call_ldconfig
if $must_call_ldconfig;
}
diff --git a/collection/source-control-file b/collection/source-control-file
index eced0b2..b71d3bc 100755
--- a/collection/source-control-file
+++ b/collection/source-control-file
@@ -49,7 +49,7 @@ foreach (@control_data) {
$field =~ s,/,:,g;
my $field_file = "control/$pkg_name/$field";
- open (F, '>', "$field_file")
+ open (F, '>', $field_file)
or fail("cannot open file $field_file for writing: $!");
print F $value,"\n";
close F or fail("cannot write control/$pkg_name/$field: $!");
diff --git a/frontend/lintian b/frontend/lintian
index 7030066..23f6d78 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1481,7 +1481,7 @@ foreach my $pkg_info ($schedule->get_all) {
}
# if the package's basedir was not removed then run the
# auto-remove: yes collection scripts
- if (-d "$base") {
+ if (-d $base) {
chdir($base);
for my $coll (keys %collection_info) {
my $ci = $collection_info{$coll};
diff --git a/lib/Lab.pm b/lib/Lab.pm
index f2654d4..d7142b2 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -62,7 +62,7 @@ sub setup {
$self->{dir} = $dir;
$self->{dist} = $dist;
- if (-d "$dir" && ! -d "$dir/changes") {
+ if (-d $dir && ! -d "$dir/changes") {
mkdir("$dir/changes", 0777)
or fail("cannot create lab directory $dir/changes");
}
diff --git a/lib/Text_utils.pm b/lib/Text_utils.pm
index 1121edf..b4e4f06 100644
--- a/lib/Text_utils.pm
+++ b/lib/Text_utils.pm
@@ -137,7 +137,7 @@ sub dtml_to_html {
push(@o,'<pre>');
$pre=1;
}
- push(@o,"$_");
+ push(@o,$_);
}
# normal line
else {
diff --git a/lib/Util.pm b/lib/Util.pm
index 1a019fa..e6b48b0 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -306,7 +306,7 @@ sub fail {
if (@_) {
$str = string('internal error', @_);
} elsif ($!) {
- $str = string('internal error', "$!");
+ $str = string('internal error', $!);
} else {
$str = string('internal error');
}
diff --git a/unpack/unpack-binpkg-l1 b/unpack/unpack-binpkg-l1
index 2ee32e6..589c0c4 100755
--- a/unpack/unpack-binpkg-l1
+++ b/unpack/unpack-binpkg-l1
@@ -43,7 +43,7 @@ my (@jobs, $job);
# create directory in lab
print "N: Creating directory $base_dir ...\n" if $verbose;
-mkdir("$base_dir", 0777) or fail("mkdir $base_dir: $!");
+mkdir($base_dir, 0777) or fail("mkdir $base_dir: $!");
mkdir("$base_dir/control", 0777) or fail("mkdir $base_dir/control: $!");
mkdir("$base_dir/fields", 0777) or fail("mkdir $base_dir/fields: $!");
symlink($file,"$base_dir/deb") or fail("symlink: $!");
diff --git a/unpack/unpack-changes-l1 b/unpack/unpack-changes-l1
index 675e038..ed1fae8 100755
--- a/unpack/unpack-changes-l1
+++ b/unpack/unpack-changes-l1
@@ -44,7 +44,7 @@ my $data = get_dsc_info($file);
# create directory in lab
print "N: Creating directory $base_dir ...\n" if $verbose;
-mkdir("$base_dir", 0777) or fail("mkdir $base_dir: $!");
+mkdir($base_dir, 0777) or fail("mkdir $base_dir: $!");
mkdir("$base_dir/fields", 0777) or fail("mkdir $base_dir/fields: $!");
# create control field files
diff --git a/unpack/unpack-srcpkg-l1 b/unpack/unpack-srcpkg-l1
index d3618bd..8e9e37a 100755
--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -48,7 +48,7 @@ my $data = get_dsc_info($file);
# create directory in lab
print "N: Creating directory $base_dir ...\n" if $verbose;
-mkdir("$base_dir", 0777) or fail("mkdir $base_dir: $!");
+mkdir($base_dir, 0777) or fail("mkdir $base_dir: $!");
mkdir("$base_dir/fields", 0777) or fail("mkdir $base_dir/fields: $!");
# create control field files
--
Debian package checker
Reply to: