diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-11-10 17:38:02 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-11-10 17:38:02 +0000 |
commit | 703af98cc4c470a49514326251efcb86ad28f6b3 (patch) | |
tree | ed1f0254012fb2268a41226b8582885a143c9dbe /urpm/media.pm | |
parent | e843cc8c9d8bcb6dc2ad0769f8891e2da050ea56 (diff) | |
download | urpmi-703af98cc4c470a49514326251efcb86ad28f6b3.tar urpmi-703af98cc4c470a49514326251efcb86ad28f6b3.tar.gz urpmi-703af98cc4c470a49514326251efcb86ad28f6b3.tar.bz2 urpmi-703af98cc4c470a49514326251efcb86ad28f6b3.tar.xz urpmi-703af98cc4c470a49514326251efcb86ad28f6b3.zip |
don't cache media.cfg files on virtual media
media.cfg files were cached to /etc/urpmi/media.cfg even when using
--use-distrib or other media for which we don't want to cache the media
matadata. Make sure we no longer do that.
Diffstat (limited to 'urpm/media.pm')
-rw-r--r-- | urpm/media.pm | 8 |
1 files changed, 6 insertions, 2 deletions
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}; |