summaryrefslogtreecommitdiffstats
path: root/perl-install/install/media.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-11 10:05:40 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-11 10:05:40 +0000
commit62b683d439b80acd6ef7db3646261d64c67007d7 (patch)
treeb98354ff5b79ccc99271d5efa604def9b5d6c63c /perl-install/install/media.pm
parentb9860580a86b61db3a6c22046d4c695aace573eb (diff)
downloaddrakx-62b683d439b80acd6ef7db3646261d64c67007d7.tar
drakx-62b683d439b80acd6ef7db3646261d64c67007d7.tar.gz
drakx-62b683d439b80acd6ef7db3646261d64c67007d7.tar.bz2
drakx-62b683d439b80acd6ef7db3646261d64c67007d7.tar.xz
drakx-62b683d439b80acd6ef7db3646261d64c67007d7.zip
(_get_medium_dir) extract it from install_urpmi()
Diffstat (limited to 'perl-install/install/media.pm')
-rw-r--r--perl-install/install/media.pm16
1 files changed, 11 insertions, 5 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 9b6e5552c..76f4cf232 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -904,6 +904,15 @@ sub copy_rpms_on_disk {
our $copied_rpms_on_disk = 1;
}
+sub _get_medium_dir {
+ my ($phys_m) = @_;
+ if ($phys_m->{method} eq 'ftp' || $phys_m->{method} eq 'http' || $phys_m->{method} eq 'cdrom') {
+ $phys_m->{url};
+ } else {
+ "$phys_m->{mntpoint}$phys_m->{rel_path}";
+ }
+}
+
sub install_urpmi {
my ($stage2_method, $packages) = @_;
@@ -919,14 +928,11 @@ sub install_urpmi {
my ($dir, $removable_device);
my $phys_m = $medium->{phys_medium};
- if ($phys_m->{method} eq 'ftp' || $phys_m->{method} eq 'http' || $phys_m->{method} eq 'cdrom') {
- $dir = $phys_m->{url};
- } else {
- $dir = "$phys_m->{mntpoint}$phys_m->{rel_path}";
+ $dir = _get_medium_dir($phys_m);
+
if ($phys_m->{method} eq 'iso') {
$removable_device = $phys_m->{loopback_device}{mntpoint} . $phys_m->{loopback_file};
}
- }
$dir = MDK::Common::File::concat_symlink($dir, $medium->{rpmsdir});