From patchwork Fri Apr 26 16:39:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 10919393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8ADB5912 for ; Fri, 26 Apr 2019 16:42:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A57128DEB for ; Fri, 26 Apr 2019 16:42:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EAAE28E04; Fri, 26 Apr 2019 16:42:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2108828DEB for ; Fri, 26 Apr 2019 16:42:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hK3uf-00084R-FY; Fri, 26 Apr 2019 16:41:25 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hK3ue-00083v-7O for xen-devel@lists.xenproject.org; Fri, 26 Apr 2019 16:41:24 +0000 X-Inumbo-ID: 207be34f-6842-11e9-843c-bc764e045a96 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 207be34f-6842-11e9-843c-bc764e045a96; Fri, 26 Apr 2019 16:41:23 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,398,1549929600"; d="scan'208";a="84519669" From: Ian Jackson To: Date: Fri, 26 Apr 2019 17:39:50 +0100 Message-ID: <20190426164002.22381-4-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190426164002.22381-1-ian.jackson@eu.citrix.com> References: <20190426164002.22381-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 03/15] arch replumbing: ts-host-install: Move $kern_arch_info setting X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We are going to want to do this after selecthost. No functional change. Signed-off-by: Ian Jackson --- ts-host-install | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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, '',