From cc27bc0b84588462cafc2a5f88e61c40e96ab862 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Apr 2008 09:31:02 +0000 Subject: from HEAD (r231112 2007-10-17): /dev/ doesn't exist in drakx-in-chroot (why?), but at least it's not needed for lilo since we don't use lilo in chroot --- .../patch-drakx-in-chroot-with-LVM-present.pl | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl diff --git a/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl b/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl new file mode 100644 index 000000000..eb13ab569 --- /dev/null +++ b/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl @@ -0,0 +1,46 @@ +use install::install2; +package install::install2; + +log::l("PATCH: not copying LVM devices in local_install's"); + +undef *formatPartitions; +*formatPartitions = sub { + my ($auto) = @_; + + $o->{steps}{choosePackages}{done} = 0; + installStepsCall($o, $auto, 'choosePartitionsToFormat') if !$o->{isUpgrade} && !$::local_install; + my $want_root_formated = fs::get::root($o->{fstab})->{toFormat}; + if ($want_root_formated) { + foreach ('/usr') { + my $part = fs::get::mntpoint2part($_, $o->{fstab}) or next; + $part->{toFormat} or die N("You must also format %s", $_); + } + } + installStepsCall($o, $auto, 'formatMountPartitions') 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("$::prefix/var/lib/rpm") }; + } + + install::any::create_minimal_files(); + + eval { fs::mount::mount('none', "$::prefix/proc", 'proc') }; + eval { fs::mount::mount('none', "$::prefix/sys", 'sysfs') }; + eval { fs::mount::usbfs($::prefix) }; + + install::any::screenshot_dir__and_move(); + install::any::move_compressed_image_to_disk($o); + + any::rotate_logs($::prefix); + + require raid; + raid::write_conf($o->{all_hds}{raids}); + + #- needed by lilo + if (-d '/dev/mapper' && !$::local_install) { + my @vgs = map { $_->{VG_name} } @{$o->{all_hds}{lvms}}; + cp_af("/dev/$_", "$::prefix/dev") foreach 'mapper', @vgs; + } +}; -- cgit v1.2.1