summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-03 11:10:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-03 11:10:05 +0000
commitfa8db01a32789f65bfadc99d716dae0ed7f164d5 (patch)
tree3afdd8a64b0f5f37a4f091b470c0950a4813d92b
parentb217860641d2dfb1973067012f6dc0e1784d0e81 (diff)
downloadurpmi-fa8db01a32789f65bfadc99d716dae0ed7f164d5.tar
urpmi-fa8db01a32789f65bfadc99d716dae0ed7f164d5.tar.gz
urpmi-fa8db01a32789f65bfadc99d716dae0ed7f164d5.tar.bz2
urpmi-fa8db01a32789f65bfadc99d716dae0ed7f164d5.tar.xz
urpmi-fa8db01a32789f65bfadc99d716dae0ed7f164d5.zip
o enhance error message "Removing the following package will break your system"
-rw-r--r--NEWS1
-rw-r--r--urpme9
2 files changed, 5 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 96fbbd09..e0847759 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@
o fix --no-md5sum (regression introduced in 5.20) (#41237)
- urpme:
o indent the packages to be removed
+ o enhance error message "Removing the following package will break your system"
Version 5.20 - 2 June 2008, by Pascal "Pixel" Rigaux
diff --git a/urpme b/urpme
index ff869100..5ec2548f 100644
--- a/urpme
+++ b/urpme
@@ -111,11 +111,10 @@ my @toremove = urpm::select::find_packages_to_remove(
0;
},
callback_base => sub {
- my $urpm = shift @_;
- foreach (@_) {
- #- Warning : the following message is parsed in urpm::parallel_*
- $urpm->{error}(N("removing package %s will break your system", $_));
- }
+ my ($urpm, @l) = @_;
+ $urpm->{fatal}(1, P("Removing the following package will break your system:",
+ "Removing the following packages will break your system:", int(@l))
+ . "\n" . add_leading_spaces(urpm::select::translate_why_removed($urpm, $state, @l)));
0;
},
) or $urpm->{fatal}(0, N("Nothing to remove"));