summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
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) = @_;