summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-25 15:24:03 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-25 15:24:03 +0000
commitc95ab52aa93f5078e091c8248b90c31e247c350b (patch)
tree7fc7847f13c5839601b89f52b95aaf598627da39 /urpm.pm
parent73ba30c8fac0aba9befa89bc79eab6d24dae20df (diff)
downloadurpmi-c95ab52aa93f5078e091c8248b90c31e247c350b.tar
urpmi-c95ab52aa93f5078e091c8248b90c31e247c350b.tar.gz
urpmi-c95ab52aa93f5078e091c8248b90c31e247c350b.tar.bz2
urpmi-c95ab52aa93f5078e091c8248b90c31e247c350b.tar.xz
urpmi-c95ab52aa93f5078e091c8248b90c31e247c350b.zip
avoid cleaning cache if rpm on command line are inside it (parallel mode).
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index 915a09e6..7c8ac708 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2283,14 +2283,14 @@ sub get_unwanted_packages {
#- have a null list.
sub get_source_packages {
my ($urpm, $packages, %options) = @_;
- my ($id, $error, %local_sources, @list, %fullname2id, %file2fullnames, %examined);
+ my ($id, $error, %protected_files, %local_sources, @list, %fullname2id, %file2fullnames, %examined);
local (*D, *F, $_);
#- build association hash to retrieve id and examine all list files.
foreach (keys %$packages) {
my $p = $urpm->{depslist}[$_];
if ($urpm->{source}{$_}) {
- $local_sources{$_} = $urpm->{source}{$_};
+ $protected_files{$local_sources{$_} = $urpm->{source}{$_}} = undef;
} else {
$fullname2id{$p->fullname} = $_.'';
}
@@ -2316,10 +2316,10 @@ sub get_source_packages {
if (defined($id = delete $fullname2id{$fullname})) {
$local_sources{$id} = $filepath;
} else {
- $options{clean_other} and unlink $filepath;
+ $options{clean_other} && ! exists $protected_files{$filepath} and unlink $filepath;
}
} else {
- $options{clean_other} and unlink $filepath;
+ $options{clean_other} && ! exists $protected_files{$filepath} and unlink $filepath;
}
} else {
#- this file should be removed or is already empty.