diff options
-rw-r--r-- | urpm.pm | 18 | ||||
-rwxr-xr-x | urpmi | 11 | ||||
-rw-r--r-- | urpmi.spec | 9 |
3 files changed, 27 insertions, 11 deletions
@@ -1069,16 +1069,24 @@ sub compute_closure { exists $packages->{$_} && ! ref $packages->{$_} and $follow_id = $_, last; $installed && exists $installed->{$_} and push @upgradable_choices, $_; } - unless ($follow_id) { + unless (defined $follow_id) { #- if there are at least one upgradable choice, use it instead #- of asking the user to chose among a list. if (@upgradable_choices == 1) { push @packages, $upgradable_choices[0]; } else { @upgradable_choices > 1 and @choices = @upgradable_choices; - $select_choices and push @packages, $select_choices->($urpm, @choices); - foreach (@choices) { - push @{$packages->{$_} ||= []}, \@choices; + #- propose the choice to the user now, or select the best one (as it is supposed to be). + my @selection = $select_choices ? ($select_choices->($urpm, $id, @choices)) : (); + if (@selection) { + foreach (@selection) { + unshift @packages, $_; + exists $packages->{$_} or $packages->{$_} = 1; + } + } else { + foreach (@choices) { + push @{$packages->{$_} ||= []}, \@choices; + } } } } @@ -1298,7 +1306,7 @@ sub filter_minimal_packages_to_upgrade { defined $id or next; #- propose the choice to the user now, or select the best one (as it is supposed to be). - my @selection = $select_choices ? ($select_choices->($urpm, @$id)) : ($id->[0]); + my @selection = $select_choices ? ($select_choices->($urpm, undef, @$id)) : ($id->[0]); foreach (@selection) { unshift @packages, $_; exists $packages->{$_} or $packages->{$_} = 1; @@ -93,7 +93,7 @@ for (@ARGV) { /q/ and do { $rpm_opt = "-U"; next }; /p/ and do { $use_provides = 1; next }; /v/ and do { $verbose = 1; next }; - die "urpmi: unknown option \"-$1\", check usage with --help\n"; } next }; + die _("urpmi: unknown option \"-%s\", check usage with --help\n", $1); } next }; @nextargv and do { my $r = shift @nextargv; $r and $$r = $_; next }; /\.rpm$/ and do { push @files, untaint($_); next }; push @names, $_; @@ -174,12 +174,15 @@ $urpm->search_packages(\%packages, #- filter to add in packages selected required packages. my $ask_choice = sub { - my ($urpm, @choices_id) = @_; + my ($urpm, $from_id, @choices_id) = @_; my $n = 1; #- default value. - my @l = map { my $info = $urpm->{params}{depslist}[$_]; "$info->{name}-$info->{version}-$info->{release}" } @choices_id; + my ($from, @l) = map { my $info = $urpm->{params}{depslist}[$_]; + "$info->{name}-$info->{version}-$info->{release}" } ($from_id, @choices_id); if (@l > 1 && !$auto) { - my $msg = _("One of the following packages is needed:"); + my $msg = (defined $from_id ? + _("One of the following packages is needed to install %s:", $from) : + _("One of the following packages is needed:")); if ($X) { `gchooser "$msg" @l`; $n = $? >> 8 || die; @@ -2,7 +2,7 @@ Name: urpmi Version: 1.7 -Release: 5mdk +Release: 6mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -94,7 +94,7 @@ rm -f /var/lib/urpmi/depslist %{_sbindir}/urpmi.* %{_mandir}/man?/urpm* # find_lang isn't able to find man pages yet... -%lang(fr) %{_mandir}/fr/man?/urpm* +%lang(fr) %{_mandir}/fr/man*/* %{perl_sitearch}/urpm.pm %files -n gurpmi @@ -112,6 +112,11 @@ rm -f /var/lib/urpmi/depslist %changelog +* Wed Aug 29 2001 François Pons <fpons@mandrakesoft.com> 1.7-6mdk +- fixed multiple asking of same choices. +- possibly fixed array error in resolving choices. +- fixed wrong reference to fr man pages. + * Wed Aug 29 2001 François Pons <fpons@mandrakesoft.com> 1.7-5mdk - rebuild with latest rpm. |