summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-02 17:34:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-02 17:34:09 +0000
commitf559454ba384c3905e1d40cff739ad7bd70526e6 (patch)
tree4d34fd46378fc05c721250c855f49d5971256885
parentd0e43211e01cd23019525bb808e71f431d4139e8 (diff)
downloadurpmi-f559454ba384c3905e1d40cff739ad7bd70526e6.tar
urpmi-f559454ba384c3905e1d40cff739ad7bd70526e6.tar.gz
urpmi-f559454ba384c3905e1d40cff739ad7bd70526e6.tar.bz2
urpmi-f559454ba384c3905e1d40cff739ad7bd70526e6.tar.xz
urpmi-f559454ba384c3905e1d40cff739ad7bd70526e6.zip
simplify: use same message in --test mode
-rw-r--r--urpme20
1 files changed, 10 insertions, 10 deletions
diff --git a/urpme b/urpme
index 962b9915..6d6cee55 100644
--- a/urpme
+++ b/urpme
@@ -120,17 +120,17 @@ my @toremove = urpm::select::find_packages_to_remove(
},
) or $urpm->{fatal}(0, N("Nothing to remove"));
-my $list = urpm::select::translate_why_removed($urpm, $state, @toremove);
-if ($test && $options{auto}) {
- #- Warning : the following message is parsed in urpm::parallel_*
- my $msg = N("Checking to remove the following packages");
- print STDOUT "$msg:\n$list\n";
-} elsif (($parallel || @toremove > @cmdline_pkgs_to_remove) && !$options{auto}) {
- my $msg =
- P("To satisfy dependencies, the following package will be removed",
+my $msg =
+ P("To satisfy dependencies, the following package will be removed",
"To satisfy dependencies, the following %d packages will be removed",
- scalar(@toremove), scalar(@toremove)) . sprintf(" (%s)", formatXiB(-$urpm->selected_size($state)));
- print STDOUT "$msg:\n$list\n";
+ scalar(@toremove), scalar(@toremove))
+ . sprintf(" (%s)", formatXiB(-$urpm->selected_size($state))) . ":\n"
+ . urpm::select::translate_why_removed($urpm, $state, @toremove) . "\n";
+
+if ($options{auto}) {
+ $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;
}