summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-08 13:50:47 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-08 13:50:47 +0000
commit466914b686743c012eeb9b8444d8756efe6e73dc (patch)
treeefc90a66216a393f7aa2112f2114ac9cae7927fa
parenta486197c38728f783e202d9047059a86d88aee6c (diff)
downloaddrakx-466914b686743c012eeb9b8444d8756efe6e73dc.tar
drakx-466914b686743c012eeb9b8444d8756efe6e73dc.tar.gz
drakx-466914b686743c012eeb9b8444d8756efe6e73dc.tar.bz2
drakx-466914b686743c012eeb9b8444d8756efe6e73dc.tar.xz
drakx-466914b686743c012eeb9b8444d8756efe6e73dc.zip
(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
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/media.pm10
2 files changed, 9 insertions, 2 deletions
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);