diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-19 09:22:02 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-19 09:22:02 +0000 |
commit | ac8f1e53ea18a65ad30ab112f61fd34d97051372 (patch) | |
tree | 854ffe9cade70d76fdbd4648530846d16c76150a /urpm.pm | |
parent | 89f0ba4bcb5d8f0a5edafe4697e7785b94856cf2 (diff) | |
download | urpmi-ac8f1e53ea18a65ad30ab112f61fd34d97051372.tar urpmi-ac8f1e53ea18a65ad30ab112f61fd34d97051372.tar.gz urpmi-ac8f1e53ea18a65ad30ab112f61fd34d97051372.tar.bz2 urpmi-ac8f1e53ea18a65ad30ab112f61fd34d97051372.tar.xz urpmi-ac8f1e53ea18a65ad30ab112f61fd34d97051372.zip |
3.8-1mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -3,7 +3,7 @@ package urpm; use strict; use vars qw($VERSION @ISA); -$VERSION = '3.7'; +$VERSION = '3.8'; @ISA = qw(URPM); =head1 NAME @@ -1796,7 +1796,12 @@ sub install_logger { if ($subtype eq 'start') { $urpm->{logger_progress} = 0; - printf "%-28s", $type eq 'trans' ? _("Preparing...") : ($pkg && $pkg->name); + if ($type eq 'trans') { + $urpm->{logger_id} = 0; + printf "%-28s", _("Preparing..."); + } else { + printf "%4d:%-23s", ++$urpm->{logger_id}, ($pkg && $pkg->name); + } } elsif ($subtype eq 'stop') { if ($urpm->{logger_progress} < $progress_size) { print '#' x ($progress_size - $urpm->{logger_progress}); @@ -1816,12 +1821,15 @@ sub install_logger { #- install packages according to each hashes (install or upgrade). sub install { - my ($urpm, $prefix, $install, $upgrade, %options) = @_; + my ($urpm, $prefix, $remove, $install, $upgrade, %options) = @_; my $db = URPM::DB::open($prefix, 1); #- open in read/write mode. my $trans = $db->create_transaction($prefix); my @l; local *F; + foreach (@$remove) { + $trans->remove($_) or $urpm->{error}(_("unable to remove package %s", $_)); + } foreach (keys %$install) { my $pkg = $urpm->{depslist}[$_]; $pkg->update_header($install->{$_}); |