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.20; helo=mga02.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 1D53E211D56C4 for ; Tue, 5 Mar 2019 22:05:18 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2019 22:05:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,446,1544515200"; d="scan'208";a="149667400" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 05 Mar 2019 22:05:17 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 5 Mar 2019 22:05:16 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.57]) with mapi id 14.03.0415.000; Wed, 6 Mar 2019 14:05:15 +0800 From: "Fan, ZhijuX" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [edk2][PATCH] BaseTools:Guid.xref will change after increment build Thread-Index: AdTTL4rqmwksWt6zTG6q15/Zd9KJxQACLCFwACpSoEA= Date: Wed, 6 Mar 2019 06:05:14 +0000 Message-ID: References: <08650203BA1BD64D8AD9B6D5D74A85D1600A877D@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D1600A877D@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: FW: [PATCH] BaseTools:Guid.xref will change after increment build 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: Wed, 06 Mar 2019 06:05:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi: The items to be added to the PcdList are "(PcdCName, TokenSpaceGuid, SkuNa= me, DefaultStore, Dummy5)" "Dummy5" can distinguish PCDS with the same name, So the results are consis= tent except for the order change. Any question, please let me know. Thanks. Best Regards Fan Zhiju -----Original Message----- From: Feng, Bob C=20 Sent: Tuesday, March 5, 2019 5:48 PM To: Fan, ZhijuX ; edk2-devel@lists.01.org Cc: Gao, Liming Subject: RE: [edk2][PATCH] BaseTools:Guid.xref will change after increment = build Hi Zhiju, Since you changed a set() to a list, I think you need to check if the item= is already in the list before appending it. Thanks, Bob -----Original Message----- From: Fan, ZhijuX Sent: Tuesday, March 5, 2019 4:48 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Feng, Bob C Subject: [edk2][PATCH] BaseTools:Guid.xref will change after increment buil= d the order of the data may change if set() is used Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Workspace/DscBuildData.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 5e7d7dcd63..342b9472a2 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1654,7 +1654,7 @@ class DscBuildData(PlatformBuildClassObject): AvailableSkuIdSet =3D copy.copy(self.SkuIds) =20 PcdDict =3D tdict(True, 4) - PcdSet =3D set() + PcdList =3D [] # Find out all possible PCD candidates for self._Arch RecordList =3D self._RawData[Type, self._Arch] PcdValueDict =3D OrderedDict() @@ -1666,10 +1666,10 @@ class DscBuildData(PlatformBuildClassObject): File=3Dself.MetaFile, Line=3DD= ummy5) if SkuName in (self.SkuIdMgr.SystemSkuId, TAB_DEFAULT, TAB_COM= MON): if "." not in TokenSpaceGuid and "[" not in PcdCName: - PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, Dummy5)= ) + PcdList.append((PcdCName, TokenSpaceGuid, SkuName, + Dummy5)) PcdDict[Arch, PcdCName, TokenSpaceGuid, SkuName] =3D Setti= ng =20 - for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet: + for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList: Setting =3D PcdDict[self._Arch, PcdCName, TokenSpaceGuid, SkuN= ame] if Setting is None: continue @@ -2874,7 +2874,7 @@ class DscBuildData(PlatformBuildClassObject): # PCD settings for certain ARCH and SKU # PcdDict =3D tdict(True, 5) - PcdSet =3D set() + PcdList =3D [] RecordList =3D self._RawData[Type, self._Arch] # Find out all possible PCD candidates for self._Arch AvailableSkuIdSet =3D copy.copy(self.SkuIds) @@ -2896,12 +2896,12 = @@ class DscBuildData(PlatformBuildClassObject): EdkLogger.error('build', PARAMETER_INVALID, 'DefaultStores= %s is not defined in [DefaultStores] section' % DefaultStore, File=3Dself.MetaFile, Line=3DD= ummy5) if "." not in TokenSpaceGuid and "[" not in PcdCName: - PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultStor= e, Dummy5)) + PcdList.append((PcdCName, TokenSpaceGuid, SkuName,=20 + DefaultStore, Dummy5)) PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, DefaultStore]= =3D Setting =20 =20 # Remove redundant PCD candidates, per the ARCH and SKU - for PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy4 in Pcd= Set: + for PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy4 in Pcd= List: =20 Setting =3D PcdDict[self._Arch, SkuName, PcdCName, TokenSpaceG= uid, DefaultStore] if Setting is None: -- 2.14.1.windows.1