aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-07 13:01:29 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-07 13:01:29 +0000
commit8e96124b8646d07b5b60f22340d97384b822b0e9 (patch)
treedbbc962b552152ad4d2ae4dce2bbdd2ad9e76446
parent1fad7f5afab8bf4f86e8e305cab938077db5d694 (diff)
downloadrpmdrake-8e96124b8646d07b5b60f22340d97384b822b0e9.tar
rpmdrake-8e96124b8646d07b5b60f22340d97384b822b0e9.tar.gz
rpmdrake-8e96124b8646d07b5b60f22340d97384b822b0e9.tar.bz2
rpmdrake-8e96124b8646d07b5b60f22340d97384b822b0e9.tar.xz
rpmdrake-8e96124b8646d07b5b60f22340d97384b822b0e9.zip
further fix parsing @ARGV
-rw-r--r--Rpmdrake/init.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm
index d1a5c290..6060ee60 100644
--- a/Rpmdrake/init.pm
+++ b/Rpmdrake/init.pm
@@ -95,14 +95,17 @@ if ($collation_locale) {
my $version = 1;
our %rpmdrake_options;
+
+my $i;
foreach (@ARGV) {
+ $i++;
/^-?-(\S+)$/ or next;
my $val = $1;
if ($val =~ /=/) {
my ($name, $values) = split /=/, $val;
my @values = split /,/, $values;
$rpmdrake_options{$name} = \@values if @values;
- shift @ARGV
+ splice @ARGV, $i-1, 1;
} else {
if ($val eq 'version') {
print "$0 $version\n";