summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-05-13 16:08:51 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-05-13 16:08:51 +0000
commit6cf4e3cacde2462a720484b18f1ffa3194b56e80 (patch)
tree72c65f5c0314522ec305940a5b5a2aba558d71b6 /urpmi
parent20f61d8756d85e6d65a64d183b5fea9f866fbc50 (diff)
downloadurpmi-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'.
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi11
1 files changed, 3 insertions, 8 deletions
diff --git a/urpmi b/urpmi
index 6d0f7802..e4994cb6 100755
--- a/urpmi
+++ b/urpmi
@@ -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...")));