From 46d08e1be390ef7edc422b0e3cd78de206cbfe41 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 6 Mar 2009 16:13:45 +0000 Subject: (get_media) fix setting urpmi media for CDROM installation whose tree differ from other types of installation (also fix getting compsUser.pl for CD-ROM) --- perl-install/install/NEWS | 3 +++ perl-install/install/media.pm | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install/install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index f487e03ef..a423b33d0 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- fix setting urpmi media for CDROM installation whose tree differ + from other types of installation + Version 12.6 - 5 March 2009 - make sure to popup errors diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index 5b6441b4c..2dbcc01d8 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -501,13 +501,18 @@ sub get_media { my $uri = $o->{stage2_phys_medium}{url} =~ m!^(http|ftp)://! && $o->{stage2_phys_medium}{url} || $phys_m->{method} =~ m!^(ftp|http)://! && $phys_m->{method} || $phys_m->{real_mntpoint} || $phys_m->{url}; + # adjust URI for cdroms if needed: + if ($o->{stage2_phys_medium}{method} eq 'cdrom') { + $uri .= "/" . arch(); + system('cp', "$uri/media/media_info/compssUsers.pl", '/tmp/compssUsers.pl'); + } else { + _get_compsUsers_pl($phys_m, $_->{force_rpmsrate}); + } urpm::media::add_distrib_media($packages, undef, $uri, ask_media => undef); #allmedia => 1 if (defined $_->{selected_names}) { select_only_some_media($packages, $_->{selected_names}); } - - _get_compsUsers_pl($phys_m, $_->{force_rpmsrate}); ($suppl_CDs, $copy_rpms_on_disk) = eval { _get_media_cfg_options($o, $phys_m) }; } elsif ($_->{type} eq 'media') { my $phys_m = url2mounted_phys_medium($o, $_->{url}); -- cgit v1.2.1