summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--urpm/media.pm8
2 files changed, 9 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0f86539c..8fc717a8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- don't cache media.cfg from the media when using a virtual one (ie a medium
+ for which we don't want to cache metadata)
+
Version 6.32 - 29 October 2009
- if package B obsoletes package A and if A is in potential orphans and B is
diff --git a/urpm/media.pm b/urpm/media.pm
index 18959f7d..8bfde15c 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -890,7 +890,9 @@ sub add_distrib_media {
my $media_cfg = reduce_pathname("$dir/" . $distribconf->getpath(undef, 'infodir') . '/media.cfg');
$distribconf->parse_mediacfg($media_cfg)
or $urpm->{error}(N("this location doesn't seem to contain any distribution")), return ();
- _register_media_cfg($urpm, $dir, undef, $distribconf, $media_cfg);
+ if (!$options{virtual}) {
+ _register_media_cfg($urpm, $dir, undef, $distribconf, $media_cfg);
+ }
} else {
if ($options{mirrorlist}) {
$url and die "unexpected url $url together with mirrorlist $options{mirrorlist}\n";
@@ -902,7 +904,9 @@ sub add_distrib_media {
my $media_cfg = "$urpm->{cachedir}/partial/media.cfg";
$distribconf = _new_distribconf_and_download($urpm, $m);
$parse_ok = $distribconf && $distribconf->parse_mediacfg($media_cfg);
- _register_media_cfg($urpm, $url, $options{mirrorlist}, $distribconf, $media_cfg) if $parse_ok;
+ if ($parse_ok && !$options{virtual}) {
+ _register_media_cfg($urpm, $url, $options{mirrorlist}, $distribconf, $media_cfg);
+ }
$parse_ok;
});
$url = $m->{url};