diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-09-20 09:11:04 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-09-20 09:11:04 +0000 |
commit | 48fbaed7c1711d74c46869d79716cc8f48119a97 (patch) | |
tree | 825491ee62c6deb8a3be32d5ec0fac205bcaa00d | |
parent | 15549c5a63acdfa0dc36adeadfaab285528e851f (diff) | |
download | urpmi-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.pm | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 { |