summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
commit4df7583caa71a35d6d68c373fc0c62d1be6d955b (patch)
treebddf36169b314d82ff20036dea7e47fa4fec5bcd /urpm/install.pm
parent7a606ec3537b2f465f8e06e99b445c756bfcca8f (diff)
downloadurpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.gz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.bz2
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.xz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.zip
re-sync after the big svn loss
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index e78f80a9..82f01b0c 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -163,7 +163,7 @@ sub install {
return unless defined $pkgid;
my $pkg = $urpm->{depslist}[$pkgid];
my $fullname = $pkg->fullname;
- my $trtype = (grep { /\Q$fullname\E/ } values %$install) ? 'install' : '(upgrade|update)';
+ my $trtype = $pkg->flag_installed ? '(upgrade|update)' : 'install';
foreach ($pkg->files) { /\bREADME(\.$trtype)?\.urpmi$/ and $readmes{$_} = $fullname }
close $fh if defined $fh;
};
@@ -176,16 +176,15 @@ sub install {
#- don't clear cache if transaction failed. We might want to retry.
if (@l == 0 && !$options{test} && $options{post_clean_cache}) {
#- examine the local cache to delete packages which were part of this transaction
- foreach (keys %$install, keys %$upgrade) {
- my $pkg = $urpm->{depslist}[$_];
- unlink "$urpm->{cachedir}/rpms/" . $pkg->filename;
- }
+ my @pkgs = map { $urpm->{depslist}[$_]->filename } keys %$install, keys %$upgrade;
+ $urpm->{log}(N("removing installed rpms (%s) from %s", join(' ', @pkgs), "$urpm->{cachedir}/rpms"));
+ unlink "$urpm->{cachedir}/rpms/$_" foreach @pkgs;
}
if ($::verbose >= 0) {
foreach (keys %readmes) {
print "-" x 70, "\n", N("More information on package %s", $readmes{$_}), "\n";
- print cat_($_);
+ print cat_(($urpm->{root} || '') . $_);
print "-" x 70, "\n";
}
}