From 2ee78f3a9058098c7bdb9085bc5872662459755f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 28 Aug 2001 20:42:12 +0000 Subject: propose to format / and /usr even if isFormatted. More generally do not trust isFormatted to show which partitions to format --- perl-install/install_steps.pm | 4 +++- perl-install/install_steps_interactive.pm | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 1d4430359..769ac6871 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -225,9 +225,11 @@ sub choosePartitionsToFormat($$) { $_->{mntpoint} or next; add2hash_($_, { toFormat => $_->{notFormatted} }); + $_->{toFormatUnsure} = member($_->{mntpoint}, '/', '/usr'); + if (!$_->{toFormat}) { my $t = fsedit::typeOfPart($_->{device}); - $_->{toFormatUnsure} = member($_->{mntpoint}, '/', '/usr') || + $_->{toFormatUnsure} ||= #- if detected dos/win, it's not precise enough to just compare the types (too many of them) (!$t || isOtherAvailableFS({ type => $t }) ? !isOtherAvailableFS($_) : $t != $_->{type}); } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 5b892e3eb..3954d9ad1 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -386,7 +386,7 @@ sub choosePartitionsToFormat { $o->SUPER::choosePartitionsToFormat($fstab); - my @l = grep { !$_->{isMounted} && !$_->{isFormatted} && $_->{mntpoint} && (!isSwap($_) || $::expert) && + my @l = grep { !$_->{isMounted} && $_->{mntpoint} && (!isSwap($_) || $::expert) && (!isOtherAvailableFS($_) || $::expert || $_->{toFormat}) } @$fstab; $_->{toFormat} = 1 foreach grep { isSwap($_) && !$::expert } @$fstab; @@ -412,7 +412,10 @@ sub choosePartitionsToFormat { })) } @l ] ) or die 'already displayed'; #- ok now we can really set toFormat - $_->{toFormat} = delete $_->{toFormatTmp} foreach @l; + foreach (@l) { + $_->{toFormat} = delete $_->{toFormatTmp}; + $_->{isFormatted} = 0; + } } -- cgit v1.2.1