diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/install.pm | 15 |
2 files changed, 3 insertions, 13 deletions
@@ -1,3 +1,4 @@ +- always display the right package name on errors (mga#15032) - don't give a wrong package name when it is unknown in a callback (mga#15032) Version 8.03 - 1 January 2015 diff --git a/urpm/install.pm b/urpm/install.pm index d97c4c14..0aa29528 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -300,19 +300,8 @@ sub _get_callbacks { $options->{callback_uninst} ||= $options->{verbose} >= 0 ? \&install_logger : $erase_logger; $options->{callback_error} ||= sub { - my ($urpm, undef, $id, $subtype) = @_; - my $n; - if (defined($id)) { - $n = $urpm->{depslist}[$id]->fullname; - } else { - # We don't know which package :( - if ($trans->NElements() == 1) { - $n = $trans->Element_fullname(0); - } else { - $n = "(unknown)"; - } - } - $urpm->{error}("ERROR: '$subtype' failed for $n"); + my ($urpm, undef, $id, $subtype, undef, undef, $fullname) = @_; + $urpm->{error}("ERROR: '$subtype' failed for $fullname"); }; if ($options->{verbose} >= 0 && $have_pkgs) { |