summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-03 19:52:49 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-03 19:52:49 +0000
commitc7082b46f4345ffb061b317785055cdb945289e3 (patch)
tree310364b8d2d8e7a1ba69080ab8a955e0099e6237 /perl-install/install
parent045b5965c34ffc1e18d01297f351d8fdb3e72c67 (diff)
downloaddrakx-c7082b46f4345ffb061b317785055cdb945289e3.tar
drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.gz
drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.bz2
drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.xz
drakx-c7082b46f4345ffb061b317785055cdb945289e3.zip
Skip setupSCSI step when run with --local_install (mga#24278)
In a local install, we don't have udev running, so the setupSCSI step will hang if it tries to probe for logical volumes (lvm2 uses udev). A local install is used to test the installer (drakx_in_chroot) and to build the Live ISOs (draklive2), and in both cases we don't really want the install to be affected by the hardware of the host system. Skipping the setupSCSI step means $o->{fstab} contains no entries, so we add a fake entry for our chroot, to allow us to pass the subsequent check that we have a root partition.
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/install2.pm2
-rw-r--r--perl-install/install/steps.pm8
3 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 85bf6207c..96398a3f0 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- skip setupSCSI step when run with --local_install (mga#24278)
- don't install nonfree graphics drivers when not wanted (mga#24172)
- don't select default bootloader when building Live ISOs
- improve exitInstall message (mga#24046)
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index d214d8448..bd037cf04 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -159,7 +159,7 @@ sub selectMouse {
sub setupSCSI {
my ($auto) = @_;
- installStepsCall($o, $auto, 'setupSCSI');
+ installStepsCall($o, $auto, 'setupSCSI') if !$::local_install;
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index 91e90e042..5dd31bf62 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -194,11 +194,13 @@ sub doPartitionDisksAfter {
log::l("fdisk after\n" . any::fdisk());
if ($::local_install) {
- my $p = fs::get::mntpoint2part($::prefix, [ fs::read_fstab('', '/proc/mounts') ]);
- my $part = find { fs::get::is_same_hd($p, $_) } @{$o->{fstab}};
- $part ||= $o->{fstab}[0];
+ #- We skipped the setupSCSI step, so $o->{fstab} will be empty. We need to
+ #- add a fake entry, to satisfy the following check for a root partition.
+ my $fstab = [ fs::read_fstab('', '/proc/mounts') ];
+ my $part = fs::get::mntpoint2part($::prefix, $fstab) || $fstab[0];
$part->{mntpoint} = '/';
$part->{isMounted} = 1;
+ $o->{fstab} = [ $part ];
}
fs::any::check_hds_boot_and_root($o->{all_hds}, $o->{fstab}, $o->{isUpgrade}, $o->{match_all_hardware});