From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.2278.1570860240001148549 for ; Fri, 11 Oct 2019 23:04:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2019 23:03:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,286,1566889200"; d="scan'208";a="198912931" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 11 Oct 2019 23:03:59 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 23:03:58 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 23:03:58 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.166]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.225]) with mapi id 14.03.0439.000; Sat, 12 Oct 2019 14:03:57 +0800 From: "Liming Gao" To: "Feng, Bob C" , "devel@edk2.groups.io" Subject: Re: [Patch 1/1] BaseTools: Fix a bug of genffs command generation Thread-Topic: [Patch 1/1] BaseTools: Fix a bug of genffs command generation Thread-Index: AQHVdNud+eL8+q5m9kKV0HOQe/yNkqdWmjYA Date: Sat, 12 Oct 2019 06:03:56 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E5162C8@SHSMSX104.ccr.corp.intel.com> References: <20190927023017.20424-1-bob.c.feng@intel.com> In-Reply-To: <20190927023017.20424-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Bob: I think this version patch is correct, because this case uses the differe= nt command in Makefile instead of the different syntax.=20 The command 'test' depends on batch environment. It is only available in b= ash, not in ms-dos. So, the check condition should be OS instead of make co= mmand. Reviewed-by: Liming Gao Thanks Liming >-----Original Message----- >From: Feng, Bob C >Sent: Friday, September 27, 2019 10:30 AM >To: devel@edk2.groups.io >Cc: Gao, Liming ; Feng, Bob C >Subject: [Patch 1/1] BaseTools: Fix a bug of genffs command generation > >REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2221 > >The command used by multiple thread genffs feature in makefile >for testing if file exist is generated based on the toolchain family. >It should be based on the OS type. > >Cc: Liming Gao >Signed-off-by: Bob Feng >--- > BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py >b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py >index 4d8b2bdee299..bd97aa9dd208 100644 >--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py >+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py >@@ -11,10 +11,11 @@ > # > from __future__ import print_function > from __future__ import absolute_import > > import Common.LongFilePathOs as os >+import sys > from sys import stdout > from subprocess import PIPE,Popen > from struct import Struct > from array import array > >@@ -484,11 +485,11 @@ class GenFdsGlobalVariable: > Cmd +=3D ("-o", Output) > Cmd +=3D Input > > SaveFileOnChange(CommandFile, ' '.join(Cmd), False) > if IsMakefile: >- if GlobalData.gGlobalDefines.get("FAMILY") =3D=3D "MSFT": >+ if sys.platform =3D=3D "win32": > Cmd =3D ['if', 'exist', Input[0]] + Cmd > else: > Cmd =3D ['-test', '-e', Input[0], "&&"] + Cmd > if ' '.join(Cmd).strip() not in GenFdsGlobalVariable.SecC= mdList: > GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).= strip()) >-- >2.20.1.windows.1