From patchwork Mon Jan 18 14:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8055001 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1A29BEEE5 for ; Mon, 18 Jan 2016 14:31:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3354820382 for ; Mon, 18 Jan 2016 14:31:30 +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 E7C2E20430 for ; Mon, 18 Jan 2016 14:31:28 +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 1aLAoD-0001fH-FL; Mon, 18 Jan 2016 14:29:29 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLAoB-0001Xn-L7 for xen-devel@lists.xen.org; Mon, 18 Jan 2016 14:29:27 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id A9/09-25438-3C6FC965; Mon, 18 Jan 2016 14:29:23 +0000 X-Env-Sender: prvs=818d0ce80=Ian.Campbell@citrix.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1453127359!17659173!4 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 59592 invoked from network); 18 Jan 2016 14:29:23 -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:23 -0000 X-IronPort-AV: E=Sophos;i="5.22,312,1449532800"; d="scan'208";a="332157274" From: Ian Campbell To: , Date: Mon, 18 Jan 2016 14:28:52 +0000 Message-ID: <1453127337-16136-7-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 07/12] ts-debian-di-install: Allow Di Version to come from runvars 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 and following the lead of the suite arrange for a version selected from the defaults to be written back to the runvars. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- v2: s/diversion/di_version/ --- Osstest/Debian.pm | 15 ++++++++++++++- ts-debian-di-install | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 93b0ad4..daca0b7 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -35,7 +35,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw(debian_boot_setup debian_overlays - debian_guest_suite + debian_guest_suite debian_guest_di_version %preseed_cmds preseed_base preseed_create @@ -1352,4 +1352,17 @@ sub debian_guest_suite ($) { return $gho->{Suite}; } +sub debian_guest_di_version ($) { + my ($gho) = @_; + + $gho->{DiVersion} //= guest_var($gho,'di_version',undef); + + if (!$gho->{DiVersion}) { + $gho->{DiVersion} = $c{TftpDiVersion}; + store_runvar("$gho->{Guest}_di_version", $gho->{DiVersion}); + } + + return $gho->{DiVersion}; +} + 1; diff --git a/ts-debian-di-install b/ts-debian-di-install index 9a513d3..9875bef 100755 --- a/ts-debian-di-install +++ b/ts-debian-di-install @@ -151,7 +151,8 @@ sub setup_netboot($$$) die if $r{ "$gho->{Guest}_netboot_kernel" } || $r{ "$gho->{Guest}_netboot_ramdisk" }; - my $di_path = $c{TftpPath}.'/'.$ho->{Tftp}{DiBase}.'/'.${arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite}; + my $di_path = $c{TftpPath}.'/'.$ho->{Tftp}{DiBase}.'/'.${arch}.'/'.\ + debian_guest_diversion($ho).'-'.$ho->{Suite}; if (${arch} =~ m/amd64|i386/) { $kernel = "$di_path/vmlinuz-xen";