From d386aea106753bb930ab65b9bfd434e8e75f2c84 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 7 Nov 2002 15:52:48 +0000 Subject: 4.0-24mdk --- urpm.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 62878fa0..772ada62 100644 --- a/urpm.pm +++ b/urpm.pm @@ -975,8 +975,9 @@ sub update_media { #- and check hdlist has not be named very strangely... if ($medium->{hdlist} ne 'list') { my $local_list = $medium->{with_hdlist} =~ /hd(list.*)\.cz$/ ? $1 : 'list'; + #- always delete a remaining list file in cache. + unlink "$urpm->{cachedir}/partial/list"; if (-s "$dir/$local_list") { - unlink "$urpm->{cachedir}/partial/list"; $urpm->{log}(_("copying source list of \"%s\"...", $medium->{name})); system("cp", "-pR", "$dir/$local_list", "$urpm->{cachedir}/partial/list") ? $urpm->{log}(_("...copying failed")) : $urpm->{log}(_("...copying done")); @@ -1238,8 +1239,11 @@ sub update_media { close LIST; #- check if at least something has been written into list file. - -s "$urpm->{cachedir}/partial/$medium->{list}" > 32 or - $error = 1, $urpm->{error}(_("nothing written in list file for \"%s\"", $medium->{name})); + if (-s "$urpm->{cachedir}/partial/$medium->{list}" > 32) { + $urpm->{log}(_("writing list file for medium \"%s\"", $medium->{name})); + } else { + $error = 1, $urpm->{error}(_("nothing written in list file for \"%s\"", $medium->{name})); + } } } -- cgit v1.2.1