From patchwork Fri Mar 18 17:09:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 8622351 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 824EBC0553 for ; Fri, 18 Mar 2016 17:11:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F7D62034F for ; Fri, 18 Mar 2016 17:11:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6AB2202F2 for ; Fri, 18 Mar 2016 17:11:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agxu8-0006ro-C2; Fri, 18 Mar 2016 17:09:40 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agxu7-0006qc-ON for xen-devel@lists.xenproject.org; Fri, 18 Mar 2016 17:09:39 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id 0D/9A-03497-3563CE65; Fri, 18 Mar 2016 17:09:39 +0000 X-Env-Sender: prvs=8782d2786=Ian.Jackson@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1458320976!32339557!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3672 invoked from network); 18 Mar 2016 17:09:38 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Mar 2016 17:09:38 -0000 X-IronPort-AV: E=Sophos;i="5.24,356,1454976000"; d="scan'208";a="340273540" From: Ian Jackson To: Date: Fri, 18 Mar 2016 17:09:10 +0000 Message-ID: <1458320955-2556-2-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1458320955-2556-1-git-send-email-ian.jackson@eu.citrix.com> References: <1458320955-2556-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" 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 a shell function to do the same thing. No callers yet. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 7 +++++++ cri-getconfig | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index d3eff1e..f3c2f63 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -46,6 +46,7 @@ BEGIN { preseed_hook_cmds di_installcmdline_core di_vg_name + cfg_tftp_di_version ); %EXPORT_TAGS = ( ); @@ -1358,6 +1359,12 @@ sub preseed_hook_cmds () { return $preseed; } +sub cfg_tftp_di_version ($) { + my ($suite) = @_; + $suite //= 'x def suite'; # will not find $c{...} + return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion}; +} + sub debian_guest_suite ($) { my ($gho) = @_; diff --git a/cri-getconfig b/cri-getconfig index 7b75700..8b76f32 100644 --- a/cri-getconfig +++ b/cri-getconfig @@ -25,6 +25,15 @@ getconfig () { ' } +getconfig_TftpDiVersion_suite () { + perl -e ' + use Osstest; + use Osstest::Debian; + readglobalconfig(); + print cfg_tftp_di_version($ARGV[0]) or die $!; + ' "$1" +} + getrepos() { local repos=`getconfig Repos` if [ -z "$repos" ] ; then