From nobody Sun Apr 28 12:15:41 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1489686785144301.648762608756; Thu, 16 Mar 2017 10:53:05 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 097AA80408; Thu, 16 Mar 2017 10:53:03 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D51D580407 for ; Thu, 16 Mar 2017 10:53:01 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 10:53:01 -0700 Received: from jljusten-skl.jf.intel.com ([10.54.75.22]) by fmsmga004.fm.intel.com with ESMTP; 16 Mar 2017 10:53:00 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489686781; x=1521222781; h=from:to:cc:subject:date:message-id; bh=Kj7ionZqKNesCQibvD1WABgnlnyIZTLzPw+SMFZ0hM8=; b=Ik80qNNxK2SNnJFJ5xkR2732uwhfCG1u8sZLtJ+Dhq2RwH9j5tCzABKj jLh4yr40IfEUyy+2WaI8yMK3FmKq8Q==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,173,1486454400"; d="scan'208";a="237182382" From: Jordan Justen To: edk2-devel@lists.01.org Date: Thu, 16 Mar 2017 10:52:58 -0700 Message-Id: <20170316175258.28091-1-jordan.l.justen@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] OvmfPkg/build.sh: Parse qemu version in more cases X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Laszlo Ersek MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since qemu v2.7.0, the pkgversion appears to have a bug: $ ./configure --target-list=3Dx86_64-softmmu --with-pkgversion=3Dfoo Results in this output: $ x86_64-softmmu/qemu-system-x86_64 -version QEMU emulator version 2.8.90(foo) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers This appears to have been introduced in: 67a1de0d19 Makefile: Derive "PKGVERSION" from "git describe" by default The previous commit (077de81a4c) produces this output: $ x86_64-softmmu/qemu-system-x86_64 -version QEMU emulator version 2.6.50 (foo), Copyright (c) 2003-2008 Fabrice Bellard Now the script use grep with '-o' to return only the matched text. grep -E is also used with a simple regex to extract only the digits of the version. qemu-bug: https://bugs.launchpad.net/bugs/1673373 Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen Reviewed-by: Laszlo Ersek --- OvmfPkg/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index b6e936056c..f1acd55883 100755 --- a/OvmfPkg/build.sh +++ b/OvmfPkg/build.sh @@ -223,7 +223,9 @@ if [ -z "$PLATFORMFILE" ]; then fi =20 if [[ "$RUN_QEMU" =3D=3D "yes" ]]; then - qemu_version=3D$($QEMU_COMMAND -version 2>&1 | tail -1 | awk '{print $4}= ') + qemu_version=3D$($QEMU_COMMAND -version 2>&1 | \ + grep -o -E 'version [0-9]+\.[0-9]+\.[0-9]+' | \ + awk '{print $2}') case $qemu_version in 1.[6-9].*|1.[1-9][0-9].*|2.*.*) ENABLE_FLASH=3Dyes --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel