From 622997696fb4a7bcedee2b81ddcf07598c3d2e52 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 18 Jun 2004 05:20:25 +0000 Subject: in disk-iso install, automatically choose and change ISO images, according to their volume id and application id --- perl-install/install_steps_interactive.pm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'perl-install/install_steps_interactive.pm') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 39c3729b3..7d948ca1d 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -384,7 +384,7 @@ sub choosePackages { #- this is done at the very beginning to take into account #- selection of CD by user if using a cdrom. - $o->chooseCD($packages) if $o->{method} eq 'cdrom' && !$::oem; + $o->chooseCD($packages) if $o->{method} =~ /(^cdrom|-iso)$/ && !$::oem; my $w = $o->wait_message('', N("Looking for available packages...")); my $availableC = &install_steps::choosePackages; @@ -683,17 +683,20 @@ sub installPackages { *install_any::changeMedium = sub { my ($method, $medium) = @_; - #- if not using a cdrom medium, always abort. - $method eq 'cdrom' && !$::oem and do { - my $name = pkgs::mediumDescr($o->{packages}, $medium); - local $| = 1; print "\a"; - my $r = $name !~ /commercial/i || ($o->{useless_thing_accepted2} ||= $o->ask_from_list_('', formatAlaTeX(install_messages::com_license()), [ N_("Accept"), N_("Refuse") ], "Accept") eq "Accept"); - $r &&= $o->ask_okcancel('', N("Change your Cd-Rom! + #- if not using a cdrom medium or an iso image, always abort. + return unless $method =~ /(^cdrom|-iso)$/ && !$::oem; + my $name = pkgs::mediumDescr($o->{packages}, $medium); + local $| = 1; print "\a"; + my $r = $name !~ /commercial/i || ($o->{useless_thing_accepted2} ||= $o->ask_from_list_('', formatAlaTeX(install_messages::com_license()), [ N_("Accept"), N_("Refuse") ], "Accept") eq "Accept"); + if ($method =~ /-iso$/) { + $r = install_any::changeIso($name); + } else { + $r &&= $o->ask_okcancel('', N("Change your Cd-Rom! Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done. If you don't have it, press Cancel to avoid installation from this Cd-Rom.", $name), 1); - return $r; - }; + } + return $r; }; my $install_result; catch_cdie { $install_result = $o->install_steps::installPackages($packages) } -- cgit v1.2.1