From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=zhiqiangx.zhao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 3676521AE30DB for ; Tue, 25 Sep 2018 00:15:49 -0700 (PDT) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 00:15:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,301,1534834800"; d="scan'208,223";a="75696528" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 25 Sep 2018 00:15:34 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 00:15:34 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 00:15:33 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.220]) by shsmsx102.ccr.corp.intel.com ([169.254.2.140]) with mapi id 14.03.0319.002; Tue, 25 Sep 2018 15:15:31 +0800 From: "Zhao, ZhiqiangX" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH V2] BaseTools: Code should not update the variable that save the raw data. Thread-Index: AdRUn1+NpvIOkyH2SMCATQWq4SsIfQ== Date: Tue, 25 Sep 2018 07:15:31 +0000 Message-ID: <3EDA9EC575A99E4E8A20D2F1972405306F83FBB7@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH V2] BaseTools: Code should not update the variable that save the raw data. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 07:15:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, I have update the patch title with more information, please check the attac= hed patch file. Best Regards, Zhiqiang Zhao -----Original Message----- From: Gao, Liming=20 Sent: Tuesday, September 25, 2018 9:05 AM To: Zhao, ZhiqiangX ; edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Feng, Bob C Subject: RE: [PATCH] BaseTools: Correct the SkuOverwrite. Zhiqiang: Please update patch title with more information to describe the correct b= ehavior.=20 >-----Original Message----- >From: Zhao, ZhiqiangX >Sent: Wednesday, September 12, 2018 11:25 AM >To: edk2-devel@lists.01.org >Cc: Zhao, ZhiqiangX ; Gao, Liming=20 >; Zhu, Yonghong ; Feng,=20 >Bob C >Subject: [PATCH] BaseTools: Correct the SkuOverwrite. > >StructurePcd, SkuA does not define any structure pcd overwrite, But=20 >SkuA inherit from DEFAULT sku, and DEFAULT sku define structure pcd=20 >overwrite, the pcd value of SkuA should same with DEFAULT sku. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: ZhiqiangX Zhao >Cc: Liming Gao >Cc: Yonghong Zhu >Cc: Bob Feng >--- > BaseTools/Source/Python/Workspace/DscBuildData.py | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >b/BaseTools/Source/Python/Workspace/DscBuildData.py >index aaef404772..5321101def 100644 >--- a/BaseTools/Source/Python/Workspace/DscBuildData.py >+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >@@ -1838,12 +1838,15 @@ class DscBuildData(PlatformBuildClassObject): > IsArray =3D IsFieldValueAnArray(FieldList[FieldName][= 0]) > if IsArray: > try: >- FieldList[FieldName][0] =3D >ValueExpressionEx(FieldList[FieldName][0], TAB_VOID,=20 >self._GuidDict)(True) >+ FieldValue =3D=20 >+ ValueExpressionEx(FieldList[FieldName][0], >TAB_VOID, self._GuidDict)(True) > except BadExpression: > EdkLogger.error('Build', FORMAT_INVALID,=20 >"Invalid value format for %s. From %s Line %d " % > =20 >(".".join((Pcd.TokenSpaceGuidCName, >Pcd.TokenCName, FieldName)), FieldList[FieldName][1], >FieldList[FieldName][2])) > try: >- Value, ValueSize =3D ParseFieldValue (FieldList[F= ieldName][0]) >+ if IsArray: >+ Value, ValueSize =3D ParseFieldValue (FieldVa= lue) >+ else: >+ Value, ValueSize =3D ParseFieldValue=20 >+ (FieldList[FieldName][0]) > except Exception: > EdkLogger.error('Build', FORMAT_INVALID,=20 >"Invalid value format for %s. From %s Line %d " %=20 >(".".join((Pcd.TokenSpaceGuidCName, >Pcd.TokenCName, FieldName)), FieldList[FieldName][1], >FieldList[FieldName][2])) > if isinstance(Value, str): >-- >2.14.1.windows.1