summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-09-20 09:11:04 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-09-20 09:11:04 +0000
commit48fbaed7c1711d74c46869d79716cc8f48119a97 (patch)
tree825491ee62c6deb8a3be32d5ec0fac205bcaa00d
parent15549c5a63acdfa0dc36adeadfaab285528e851f (diff)
downloadurpmi-48fbaed7c1711d74c46869d79716cc8f48119a97.tar
urpmi-48fbaed7c1711d74c46869d79716cc8f48119a97.tar.gz
urpmi-48fbaed7c1711d74c46869d79716cc8f48119a97.tar.bz2
urpmi-48fbaed7c1711d74c46869d79716cc8f48119a97.tar.xz
urpmi-48fbaed7c1711d74c46869d79716cc8f48119a97.zip
Fix handling of file:// and removable:// urls by distribconf
-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 {