diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2010-05-11 13:16:16 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2010-05-11 13:16:16 +0000 |
commit | 5e3920fd18012af5ed5e9f1be5841a095b51575a (patch) | |
tree | ed1f0254012fb2268a41226b8582885a143c9dbe /urpm/media.pm | |
parent | d77c21bc4848ccc84f96ca42a91d3a27c8d96078 (diff) | |
download | urpmi-5e3920fd18012af5ed5e9f1be5841a095b51575a.tar urpmi-5e3920fd18012af5ed5e9f1be5841a095b51575a.tar.gz urpmi-5e3920fd18012af5ed5e9f1be5841a095b51575a.tar.bz2 urpmi-5e3920fd18012af5ed5e9f1be5841a095b51575a.tar.xz urpmi-5e3920fd18012af5ed5e9f1be5841a095b51575a.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}; |