diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-04-08 13:50:47 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-04-08 13:50:47 +0000 |
commit | 466914b686743c012eeb9b8444d8756efe6e73dc (patch) | |
tree | efc90a66216a393f7aa2112f2114ac9cae7927fa /perl-install/install/media.pm | |
parent | a486197c38728f783e202d9047059a86d88aee6c (diff) | |
download | drakx-backup-do-not-use-466914b686743c012eeb9b8444d8756efe6e73dc.tar drakx-backup-do-not-use-466914b686743c012eeb9b8444d8756efe6e73dc.tar.gz drakx-backup-do-not-use-466914b686743c012eeb9b8444d8756efe6e73dc.tar.bz2 drakx-backup-do-not-use-466914b686743c012eeb9b8444d8756efe6e73dc.tar.xz drakx-backup-do-not-use-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
Diffstat (limited to 'perl-install/install/media.pm')
-rw-r--r-- | perl-install/install/media.pm | 10 |
1 files changed, 8 insertions, 2 deletions
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); |