summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2010-01-12 14:09:07 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2010-01-12 14:09:07 +0000
commit2a5c02d5839531351773d6854b955af665c283ab (patch)
treeecdb055f3a8a8c2880582b99fa1e7429fd63d9f4
parent62a68d865c662702cca7607ae1a9d4d4693a414c (diff)
downloadurpmi-2a5c02d5839531351773d6854b955af665c283ab.tar
urpmi-2a5c02d5839531351773d6854b955af665c283ab.tar.gz
urpmi-2a5c02d5839531351773d6854b955af665c283ab.tar.bz2
urpmi-2a5c02d5839531351773d6854b955af665c283ab.tar.xz
urpmi-2a5c02d5839531351773d6854b955af665c283ab.zip
honour $RELEASE/$ARCH/... in urpmi.addmedia --distrib
-rw-r--r--urpm/media.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 8bfde15c..84803648 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -905,7 +905,7 @@ sub add_distrib_media {
$distribconf = _new_distribconf_and_download($urpm, $m);
$parse_ok = $distribconf && $distribconf->parse_mediacfg($media_cfg);
if ($parse_ok && !$options{virtual}) {
- _register_media_cfg($urpm, $url, $options{mirrorlist}, $distribconf, $media_cfg);
+ _register_media_cfg($urpm, urpm::cfg::expand_line ($m->{url}), $options{mirrorlist}, $distribconf, $media_cfg);
}
$parse_ok;
});
@@ -985,9 +985,11 @@ sub _new_distribconf_and_download {
$distribconf->settree('mandriva');
$urpm->{log}(N("retrieving media.cfg file..."));
- urpm::download::sync_rel_one($urpm, $medium,
- $distribconf->getpath(undef, 'infodir') . '/media.cfg',
+ my $url = $medium->{url};
+ $medium->{url} = urpm::cfg::expand_line ($url);
+ urpm::download::sync_rel_one($urpm, $medium, $distribconf->getpath(undef, 'infodir') . '/media.cfg',
quiet => 1, preclean => 1) or return;
+ $medium->{url} = urpm::cfg::substitute_back ($medium->{url}, $url);
$distribconf;
}