From 547f6a3af8ad778374d8b4e6df39ba91f04d37e5 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 24 Feb 2006 15:28:49 +0000 Subject: split partitionWizard_ask out of partitionWizard and use it (i.e. make the wizard really die when it is cancelled) --- live/draklive-install/draklive-install | 2 +- live/draklive-install/install_interactive.pm | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'live') diff --git a/live/draklive-install/draklive-install b/live/draklive-install/draklive-install index d43e94bed..38ab58dfa 100755 --- a/live/draklive-install/draklive-install +++ b/live/draklive-install/draklive-install @@ -69,7 +69,7 @@ my $title = N("Mandriva Live"); $w->main; } -install_interactive::partitionWizard($in); +install_interactive::partitionWizard_ask($in); $in->{prefix} = $::prefix = '/mnt/install'; mkdir_p($::prefix) or die "unable to create $::prefix"; diff --git a/live/draklive-install/install_interactive.pm b/live/draklive-install/install_interactive.pm index 738739a55..2705fe6ad 100644 --- a/live/draklive-install/install_interactive.pm +++ b/live/draklive-install/install_interactive.pm @@ -251,7 +251,7 @@ When you are done, do not forget to save using `w'", partition_table::descriptio %solutions; } -sub partitionWizard { +sub partitionWizard_ask { my ($o, $b_nodiskdrake) = @_; my %solutions = partitionWizardSolutions($o, $o->{all_hds}); @@ -277,9 +277,16 @@ sub partitionWizard { }, [ { val => \$sol, list => \@solutions, format => sub { $_[0][1] }, type => 'list' } ]); log::l("partitionWizard calling solution $sol->[1]"); - my $ok = eval { $sol->[2]->() }; - $@ and $o->ask_warn('', N("Partitioning failed: %s", formatError($@))); - $ok or goto &partitionWizard; + $sol->[2]->(); +} + +sub partitionWizard { + my ($o, $b_nodiskdrake) = @_; + eval { &partitionWizard_ask }; + if ($@) { + $o->ask_warn('', N("Partitioning failed: %s", formatError($@))); + goto &partitionWizard; + } 1; } -- cgit v1.2.1