From a8864e0be1e0eb6bcd80a991314725de74876771 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 10 Jan 2007 16:38:24 +0000 Subject: restore cleaning /var/cache/urpmi/rpms --- urpm/get_pkgs.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'urpm') diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm index b2f4ad68..c1f1de0c 100644 --- a/urpm/get_pkgs.pm +++ b/urpm/get_pkgs.pm @@ -36,6 +36,13 @@ sub selected2list { $file2fullnames{$pkg->filename}{$pkg->fullname} = undef; } + if ($options{clean_all}) { + #- clean download directory, do it here even if this is not the best moment. + $urpm->{log}(N("cleaning %s and %s", "$urpm->{cachedir}/partial", "$urpm->{cachedir}/rpms")); + urpm::sys::clean_dir("$urpm->{cachedir}/partial"); + urpm::sys::clean_dir("$urpm->{cachedir}/rpms"); + } + #- examine the local repository, which is trusted (no gpg or pgp signature check but md5 is now done). foreach my $filepath (glob("$urpm->{cachedir}/rpms/*")) { next if -d $filepath; @@ -56,12 +63,6 @@ sub selected2list { } } - if ($options{clean_all}) { - #- clean download directory, do it here even if this is not the best moment. - $urpm->{log}(N("cleaning %s", "$urpm->{cachedir}/partial")); - urpm::sys::clean_dir("$urpm->{cachedir}/partial"); - } - my ($error, @list_error, @list, %examined); foreach my $medium (@{$urpm->{media} || []}) { -- cgit v1.2.1