From 75cc208b75d3dc6852a956694646c189aa8b541d Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 26 Mar 2001 14:19:43 +0000 Subject: *** empty log message *** --- urpm.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 5df42b2a..e259952e 100644 --- a/urpm.pm +++ b/urpm.pm @@ -403,6 +403,11 @@ sub update_media { #- mount everything necessary. $urpm->try_mounting($dir, 'mount') or $urpm->{log}("unable to access medium \"$medium->{name}\""), next; + #- try to get the description if it has been found. + unlink "$urpm->{statedir}/descriptions.$medium->{name}"; + -e "$dir/../descriptions" and + system("cp", "-a", "$dir/../descriptions", "$urpm->{statedir}/descriptions.$medium->{name}"); + #- if the source hdlist is present and we are not forcing using rpms file if (!$options{force} && $medium->{with_hdlist} && -e "$dir/$medium->{with_hdlist}") { unlink "$urpm->{cachedir}/partial/$medium->{hdlist}"; @@ -445,6 +450,13 @@ sub update_media { } else { my $basename = $medium->{with_hdlist} =~ /^.*\/([^\/]*)$/ && $1; + #- try to get the description if it has been found. + unlink "$urpm->{cachedir}/partial/descriptions"; + rename "$urpm->{statedir}/descriptions.$medium->{name}", "$urpm->{cachedir}/partial/descriptions"; + system("wget", "-NP", "$urpm->{cachedir}/partial", "$medium->{url}/../descriptions"); + -e "$urpm->{cachedir}/partial/descriptions" and + rename "$urpm->{cachedir}/partial/descriptions", "$urpm->{statedir}/descriptions.$medium->{name}"; + #- try to sync (copy if needed) local copy after restored the previous one. unlink "$urpm->{cachedir}/partial/$basename"; $options{force} || ! -e "$urpm->{statedir}/$medium->{hdlist}" or -- cgit v1.2.1