diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-01-09 18:28:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-01-09 18:28:13 +0000 |
commit | 899c06f85e6e00e275b475d5dabe107e12c0eb9e (patch) | |
tree | ab42c50ee1fe34b2d391be78210a6f94ae734c35 | |
parent | f07f1f7bcbe00b87799ea13638e17cdd63d1daf6 (diff) | |
download | drakx-899c06f85e6e00e275b475d5dabe107e12c0eb9e.tar drakx-899c06f85e6e00e275b475d5dabe107e12c0eb9e.tar.gz drakx-899c06f85e6e00e275b475d5dabe107e12c0eb9e.tar.bz2 drakx-899c06f85e6e00e275b475d5dabe107e12c0eb9e.tar.xz drakx-899c06f85e6e00e275b475d5dabe107e12c0eb9e.zip |
use urpm::download::parse_url_with_login() directly instead of
copying/forking it since urpm::download is available at install time
-rw-r--r-- | perl-install/install/media.pm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index d96236039..a009e3f12 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -7,7 +7,7 @@ our @EXPORT_OK = qw(getFile_ getAndSaveFile_ getAndSaveFile_media_info packageMe use common; use fs::type; - +use urpm::download; #- list of fields for {phys_medium} : #- device @@ -913,13 +913,6 @@ sub install_urpmi__generate_synthesis { $@ and log::l("build_synthesis failed: $@"); } -#- copied from urpm/media.pm -sub parse_url_with_login { - my ($url) = @_; - $url =~ m!([^:]*)://([^/:\@]*)(:([^/:\@]*))?\@([^/]*)(.*)! && - { proto => $1, login => $2, password => $4, machine => $5, dir => $6 }; -} - sub install_urpmi { my ($stage2_method, $packages) = @_; @@ -964,7 +957,7 @@ sub install_urpmi { my ($qname, $qdir) = ($medium->{fakemedium}, $dir); - if (my $u = parse_url_with_login($qdir)) { + if (my $u = urpm::download::parse_url_with_login($qdir)) { $qdir = sprintf('%s://%s@%s%s', $u->{proto}, $u->{login}, $u->{machine}, $u->{dir}); push @netrc, sprintf("machine %s login %s password %s\n", $u->{machine}, $u->{login}, $u->{password}); } |