summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-24 15:28:49 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-24 15:28:49 +0000
commit547f6a3af8ad778374d8b4e6df39ba91f04d37e5 (patch)
tree2d59f07df7e636f0a9fd444c377b5acb9197376e
parent658246c020301b05fa21ec3786506178ade579f8 (diff)
downloaddrakx-547f6a3af8ad778374d8b4e6df39ba91f04d37e5.tar
drakx-547f6a3af8ad778374d8b4e6df39ba91f04d37e5.tar.gz
drakx-547f6a3af8ad778374d8b4e6df39ba91f04d37e5.tar.bz2
drakx-547f6a3af8ad778374d8b4e6df39ba91f04d37e5.tar.xz
drakx-547f6a3af8ad778374d8b4e6df39ba91f04d37e5.zip
split partitionWizard_ask out of partitionWizard and use it (i.e. make the wizard really die when it is cancelled)
-rwxr-xr-xlive/draklive-install/draklive-install2
-rw-r--r--live/draklive-install/install_interactive.pm15
2 files changed, 12 insertions, 5 deletions
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;
}