summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm12
1 files changed, 12 insertions, 0 deletions
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