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 ++++++++++++ urpmi.spec | 1 + 2 files changed, 13 insertions(+) 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 diff --git a/urpmi.spec b/urpmi.spec index 8b9b79f8..4671f8fa 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -117,6 +117,7 @@ autoirpm.uninstall * Mon Mar 26 2001 François Pons 1.5-25mdk - sort list file so that rpm are sorted when installed. - increase speed for --auto-select: implies -M by default. +- added support for retrieving descriptions file. * Mon Mar 26 2001 François Pons 1.5-24mdk - fixed annoying message when adding a medium (cp). -- cgit v1.2.1