summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-03 16:26:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-03 16:26:01 +0000
commitfab72ba35228c94186d8e998b7e4993e40131176 (patch)
treecabe320242a51f09f6da597acd4916da7593ae3f /urpm
parent3ffc5a717900ac77f3d3f108e6e7bf86008f0795 (diff)
downloadurpmi-fab72ba35228c94186d8e998b7e4993e40131176.tar
urpmi-fab72ba35228c94186d8e998b7e4993e40131176.tar.gz
urpmi-fab72ba35228c94186d8e998b7e4993e40131176.tar.bz2
urpmi-fab72ba35228c94186d8e998b7e4993e40131176.tar.xz
urpmi-fab72ba35228c94186d8e998b7e4993e40131176.zip
use sync_rel() instead of sync_url()
(this requires changing _new_distribconf_and_download parameters)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/media.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 495b1116..508a8292 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -824,7 +824,7 @@ sub add_distrib_media {
my $m = { mirrorlist => $options{mirrorlist}, url => $url };
my $parse_ok;
try__maybe_mirrorlist($urpm, $m, sub {
- $distribconf = _new_distribconf_and_download($urpm, $m->{url});
+ $distribconf = _new_distribconf_and_download($urpm, $m);
$parse_ok = $distribconf && $distribconf->parse_mediacfg("$urpm->{cachedir}/partial/media.cfg");
$parse_ok;
});
@@ -899,14 +899,14 @@ sub add_distrib_media {
}
sub _new_distribconf_and_download {
- my ($urpm, $url) = @_;
+ my ($urpm, $medium) = @_;
- my $distribconf = MDV::Distribconf->new($url, undef);
+ my $distribconf = MDV::Distribconf->new($medium->{url}, undef);
$distribconf->settree('mandriva');
$urpm->{log}(N("retrieving media.cfg file..."));
- urpm::download::sync_url($urpm,
- reduce_pathname($distribconf->getfullpath(undef, 'infodir') . '/media.cfg'),
+ urpm::download::sync_rel($urpm, $medium,
+ [ $distribconf->getpath(undef, 'infodir') . '/media.cfg' ],
quiet => 1) or return;
$distribconf;
}