From fb10756e08d2a1a43e9fe665f1972c93b9e35ba6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 3 Feb 2013 22:18:26 +0000 Subject: handle callback_error when installing packages (scripts & I/O errors) --- urpm/install.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'urpm/install.pm') diff --git a/urpm/install.pm b/urpm/install.pm index 2670cf3c..9adc10da 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -309,6 +309,12 @@ 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: "); + }; + if ($options->{verbose} >= 0 && $have_pkgs) { $options->{callback_inst} ||= \&install_logger; $options->{callback_trans} ||= \&install_logger; -- cgit v1.2.1