diff options
author | Francois Pons <fpons@mandriva.com> | 2002-12-03 14:43:51 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-12-03 14:43:51 +0000 |
commit | 2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe (patch) | |
tree | 7326808e4a91fb78b485e5686a4e2f93804ab9d4 /urpm.pm | |
parent | c2f88b824c74e11c644bd34ca29ff4a3a216ede9 (diff) | |
download | urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.gz urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.bz2 urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.xz urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.zip |
4.1-8mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -1858,8 +1858,6 @@ sub get_source_packages { my %sources; unless ($medium->{ignore}) { - print STDERR ">>$medium->{$_}\n" foreach qw(name list url start end); - print STDERR "\n"; #- always prefer a list file is available. if ($medium->{list} && -r "$urpm->{statedir}/$medium->{list}") { open F, "$urpm->{statedir}/$medium->{list}"; @@ -2135,23 +2133,22 @@ sub install { my ($urpm, $remove, $install, $upgrade, %options) = @_; my $db = URPM::DB::open($urpm->{root}, !$options{test}); #- open in read/write mode unless testing installation. my $trans = $db->create_transaction($urpm->{root}); - my (@l, %file2pkg); + my ($update, @l, %file2pkg) = (0); local *F; foreach (@$remove) { $trans->remove($_) or $urpm->{error}(_("unable to remove package %s", $_)); } - foreach (keys %$install) { - my $pkg = $urpm->{depslist}[$_]; - $file2pkg{$install->{$_}} = $pkg; - $pkg->update_header($install->{$_}); - $trans->add($pkg, 0) or $urpm->{error}(_("unable to install package %s", $install->{$_})); - } - foreach (keys %$upgrade) { - my $pkg = $urpm->{depslist}[$_]; - $file2pkg{$upgrade->{$_}} = $pkg; - $pkg->update_header($upgrade->{$_}); - $trans->add($pkg, 1) or $urpm->{error}(_("unable to install package %s", $upgrade->{$_})); + foreach my $mode ($install, $upgrade) { + foreach (keys %$mode) { + my $pkg = $urpm->{depslist}[$_]; + $file2pkg{$mode->{$_}} = $pkg; + $pkg->update_header($mode->{$_}); + $trans->add($pkg, + update => $update, $options{excludepath} ? (excludepath => [ split ',', $options{excludepath} ]) : ()) + or $urpm->{error}(_("unable to install package %s", $install->{$_})); + } + ++$update; } if (!$options{nodeps} and @l = $trans->check) { if ($options{translate_message}) { |