diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-25 15:24:03 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-25 15:24:03 +0000 |
commit | c95ab52aa93f5078e091c8248b90c31e247c350b (patch) | |
tree | 7fc7847f13c5839601b89f52b95aaf598627da39 /urpm.pm | |
parent | 73ba30c8fac0aba9befa89bc79eab6d24dae20df (diff) | |
download | urpmi-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.pm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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. |