diff options
author | Francois Pons <fpons@mandriva.com> | 2003-01-27 17:36:54 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-01-27 17:36:54 +0000 |
commit | 5bb188d99416f16b21a34f706a410eaff4a994b3 (patch) | |
tree | ea026dae8a176ce9ff0b7c60e34858b24e29bfae /urpm.pm | |
parent | d61391b311f7c3c8ceaadb6f34dc6bd1e8d217d4 (diff) | |
download | urpmi-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.pm | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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; }; |