summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm11
1 files 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 {