use strict; use warnings;

Declare implicitly-global variables with 'my'.
Fix variable name discrepancies.
Remove unused variables.

svn path=/dists/trunk/linux-2.6/; revision=16224
This commit is contained in:
Ben Hutchings 2010-08-30 00:33:54 +00:00
parent b5d314c831
commit 66caf86b16
4 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,7 @@
#! /usr/bin/perl
#
#use strict; #for debugging
use strict;
use warnings;
use Cwd 'abs_path';
use Debconf::Client::ConfModule qw(:all);
use POSIX ();
@ -563,6 +564,7 @@ sub do_modules {
if ($ret) {
my $seen;
my $answer;
my $question;
$question = "${package_name}/postinst/depmod-error-initrd-$version";
($ret,$seen) = fset ("$question", 'seen', 'false');
@ -721,7 +723,7 @@ my @ramdisklist;
die "Failed to find suitable initramfs generation tool in $ramdisk\n"
if $#ramdisklist < 0;
my $success = 0;
for $ramdisk_cmd (@ramdisklist) {
for my $ramdisk_cmd (@ramdisklist) {
print STDERR "Running $ramdisk_cmd.\n";
print STDERR "Other valid candidates: @ramdisklist\n" if $#ramdisklist > 0;
@ -810,7 +812,7 @@ if (-d "/etc/kernel/postinst.d/$version") {
die "Failed to process /etc/kernel/postinst.d/$version";
}
if ($explicit_do_bootloader) {
if ($explicit_do_loader) {
my ($question, $ret, $seen);
$question = "${package_name}/postinst/ignoring-do-bootloader-$version";
($ret,$seen) = input('high', "$question");

View File

@ -1,6 +1,7 @@
#! /usr/bin/perl
#
#use strict; #for debugging
use strict;
use warnings;
use Cwd 'abs_path';
# Debconf may not be around here.

View File

@ -1,6 +1,7 @@
#! /usr/bin/perl
#
#use strict; #for debugging
use strict;
use warnings;
use Debconf::Client::ConfModule qw(:all);
version('2.0');

View File

@ -1,6 +1,7 @@
#! /usr/bin/perl
#
#use strict;
use strict;
use warnings;
use Debconf::Client::ConfModule qw(:all);
version('2.0');
my $capb=capb("backup");
@ -10,7 +11,7 @@ $|=1;
my $version = "=V";
my $link_in_boot = "";
my $no_symlink = "";
my $do_symlinks = "Yes"; # target machine defined
my $do_symlink = "Yes"; # target machine defined
my $do_boot_enable = "Yes"; # target machine defined
my $kimage = "=K";
my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
@ -56,7 +57,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$link_in_boot = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/i;
$do_boot_enable = '' if /do_boot_enable\s*=\s*(no|false|0)\s*$/i;
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
$warn_reboot = '' if /warn_reboot\s*=\s*(no|false|0)\s*$/i;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
$relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/i;
@ -68,7 +68,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$link_in_boot = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/i;
$do_boot_enable = "Yes" if /do_boot_enable\s*=\s*(yes|true|1)\s*$/i;
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
$warn_reboot = 'Yes' if /warn_reboot\s*=\s*(yes|true|1)\s*$/i;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
$relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/i;