summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm12
-rw-r--r--urpmi.spec1
2 files changed, 13 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
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 <fpons@mandrakesoft.com> 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 <fpons@mandrakesoft.com> 1.5-24mdk
- fixed annoying message when adding a medium (cp).