summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-25 17:57:16 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-25 17:57:16 +0000
commit19cd735585aaec445f59e00b84221bcd9e669c56 (patch)
tree92866cc8f50f0f505258c5b1158d11f1f64bd377 /urpm/install.pm
parent664edcaacced6e6eac7730e610e9490c1bb31794 (diff)
downloadurpmi-19cd735585aaec445f59e00b84221bcd9e669c56.tar
urpmi-19cd735585aaec445f59e00b84221bcd9e669c56.tar.gz
urpmi-19cd735585aaec445f59e00b84221bcd9e669c56.tar.bz2
urpmi-19cd735585aaec445f59e00b84221bcd9e669c56.tar.xz
urpmi-19cd735585aaec445f59e00b84221bcd9e669c56.zip
enable callers to pass their own callbacks for erasure progress & errors
eg: for rpmdrake/gurpm/drakx
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index b970d93c..a6478b11 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -298,9 +298,9 @@ sub _get_callbacks {
}
};
- $options->{callback_uninst} = $options->{verbose} >= 0 ? \&install_logger : $erase_logger;
+ $options->{callback_uninst} ||= $options->{verbose} >= 0 ? \&install_logger : $erase_logger;
- $options->{callback_error} = sub {
+ $options->{callback_error} ||= sub {
my ($urpm, undef, $id, $subtype) = @_;
my $n = $urpm->{depslist}[$id]->fullname;
$urpm->{error}("ERROR: '$subtype' failed for $n: ");