summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-03 22:18:26 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-03 22:18:26 +0000
commitfb10756e08d2a1a43e9fe665f1972c93b9e35ba6 (patch)
tree2ef9f2a1c3f0c07f5199a1096e7e16977b5487dd
parentfdd0bf67b2723c8eaccc53ac41d05dd54b73f43f (diff)
downloadurpmi-fb10756e08d2a1a43e9fe665f1972c93b9e35ba6.tar
urpmi-fb10756e08d2a1a43e9fe665f1972c93b9e35ba6.tar.gz
urpmi-fb10756e08d2a1a43e9fe665f1972c93b9e35ba6.tar.bz2
urpmi-fb10756e08d2a1a43e9fe665f1972c93b9e35ba6.tar.xz
urpmi-fb10756e08d2a1a43e9fe665f1972c93b9e35ba6.zip
handle callback_error when installing packages (scripts & I/O errors)
-rw-r--r--NEWS1
-rw-r--r--urpm/install.pm6
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 9b6d2cfd..9a4b2170 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- add basic support for detecting I/O error
- display erasure progress too
Version 7.15.2 - 16 January 2013, by Thierry Vignaud
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;