From 466914b686743c012eeb9b8444d8756efe6e73dc Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Apr 2009 13:50:47 +0000 Subject: (adjust_paths_in_urpmi_cfg) fix mount point for disk media rationale: for disk & nfs install, either resolve /tmp/image (using real mount point) or drop $::prefix, which makes url matches real mount point --- perl-install/install/NEWS | 1 + perl-install/install/media.pm | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'perl-install/install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index e6a7d791a..778dd5ee3 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -2,6 +2,7 @@ - media management: o just use curl instead of using our own http stack to retrieve files from network (thus fixing #48887) + o fix mount point for disk media o tell urpmi to read synthesis before adding supplementary network media in order to be able to install the 'basesystem' package - log where we segfaulted diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index 0edfb8ab0..ee2bfbebf 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -533,8 +533,14 @@ sub adjust_paths_in_urpmi_cfg { if ($phys_m->{method} eq 'cdrom') { $medium->{url} =~ s!^/tmp/image!cdrom://!; # main media $medium->{url} =~ s!^$phys_m->{real_mntpoint}/!cdrom://!; # supplementary medium - } elsif ($phys_m->{method} eq 'nfs') { - $medium->{url} =~ s!^$::prefix!!; + } elsif (member($phys_m->{method}, qw(disk nfs))) { + # use the real mount point: + if ($medium->{url} =~ m!/tmp/image!) { + $medium->{url} =~ s!/tmp/image!$phys_m->{mntpoint}!; + } else { + # just remove $::prefix and we already have the real mount point: + $medium->{url} =~ s!^$::prefix!!; + } } } urpm::media::write_config($urpm); -- cgit v1.2.1