From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 F388B21A00AE6 for ; Mon, 24 Sep 2018 18:04:48 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 18:04:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,300,1534834800"; d="scan'208";a="89020503" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 24 Sep 2018 18:04:48 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 24 Sep 2018 18:04:47 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.183]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.220]) with mapi id 14.03.0319.002; Tue, 25 Sep 2018 09:04:45 +0800 From: "Gao, Liming" To: "Zhao, ZhiqiangX" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Correct the SkuOverwrite. Thread-Index: AQHUSkg5lD54FmTE00a+qr+eSA/ErKUAQqbQ Date: Tue, 25 Sep 2018 01:04:45 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3177CF@SHSMSX104.ccr.corp.intel.com> References: <20180912032451.17076-1-zhiqiangx.zhao@intel.com> In-Reply-To: <20180912032451.17076-1-zhiqiangx.zhao@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 Subject: Re: [PATCH] BaseTools: Correct the SkuOverwrite. 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 01:04:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 >; Zhu, Yonghong ; Feng, >Bob C >Subject: [PATCH] BaseTools: Correct the SkuOverwrite. > >StructurePcd, SkuA does not define any structure pcd overwrite, >But SkuA inherit from DEFAULT sku, and DEFAULT sku define >structure pcd 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, self._GuidDict)(True) >+ FieldValue =3D ValueExpressionEx(FieldList[Fi= eldName][0], >TAB_VOID, self._GuidDict)(True) > except BadExpression: > EdkLogger.error('Build', FORMAT_INVALID, "Inv= alid value >format for %s. From %s Line %d " % > (".".join((Pcd.TokenSpaceGuid= CName, >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 (FieldLi= st[FieldName][0]) > except Exception: > EdkLogger.error('Build', FORMAT_INVALID, "Invalid= value format >for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, >Pcd.TokenCName, FieldName)), FieldList[FieldName][1], >FieldList[FieldName][2])) > if isinstance(Value, str): >-- >2.14.1.windows.1