diff mbox series

[OSSTEST,03/15] arch replumbing: ts-host-install: Move $kern_arch_info setting

Message ID 20190426164002.22381-4-ian.jackson@eu.citrix.com (mailing list archive)
State Superseded
Headers show
Series Do armhf kernel builds on amd64 | expand

Commit Message

Ian Jackson April 26, 2019, 4:39 p.m. UTC
We are going to want to do this after selecthost.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-host-install | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/ts-host-install b/ts-host-install
index 45f04764..3c14f171 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -31,7 +31,7 @@  my $debconf_priority;
 my $poweron_test_only;
 
 our %xopts;
-our $kern_arch_info;
+our $build;
 
 while (@ARGV and $ARGV[0] =~ m/^-/) {
     $_= shift @ARGV;
@@ -43,12 +43,7 @@  while (@ARGV and $ARGV[0] =~ m/^-/) {
     } elsif  (m/^--rescue$/) {
 	$xopts{RescueMode}= 1;
     } elsif  (m/^--build$/) {
-	if ($r{arch} eq 'i386') {
-	    $kern_arch_info = {
-                Kernel_Debian => 'amd64',
-                Userland_setarch => 'i386',
-            };
-	}
+	$build = 1;
     } else {
 	die "$_ $!";
     }
@@ -63,6 +58,17 @@  exit 0 if $ho->{SharedReady};
 our %timeout= qw(ReadPreseed  350
                  Sshd        2400);
 
+our $kern_arch_info;
+
+if ($build) {
+    if ($r{arch} eq 'i386') {
+	$kern_arch_info = {
+	    Kernel_Debian => 'amd64',
+	    Userland_setarch => 'i386',
+	};
+    }
+}
+
 sub install () {
     my ($ps_url,$ps_file)= preseed_create
         ($ho, '',