From d995f25b068dc18895697fc5c949750afac84b51 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 3 May 2012 17:53:37 +0000 Subject: (empty_packages) fix displaying urpmi fatal errors (mga#5725) --- perl-install/install/NEWS | 2 ++ perl-install/install/pkgs.pm | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'perl-install/install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 3a055ebb3..d7288fb08 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- fix displaying urpmi fatal errors (mga#5725) + Version 14.18 - 2 May 2012 - add missing libfuse.so.2 for mount.ntfs-3g (#5685) diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index c4c1a7edc..e8f1e264e 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -372,7 +372,11 @@ sub empty_packages { urpm::args::set_debug($packages) if $::o->{debug_urpmi}; $packages->{log} = \&log::l; $packages->{info} = \&log::l; - $packages->{fatal} = $packages->{error} = sub { + $packages->{fatal} = sub { + log::l("urpmi error: $_[0]"); + $::o->ask_warn(undef, N("A fatal error occurred: %s.", "$_[1] ($_[0])")); + }; + $packages->{error} = sub { log::l("urpmi error: $_[0]"); $::o->ask_warn(undef, N("An error occurred:") . "\n\n" . $_[0]); }; -- cgit v1.2.1