summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-09 11:24:46 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-09 11:24:46 +0000
commit273bd2d7195614a8896d882dfa1784c3c4e9def9 (patch)
tree83226242698b602089bcbbfd4478235b8e431b56 /perl-install/install
parent0da877b7b3fb540a9963783ba132a3b94d1af6f2 (diff)
downloaddrakx-273bd2d7195614a8896d882dfa1784c3c4e9def9.tar
drakx-273bd2d7195614a8896d882dfa1784c3c4e9def9.tar.gz
drakx-273bd2d7195614a8896d882dfa1784c3c4e9def9.tar.bz2
drakx-273bd2d7195614a8896d882dfa1784c3c4e9def9.tar.xz
drakx-273bd2d7195614a8896d882dfa1784c3c4e9def9.zip
(_adjust_paths_in_urpmi_cfg) introduce it in order to fix media for
post-installation usage (especially fix CD-ROM based media path)
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/media.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index fe43c049a..21a85cfdb 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -532,6 +532,8 @@ sub get_media {
urpm::media::update_media($packages, distrib => 1, callback => \&urpm::download::sync_logger) or
log::l('updating media failed');
+ _adjust_paths_in_urpmi_cfg($o, $phys_m);
+
urpm::media::configure($packages);
log::l('urpmi completely set up');
@@ -539,6 +541,20 @@ sub get_media {
$suppl_CDs, $copy_rpms_on_disk;
}
+sub _adjust_paths_in_urpmi_cfg {
+ my ($o, $phys_m) = @_;
+ if ($o->{stage2_phys_medium}{method} eq 'cdrom') {
+ my $urpm = install::pkgs::empty_packages();
+ # force rereading media:
+ undef $urpm->{media};
+ urpm::media::read_config($urpm);
+ foreach my $medium (@{$urpm->{media}}) {
+ $medium->{url} =~ s!^$phys_m->{real_mntpoint}/!cdrom://!;
+ }
+ urpm::media::write_config($urpm);
+ }
+}
+
sub remove_from_fstab {
my ($all_hds, $phys_m) = @_;