From 48fbaed7c1711d74c46869d79716cc8f48119a97 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 20 Sep 2006 09:11:04 +0000 Subject: Fix handling of file:// and removable:// urls by distribconf --- urpm.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/urpm.pm b/urpm.pm index 5ebdef4f..e07e3bdc 100644 --- a/urpm.pm +++ b/urpm.pm @@ -777,18 +777,17 @@ sub add_distrib_media { # (Olivier Thauvin): Is this a workaround ? $urpm->{media} or $urpm->read_config; - my $distribconf = MDV::Distribconf->new($url); + my $distribconf; if (my ($dir) = $url =~ m!^(?:removable[^:]*:/|file:/)?(/.*)!) { - - $urpm->try_mounting($url) + $urpm->try_mounting($dir) or $urpm->{error}(N("unable to access first installation medium")), return (); - - $distribconf->load() or $urpm->{error}(N("this url seems to not contain any distrib")), return (); - + $distribconf = MDV::Distribconf->new($dir); + $distribconf->load() or $urpm->{error}(N("this url seems to not contain any distrib")), return (); } else { unlink "$urpm->{cachedir}/partial/media.cfg"; + $distribconf = MDV::Distribconf->new($url); $distribconf->settree('mandriva'); eval { -- cgit v1.2.1