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 | |
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
-rw-r--r-- | urpm.pm | 11 | ||||
-rwxr-xr-x | urpmi | 20 | ||||
-rw-r--r-- | urpmi.spec | 8 |
3 files changed, 17 insertions, 22 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}); @@ -202,11 +202,6 @@ while (defined($_ = shift @ARGV)) { } $src = 0; #- reset switch for next package. } -#- get back activated default values of boolean options. -foreach (qw(post-clean use-provides verify-rpm)) { - exists $urpm->{options}{$_} or $urpm->{options}{$_} = 1; -} - #- use install_src to promote all names as src package. if ($install_src) { @files and $urpm->{fatal}(1, _("What can be done with binary rpm files when using --install-src")); @@ -305,17 +300,10 @@ $urpm->configure(nocheck_access => $env || $uid > 0, bug => $bug, parallel => $parallel, ); -#- handle options directly here according to values in configuration file. -foreach (keys %{$urpm->{options} || {}}) { - my $v = $urpm->{options}{$_}; - /^(no-)?verify-rpm$/ and do { - unless (defined $verify_rpm) { - $verify_rpm = defined $v && $v =~ /^(yes|on)$/i; $1 and $verify_rpm = ! $verify_rpm; - } next }; - $urpm->{error}(_("ignoring option \"%s\" not used", $_ )); +#- get back activated default values of boolean options. +foreach (qw(post-clean use-provides verify-rpm)) { + exists $urpm->{options}{$_} or $urpm->{options}{$_} = 1; } -#- get default, this should be reworked to be more useable internally TODO. -defined $verify_rpm or $verify_rpm = 1; my $state = {}; my %requested = $urpm->register_rpms(@files, @src_files); @@ -527,7 +515,7 @@ my %sources = $urpm->download_source_packages($local_sources, $list, }); my %sources_install = %{$urpm->extract_packages_to_install(\%sources) || {}}; -if ($verify_rpm) { +if ($urpm->{options}{'verify-rpm'}) { my @invalid_sources; foreach (values %sources_install, values %sources) { @@ -2,7 +2,7 @@ Name: urpmi Version: 4.2 -Release: 14mdk +Release: 15mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -205,6 +205,12 @@ fi %changelog +* Tue Jan 28 2003 François Pons <fpons@mandrakesoft.com> 4.2-15mdk +- fixed verify-rpm (both in urpmi.cfg or command line). +- fixed default options activated. +- fixed error message about unknown options use-provides and + post-clean. + * Mon Jan 27 2003 François Pons <fpons@mandrakesoft.com> 4.2-14mdk - added more global options to urpmi.cfg: verify-rpm, fuzzy, allow-force, allow-nodeps, pre-clean, post-clean, limit-rate, |