summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-04-08 09:31:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-04-08 09:31:02 +0000
commitcc27bc0b84588462cafc2a5f88e61c40e96ab862 (patch)
treec1ba5ff2d01b93a80ae89bc991fff7d953c06910
parentc62be777c119b9c79d4c99de8500ac6c3272ff0a (diff)
downloaddrakx-cc27bc0b84588462cafc2a5f88e61c40e96ab862.tar
drakx-cc27bc0b84588462cafc2a5f88e61c40e96ab862.tar.gz
drakx-cc27bc0b84588462cafc2a5f88e61c40e96ab862.tar.bz2
drakx-cc27bc0b84588462cafc2a5f88e61c40e96ab862.tar.xz
drakx-cc27bc0b84588462cafc2a5f88e61c40e96ab862.zip
from HEAD (r231112 2007-10-17):
/dev/<vg_name> 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
-rw-r--r--perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl46
1 files changed, 46 insertions, 0 deletions
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;
+ }
+};