summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2004-01-15 18:51:32 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2004-01-15 18:51:32 +0000
commitf407ed64ddf4070d54f0e631b0eee6ce070933a9 (patch)
tree55cae7001cf1d4b267ee426751b5410ec5731bfe /urpm.pm
parent40d96654b8bae7dae990eeac3db8f7947bbf1810 (diff)
downloadurpmi-f407ed64ddf4070d54f0e631b0eee6ce070933a9.tar
urpmi-f407ed64ddf4070d54f0e631b0eee6ce070933a9.tar.gz
urpmi-f407ed64ddf4070d54f0e631b0eee6ce070933a9.tar.bz2
urpmi-f407ed64ddf4070d54f0e631b0eee6ce070933a9.tar.xz
urpmi-f407ed64ddf4070d54f0e631b0eee6ce070933a9.zip
more graphical feedback in urpmi --parallel --X (status, progress, etc)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 6cbea321..490dff02 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -29,7 +29,8 @@ sub basename { local $_ = shift; s|/*\s*$||; s|.*/||; $_ }
#- create a new urpm object.
sub new {
my ($class) = @_;
- bless {
+ my $self;
+ $self = bless {
config => "/etc/urpmi/urpmi.cfg",
skiplist => "/etc/urpmi/skip.list",
instlist => "/etc/urpmi/inst.list",
@@ -47,6 +48,9 @@ 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]); },
+
}, $class;
}