From fab72ba35228c94186d8e998b7e4993e40131176 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 3 Sep 2008 16:26:01 +0000 Subject: use sync_rel() instead of sync_url() (this requires changing _new_distribconf_and_download parameters) --- urpm/media.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'urpm/media.pm') 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; } -- cgit v1.2.1