From 6c80194744a98d6919b1fcbef0fd8f3199fc5600 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 21 Feb 2005 18:32:25 +0000 Subject: It seems that the msg callback is never defined in urpmi-parallel. Protect against run-time errors; will have to work out how progress reporting is supposed to work. --- urpm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/urpm.pm b/urpm.pm index 878acd3c..20bbd462 100644 --- a/urpm.pm +++ b/urpm.pm @@ -68,7 +68,10 @@ sub new { fatal => sub { printf STDERR "%s\n", $_[1]; exit($_[0]) }, error => sub { printf STDERR "%s\n", $_[0] }, log => sub { printf STDERR "%s\n", $_[0] }, - ui_msg => sub { $self->{log}($_[0]); $self->{ui} and $self->{ui}{msg}->($_[1]) }, + ui_msg => sub { + $self->{log}($_[0]); + ref $self->{ui} && ref $self->{ui}{msg} and $self->{ui}{msg}->($_[1])s; + }, }, $class; $self->set_nofatal(1); $self; -- cgit v1.2.1