From patchwork Mon Jan 18 14:28:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8055061 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 89A519F818 for ; Mon, 18 Jan 2016 14:31:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0CDE203AB for ; Mon, 18 Jan 2016 14:31:55 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B38C4203A9 for ; Mon, 18 Jan 2016 14:31:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLAo8-0001Y0-HB; Mon, 18 Jan 2016 14:29:24 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLAo6-0001X1-GJ for xen-devel@lists.xen.org; Mon, 18 Jan 2016 14:29:22 +0000 Received: from [193.109.254.147] by server-7.bemta-14.messagelabs.com id 72/36-28221-1C6FC965; Mon, 18 Jan 2016 14:29:21 +0000 X-Env-Sender: prvs=818d0ce80=Ian.Campbell@citrix.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1453127359!17659173!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59403 invoked from network); 18 Jan 2016 14:29:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jan 2016 14:29:21 -0000 X-IronPort-AV: E=Sophos;i="5.22,312,1449532800"; d="scan'208";a="332157253" From: Ian Campbell To: , Date: Mon, 18 Jan 2016 14:28:46 +0000 Message-ID: <1453127337-16136-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1453127319.6020.156.camel@citrix.com> References: <1453127319.6020.156.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell Subject: [Xen-devel] [PATCH OSSTEST v2 01/12] Debian: Abolish $suite and $xopts{Suite} from preseed_* interfaces. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Generating a preseed for a suite which does not match the ->{Suite} of the underlying guest or host object does not seem useful, so remove this option and use ->{Suite} instead. For guests ->{Suite} is set by debian_guest_suite() (which is called from preseed_guest_create(), although it is often also called prior to that) and by selectguest() For hosts $ho->{Suite} is initialised by selecthost if we are in the context of a $job (and if we aren't we had best not be trying to reinstall a host). Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- Osstest/Debian.pm | 14 ++++++++------ ts-debian-di-install | 1 - ts-debian-hvm-install | 2 +- ts-host-install | 1 - 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 76171c0..93b0ad4 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -794,8 +794,10 @@ sub debian_overlays ($) { $func->('overlay', 'overlay.tar'); } -sub preseed_base ($$$$;@) { - my ($ho,$suite,$sfx,$extra_packages,%xopts) = @_; +sub preseed_base ($$$;@) { + my ($ho,$sfx,$extra_packages,%xopts) = @_; + + my $suite = $ho->{Suite}; $xopts{ExtraPreseed} ||= ''; @@ -927,7 +929,7 @@ END sub preseed_create_guest ($$$;@) { my ($ho, $arch, $sfx, %xopts) = @_; - my $suite= $xopts{Suite} || $c{DebianSuite}; + my $suite= debian_guest_suite($ho); my $extra_packages = ""; if ($xopts{PvMenuLst}) { @@ -962,7 +964,7 @@ END } } - my $preseed_file= preseed_base($ho, $suite, $sfx, $extra_packages, %xopts); + my $preseed_file= preseed_base($ho, $sfx, $extra_packages, %xopts); $preseed_file.= (<{Suite}; my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'. $c{TftpDiVersion}.'-'.$ho->{Suite}; @@ -1192,7 +1194,7 @@ END my $extra_packages = join(",",@extra_packages); - my $preseed_file= preseed_base($ho,$suite,$sfx,$extra_packages,%xopts); + my $preseed_file= preseed_base($ho,$sfx,$extra_packages,%xopts); $preseed_file .= (<$suite, PvMenuLst=>$pvmenulst); $extra_disk = ""; diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index 96190a1..7521d57 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -55,7 +55,7 @@ our $gsuite; sub preseed () { - my $preseed_file = preseed_base($gho,$gsuite,'','',()); + my $preseed_file = preseed_base($gho,'','',()); my $disk = guest_var($gho,'diskdevice','/dev/xvda'); diff --git a/ts-host-install b/ts-host-install index cfa6044..eb740fa 100755 --- a/ts-host-install +++ b/ts-host-install @@ -59,7 +59,6 @@ sub install () { my ($ps_url,$ps_file)= preseed_create ($ho, '', - Suite => $ho->{Suite}, DiskDevice => $ho->{DiskDevice}, Properties => $ho->{Properties}, ExtraPreseed => <