diff options
-rw-r--r-- | urpm/msg.pm | 6 | ||||
-rwxr-xr-x | urpme | 2 | ||||
-rwxr-xr-x | urpmi | 10 | ||||
-rwxr-xr-x | urpmi.addmedia | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm index fa07e4d3..b062ee7f 100644 --- a/urpm/msg.pm +++ b/urpm/msg.pm @@ -14,7 +14,7 @@ BEGIN { } our @ISA = 'Exporter'; -our @EXPORT = qw(N N_ P translate bug_log message_input_ toMb formatXiB sys_log); +our @EXPORT = qw(N N_ P translate bug_log message_input toMb formatXiB sys_log); #- I18N. use Locale::gettext; @@ -102,10 +102,10 @@ sub bug_log { sub ask_yes_or_no { my ($msg) = @_; - message_input_($msg . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/; + message_input($msg . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/; } -sub message_input_ { +sub message_input { my ($msg, %o_opts) = @_; _message_input($msg, undef, %o_opts); } @@ -156,7 +156,7 @@ if ($urpm->{options}{auto} || $env) { $test and print STDOUT $msg; } elsif ($parallel || @toremove > @cmdline_pkgs_to_remove) { print STDOUT $msg; - $force || message_input_(P("Remove %d package?", "Remove %d packages?", scalar(@toremove), scalar(@toremove)) . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/ or exit 0; + $force || message_input(P("Remove %d package?", "Remove %d packages?", scalar(@toremove), scalar(@toremove)) . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/ or exit 0; } print($test ? @@ -439,7 +439,7 @@ sub ask_choice { print N("In order to satisfy the '%s' dependency, one of the following packages is needed:", $virtual_pkg_name), "\n"; my $i = 0; foreach (@l) { print " " . ++$i . "- $_\n" } - $n = message_input_(N("What is your choice? (1-%d) ", $i), default => $prefer, range_min => 0, range => $i); + $n = message_input(N("What is your choice? (1-%d) ", $i), default => $prefer, range_min => 0, range => $i); defined($n) && $n ne "0" or exit 1; # abort. if ($n =~ /\D/) { my @nn = map { $choices[$_ - 1] } grep { !/\D/ } split /[, \t]+/, $n; @@ -490,7 +490,7 @@ that are older than the installed ones:\n%s", $list); } else { my $noexpr = N("Nn"); $msg .= N("\nContinue installation anyway?"); - $force || message_input_($msg . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; + $force || message_input($msg . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; } # Whatever option we selected, the overall installation should fail if some packages are unselected $urpm::postponed_msg .= $msg . "\n"; @@ -508,7 +508,7 @@ if (@ask_unselect) { } else { my $noexpr = N("Nn"); $msg .= N("\nContinue installation anyway?"); - $force || message_input_($msg . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; + $force || message_input($msg . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; } # Whatever option we selected, the overall installation should fail if some packages are unselected $urpm::postponed_msg .= $msg . "\n"; @@ -623,7 +623,7 @@ if (!$urpm->{options}{auto} && $ask_user && $urpm->{nb_install} || $env && !$opt exit 0; #- exit now for specific environment. } my $noexpr = N("Nn"); - $force || message_input_($p . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; + $force || message_input($p . N(" (Y/n) "), boolean => 1) !~ /[$noexpr]/ or exit 17; } my $exit_code = urpm::main_loop::run($urpm, $state, @@ -637,7 +637,7 @@ my $exit_code = urpm::main_loop::run($urpm, $state, 1; } else { my $msg2 = N("Press Enter when mounted..."); - defined message_input_("$msg\n$msg2 "); + defined message_input("$msg\n$msg2 "); } }) : ()), trans_log => &urpm::download::sync_logger, diff --git a/urpmi.addmedia b/urpmi.addmedia index 7179b8e6..fd54b11f 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -132,7 +132,7 @@ if ($options{distrib}) { my ($medianame, $add_by_default) = @_; my $yesexpr = N("Yy"); $add_by_default = 1 if $options{allmedia}; - my $answer = message_input_( + my $answer = message_input( N("\nDo you want to add media '%s'?", $medianame) . ($add_by_default ? N(" (Y/n) ") : N(" (y/N) ")), boolean => 1, ); |