summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-03 17:53:37 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-03 17:53:37 +0000
commitb06e785fbb4926dcd287e9706c715f3522efb92e (patch)
tree8677c302f48303c80603abf0555dba3598215897 /perl-install/install/pkgs.pm
parente9ce53ce921ecdbadd107e36a4ac83caae2b08e6 (diff)
downloaddrakx-b06e785fbb4926dcd287e9706c715f3522efb92e.tar
drakx-b06e785fbb4926dcd287e9706c715f3522efb92e.tar.gz
drakx-b06e785fbb4926dcd287e9706c715f3522efb92e.tar.bz2
drakx-b06e785fbb4926dcd287e9706c715f3522efb92e.tar.xz
drakx-b06e785fbb4926dcd287e9706c715f3522efb92e.zip
(empty_packages) fix displaying urpmi fatal errors (mga#5725)
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm6
1 files changed, 5 insertions, 1 deletions
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]);
};