summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 18:04:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 18:04:39 +0000
commit07ef1cb49605b7d2df578a79f5eee812f87a7062 (patch)
treef9bd0409fa11aaa14627a413237d0696b8754be1 /perl-install
parent5a7014d19c1843b37e135e34ab3e973b706de07e (diff)
downloaddrakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.gz
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.bz2
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.xz
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.zip
make perl_checker happy
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_steps_interactive.pm2
-rwxr-xr-xperl-install/scanner.pm9
-rwxr-xr-xperl-install/standalone/scannerdrake6
4 files changed, 11 insertions, 10 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index a699a5ebd..af3a40040 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -426,7 +426,7 @@ sub main {
$o->{method} ||= "cdrom";
$o->{mkbootdisk} = 0;
}
- unless ($::testing || $::live) {
+ if (!$::testing && !$::live) {
symlink "rhimage", "/tmp/image"; #- for compatibility with old stage1
unlink $_ foreach "/modules/modules.mar", "/sbin/stage1";
}
@@ -516,7 +516,7 @@ sub main {
} modules::probe_category('multimedia/sound');
#- needed very early for install_steps_gtk
- eval { $o->{mouse} = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
+ eval { $o->{mouse} = mouse::detect() } if !$o->{nomouseprobe} && !$o->{mouse};
$o->{lang} = lang::set($o->{lang}) if $o->{lang} ne 'en_US'; #- mainly for defcfg
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 668a3fa06..798d6fcf5 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -642,7 +642,7 @@ sub chooseGroups {
#- do not try to deselect package (by default no groups are selected).
$o->{isUpgrade} or $unselect_all and install_any::unselectMostPackages($o);
#- if no group have been chosen, ask for using base system only, or no X, or normal.
- unless ($o->{isUpgrade} || grep { $val{$_} } keys %val) {
+ if (!$o->{isUpgrade} && !grep { $val{$_} } keys %val) {
my $docs = !$o->{excludedocs};
my $minimal = !grep { $_ } values %{$o->{compssUsersChoice}};
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 52d5bbed5..4daf2e1c4 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -27,6 +27,7 @@ package scanner;
use standalone;
use common;
use detect_devices;
+use log;
my $_sanedir = "$prefix/etc/sane.d";
@@ -35,7 +36,7 @@ $scannerDB = readScannerDB("$_scannerDBdir/ScannerDB");
sub confScanner {
my ($model, $port) = @_;
- $port = detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner" if (!$port);
+ $port = detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner" if !$port;
my $a = $scannerDB->{$model}{server};
#print "file:[$a]\t[$model]\t[$port]\n| ", (join "\n| ", @{$scannerDB->{$model}{lines}}),"\n";
output("$_sanedir/$a.conf", (join "\n",@{$scannerDB->{$model}{lines}}));
@@ -88,7 +89,7 @@ sub readScannerDB {
LINE => sub { push @{$card->{lines}}, $val },
NAME => sub {
#$cards{$card->{type}} = $card if ($card and !$card->{flags}{unsupported});
- $cards{$card->{type}} = $card if ($card);
+ $cards{$card->{type}} = $card if $card;
$val =~ s/Seiko\s+Epson/Epson/i;
$card = { type => $val };
},
@@ -127,7 +128,7 @@ sub updateScannerDBfromUsbtable {
print F "# generated from usbtable by scannerdrake\n";
foreach (cat_("$ENV{SHARE_PATH}/ldetect-lst/usbtable")) {
my ($vendor_id, $product_id, $mod, $name) = chomp_(split /\s/,$_,4);
- next unless ($mod eq "\"scanner\"");
+ next if $mod ne '"scanner"';
$name =~ s/\"(.*)\"$/$1/;
if (member($name, keys %$scanner::scannerDB)) {
print "#[$name] already in ScannerDB!\n";
@@ -186,7 +187,7 @@ sub updateScannerDBfromSane {
print "#[$name] already in ScannerDB!\n";
} else {
print Y "\nNAME $name\nSERVER $backend\nDRIVER $intf\n";
- print Y "COMMENT $comment\n" if ($comment);
+ print Y "COMMENT $comment\n" if $comment;
$comment = undef;
}
$name = $val;
diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake
index a1f94125e..da9fecb3e 100755
--- a/perl-install/standalone/scannerdrake
+++ b/perl-install/standalone/scannerdrake
@@ -26,7 +26,7 @@ use interactive;
use common;
use scanner;
-for (@ARGV) {
+foreach (@ARGV) {
/^--version$/ and die 'version: $Id$ '."\n";
/^--help$/ and die 'logdrake [--version] [--help] [--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable] [--dynamic=dev]';
/^--update-usbtable$/ and do { scanner::updateScannerDBfromUsbtable(); exit };
@@ -40,7 +40,7 @@ $in->do_pkgs->install('sane-backends', 'xsane', if_($in->do_pkgs->is_installed('
if ($::Manual) { manual(); quit() }
my $wait = $in->wait_message(N("Test ports"), N("Detecting devices ..."));
@f = scanner::detect();
-$wait=undef;
+$wait = undef;
(@f) ? auto() : manual();
quit();
@@ -81,7 +81,7 @@ sub dynamic {
$in->ask_warn('scannerdrake', N("The %s is not supported by this version of Mandrake Linux.", $name));
return;
}
- scanner::confScanner($name, $_->{port}) unless ($scanner::scannerDB->{$model}{flags}{unsupported});
+ scanner::confScanner($name, $_->{port}) unless $scanner::scannerDB->{$model}{flags}{unsupported};
}
}
}