diff options
author | unknown <ex.thierry.vignaud@NANTEXPUC210048.dom-grand-ouest.justice.fr> | 2015-02-23 10:54:37 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-02-26 19:02:31 +0100 |
commit | 3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124 (patch) | |
tree | 26a79c1ce74014b59f26600865fa72c2cfef1eb4 /urpm | |
parent | b411d0ff7aefe578dc1a9a21ba4d1c9db3d50327 (diff) | |
download | urpmi-3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124.tar urpmi-3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124.tar.gz urpmi-3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124.tar.bz2 urpmi-3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124.tar.xz urpmi-3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124.zip |
always display the right package name on errors
fixes mga#15032 and also simplify...
needs URPM >= 5.04
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/install.pm | 15 |
1 files changed, 2 insertions, 13 deletions
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) { |