summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-27 17:36:54 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-27 17:36:54 +0000
commit5bb188d99416f16b21a34f706a410eaff4a994b3 (patch)
treeea026dae8a176ce9ff0b7c60e34858b24e29bfae /urpm.pm
parentd61391b311f7c3c8ceaadb6f34dc6bd1e8d217d4 (diff)
downloadurpmi-5bb188d99416f16b21a34f706a410eaff4a994b3.tar
urpmi-5bb188d99416f16b21a34f706a410eaff4a994b3.tar.gz
urpmi-5bb188d99416f16b21a34f706a410eaff4a994b3.tar.bz2
urpmi-5bb188d99416f16b21a34f706a410eaff4a994b3.tar.xz
urpmi-5bb188d99416f16b21a34f706a410eaff4a994b3.zip
4.2-14mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 66f432e7..ff46799c 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -471,8 +471,19 @@ sub read_config {
while (<F>) {
chomp; s/#.*$//; s/^\s*//; s/\s*$//;
$_ eq '}' and last;
- /^(\S+)\s*:(.*)$/ and $urpm->{options}{$1} = $2, next;
- /^(\S+)$/ and $urpm->{options}{$1} = undef, next;
+ #- 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*(.*))?$/) {
+ unless (exists $urpm->{options}{$k}) {
+ $urpm->{options}{$k} = $v eq '' || $v =~ /^(yes|on|1)$/i;
+ $no and $urpm->{options}{$k} = ! $urpm->{options}{$k};
+ }
+ next;
+ } elsif (my ($k, $v) = /^(limit-rate|excludepath)\s*:\s*(.*)$/) {
+ unless (exists $urpm->{options}{$k}) {
+ $v =~ /^'([^']*)'$/ and $v = $1; $v =~ /^"([^"]*)"$/ and $v = $1;
+ $urpm->{options}{$k} = $v;
+ }
+ }
$_ and $urpm->{error}(_("syntax error in config file at line %s", $.));
}
next; };