diff options
Diffstat (limited to 'urpm/install.pm')
-rw-r--r-- | urpm/install.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index 8ede436b..b0ca418d 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -301,8 +301,18 @@ sub _get_callbacks { $options->{callback_error} ||= sub { my ($urpm, undef, $id, $subtype) = @_; - my $n = $urpm->{depslist}[$id]->fullname; - $urpm->{error}("ERROR: '$subtype' failed for $n: "); + 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 = "some package of current transaction"; + } + } + $urpm->{error}("ERROR: '$subtype' failed for $n"); }; if ($options->{verbose} >= 0 && $have_pkgs) { |