aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-13 19:38:16 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-13 19:38:16 +0000
commitc1cb28cc49b19d5815f2e457bdfece02cd7ddc3e (patch)
tree32231dcdb4d88f7b7d3154863a144d0720cd6bdb
parenta118bfc881102e750e29cd76822fd7a9b518d99c (diff)
downloadrpmdrake-c1cb28cc49b19d5815f2e457bdfece02cd7ddc3e.tar
rpmdrake-c1cb28cc49b19d5815f2e457bdfece02cd7ddc3e.tar.gz
rpmdrake-c1cb28cc49b19d5815f2e457bdfece02cd7ddc3e.tar.bz2
rpmdrake-c1cb28cc49b19d5815f2e457bdfece02cd7ddc3e.tar.xz
rpmdrake-c1cb28cc49b19d5815f2e457bdfece02cd7ddc3e.zip
dereferencing array ref in strict mode when these refs can be undefined is
asking for trouble
-rwxr-xr-xrpmdrake6
1 files changed, 4 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index e29fcfb3..11f548ac 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -279,7 +279,8 @@ sub extract_header {
sub db {
my ($force) = @_;
- if (my (undef, $host) = @{$options{parallel}}) {
+ my $host;
+ if ($options{parallel} and (undef, $host) = @{$options{parallel}}) {
my $done if 0;
my $dblocation = "/var/cache/urpmi/distantdb/$host";
if (!$done || $force) {
@@ -1289,7 +1290,8 @@ sub get_installed_pkgs {
});
remove_wait_msg($wait);
my $urpm = urpm->new;
- if (my ($group) = @{$options{parallel}}) {
+ my $group;
+ if ($options{parallel} and ($group) = @{$options{parallel}}) {
$urpm->configure(parallel => $group);
}
($urpm, \%installed_pkgs);