diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 17:16:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 17:16:03 +0000 |
commit | fbbf710243b711524f1b86d14799659e2d9c3847 (patch) | |
tree | bc0383118d287ff38cc24a7ddd4abf477789aa24 | |
parent | 35bbdd101e28168f83fc08bfd640c7947fffd4b7 (diff) | |
download | urpmi-fbbf710243b711524f1b86d14799659e2d9c3847.tar urpmi-fbbf710243b711524f1b86d14799659e2d9c3847.tar.gz urpmi-fbbf710243b711524f1b86d14799659e2d9c3847.tar.bz2 urpmi-fbbf710243b711524f1b86d14799659e2d9c3847.tar.xz urpmi-fbbf710243b711524f1b86d14799659e2d9c3847.zip |
reorder
-rw-r--r-- | urpm.pm | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2457,7 +2457,10 @@ sub get_source_packages { while (defined(my $filename = readdir $dh)) { my $filepath = "$urpm->{cachedir}/rpms/$filename"; next if -d $filepath; - if (!$options{clean_all} && -s _) { + + if ($options{clean_all} || ! -s _) { + unlink $filepath; #- this file should be removed or is already empty. + } else { if (keys(%{$file2fullnames{$filename} || {}}) > 1) { $urpm->{error}(N("there are multiple packages with the same rpm filename \"%s\"", $filename)); next; @@ -2471,8 +2474,6 @@ sub get_source_packages { } else { $options{clean_other} && ! exists $protected_files{$filepath} and unlink $filepath; } - } else { - unlink $filepath; #- this file should be removed or is already empty. } } closedir $dh; |