diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-05-13 16:08:51 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-05-13 16:08:51 +0000 |
commit | 6cf4e3cacde2462a720484b18f1ffa3194b56e80 (patch) | |
tree | 72c65f5c0314522ec305940a5b5a2aba558d71b6 | |
parent | 20f61d8756d85e6d65a64d183b5fea9f866fbc50 (diff) | |
download | urpmi-6cf4e3cacde2462a720484b18f1ffa3194b56e80.tar urpmi-6cf4e3cacde2462a720484b18f1ffa3194b56e80.tar.gz urpmi-6cf4e3cacde2462a720484b18f1ffa3194b56e80.tar.bz2 urpmi-6cf4e3cacde2462a720484b18f1ffa3194b56e80.tar.xz urpmi-6cf4e3cacde2462a720484b18f1ffa3194b56e80.zip |
Remove a unused message.
Allow the user to abort by answering '0' to the question
'One of the following packages is needed'.
-rwxr-xr-x | urpmi | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -387,17 +387,13 @@ if (@src_names) { || $force or exit 1; } -#- filter to add in packages selected required packages. sub ask_choice { my ($urpm, $db, $state, $choices) = @_; my $n = 1; #- default value. my (@l) = map { scalar $_->fullname } @$choices; - my $from; if (@l > 1 && !$urpm->{options}{auto}) { - my $msg = (defined $from ? - N("One of the following packages is needed to install %s:", $from) : - N("One of the following packages is needed:")); + my $msg = N("One of the following packages is needed:"); if ($urpm::args::options{X}) { system(qq(gchooser "$msg" @l)); $n = $? >> 8 || die; @@ -405,12 +401,11 @@ sub ask_choice { message($msg); my $i = 0; foreach (@l) { message(" " . ++$i . "- $_") } $n = message_input(N("What is your choice? (1-%d) ", $i), undef, range => $i); - defined $n or exit 1; + defined($n) && $n ne "0" or exit 1; # abort. } } - $choices->[$n - 1]; -}; +} if ($parallel && $urpm::args::options{X}) { gurpm::init(to_utf8(N("Package installation...")), to_utf8(N("Initializing..."))); |