diff options
author | Francois Pons <fpons@mandriva.com> | 2003-01-28 09:46:21 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-01-28 09:46:21 +0000 |
commit | f91572f1c34b6cd6bbd83b1f799891ac655021f0 (patch) | |
tree | fca60c1f12d6bbfb284d2a08d6b9c44d35c123d9 /urpm.pm | |
parent | 5bb188d99416f16b21a34f706a410eaff4a994b3 (diff) | |
download | urpmi-f91572f1c34b6cd6bbd83b1f799891ac655021f0.tar urpmi-f91572f1c34b6cd6bbd83b1f799891ac655021f0.tar.gz urpmi-f91572f1c34b6cd6bbd83b1f799891ac655021f0.tar.bz2 urpmi-f91572f1c34b6cd6bbd83b1f799891ac655021f0.tar.xz urpmi-f91572f1c34b6cd6bbd83b1f799891ac655021f0.zip |
4.2-15mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -472,13 +472,14 @@ sub read_config { chomp; s/#.*$//; s/^\s*//; s/\s*$//; $_ eq '}' and last; #- check for boolean variables first, and after that valued variables. - if (my ($no, $k, $v) = /^(no-)?(verify-rpm|fuzzy|allow-(?:force|nodeps)|(?:pre|post)-clean)(?:\s*:\s*(.*))?$/) { + my ($no, $k, $v); + if (($no, $k, $v) = /^(no-)?(verify-rpm|fuzzy|allow-(?:force|nodeps)|(?:pre|post)-clean)(?:\s*:\s*(.*))?$/) { unless (exists $urpm->{options}{$k}) { - $urpm->{options}{$k} = $v eq '' || $v =~ /^(yes|on|1)$/i; - $no and $urpm->{options}{$k} = ! $urpm->{options}{$k}; + $urpm->{options}{$k} = $v eq '' || $v =~ /^(yes|on|1)$/i || 0; + $no and $urpm->{options}{$k} = ! $urpm->{options}{$k} || 0; } next; - } elsif (my ($k, $v) = /^(limit-rate|excludepath)\s*:\s*(.*)$/) { + } elsif (($k, $v) = /^(limit-rate|excludepath)\s*:\s*(.*)$/) { unless (exists $urpm->{options}{$k}) { $v =~ /^'([^']*)'$/ and $v = $1; $v =~ /^"([^"]*)"$/ and $v = $1; $urpm->{options}{$k} = $v; @@ -689,7 +690,7 @@ sub write_config { while (my ($k,$v) = each %{$urpm->{options}}) { printf F " %s: %s\n", $k, $v; } - printf F "}\n"; + printf F "}\n\n"; } foreach my $medium (@{$urpm->{media}}) { printf F "%s %s {\n", quotespace($medium->{name}), quotespace($medium->{clear_url}); |