diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-12-12 11:40:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-12-12 11:40:35 +0000 |
commit | 9b62a3001c09c69de94dee08756fc6fc0e97aba6 (patch) | |
tree | 6e4d93a30e379a12bc1ff77a28c39d6bc9fd32db /perl-install/install2.pm | |
parent | 2170e6234d981d174b5156bb31bd789b2e10a486 (diff) | |
download | drakx-9b62a3001c09c69de94dee08756fc6fc0e97aba6.tar drakx-9b62a3001c09c69de94dee08756fc6fc0e97aba6.tar.gz drakx-9b62a3001c09c69de94dee08756fc6fc0e97aba6.tar.bz2 drakx-9b62a3001c09c69de94dee08756fc6fc0e97aba6.tar.xz drakx-9b62a3001c09c69de94dee08756fc6fc0e97aba6.zip |
- ensure /usr is formatted if / is
- remove /var/lib/rpm if /var is kept
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r-- | perl-install/install2.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 304f4e75a..2ad1297b9 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -162,8 +162,21 @@ sub formatPartitions { $o->{steps}{choosePackages}{done} = 0; installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) if !$o->{isUpgrade}; + my $want_root_formated = fsedit::get_root($o->{fstab})->{toFormat}; + if ($want_root_formated) { + foreach ('/usr') { + my $part = fsedit::mntpoint2part($_, $o->{fstab}) or next; + $part->{toFormat} or die _("You must also format %s", $_); + } + } installStepsCall($o, $auto, 'formatMountPartitions', $o->{fstab}) if !$::testing; + if ($want_root_formated) { + #- we formatted /, ensure /var/lib/rpm is cleaned otherwise bad things can happen + #- (especially when /var is *not* formatted) + eval { rm_rf("$o->{prefix}/var/lib/rpm") }; + } + mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts etc/sysconfig/console/consolefonts |