From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.12837.1571014936628150110 for ; Sun, 13 Oct 2019 18:02:16 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2019 18:02:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,294,1566889200"; d="scan'208";a="346601931" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 13 Oct 2019 18:02:15 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 13 Oct 2019 18:02:15 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 13 Oct 2019 18:02:10 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.166]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.165]) with mapi id 14.03.0439.000; Mon, 14 Oct 2019 09:02:08 +0800 From: "Bob Feng" To: "Gao, Liming" , "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+sEmcFtrCkyM1FDyoATegKdWFdYAgANWSmA= Date: Mon, 14 Oct 2019 01:02:07 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16154936D@SHSMSX104.ccr.corp.intel.com> References: <20190927023017.20424-1-bob.c.feng@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E5162C8@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E5162C8@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed at a1f94045ffe9218ec438c4d23980de4243d21cd0 -----Original Message----- From: Gao, Liming=20 Sent: Saturday, October 12, 2019 2:04 PM To: Feng, Bob C ; devel@edk2.groups.io Subject: RE: [Patch 1/1] BaseTools: Fix a bug of genffs command generation 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=20 > >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=20 >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('=20 >'.join(Cmd).strip()) >-- >2.20.1.windows.1