summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-28 09:46:21 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-28 09:46:21 +0000
commitf91572f1c34b6cd6bbd83b1f799891ac655021f0 (patch)
treefca60c1f12d6bbfb284d2a08d6b9c44d35c123d9 /urpm.pm
parent5bb188d99416f16b21a34f706a410eaff4a994b3 (diff)
downloadurpmi-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.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/urpm.pm b/urpm.pm
index ff46799c..05849dfe 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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});