From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: liming.gao@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Thu, 25 Apr 2019 18:32:26 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2019 18:32:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,395,1549958400"; d="scan'208";a="145819564" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 25 Apr 2019 18:32:26 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 25 Apr 2019 18:32:23 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.92]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.149]) with mapi id 14.03.0415.000; Fri, 26 Apr 2019 09:32:21 +0800 From: "Liming Gao" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Feng, Bob C" Subject: Re: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref Thread-Topic: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref Thread-Index: AdT7z27Xt93sAljaQMiqFviIVgbxeAAAG1rQ Date: Fri, 26 Apr 2019 01:32:20 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E430F19@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: 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 Zhiju: Is there one BZ for it? >-----Original Message----- >From: Fan, ZhijuX >Sent: Friday, April 26, 2019 9:31 AM >To: devel@edk2.groups.io >Cc: Gao, Liming ; Feng, Bob C >Subject: [PATCH] BaseTools:Fixed an issue where the order of Guids changed >in guid.xref > >Add content to dsc >[PcdsPatchableInModule.common] > gEfiMdeModulePkgTokenSpaceGuid.test1|FALSE > >Compare the 2 times build result,the order of file Guid.xref change >The root cause is set() is used in Get all the PCDS >the order of the data may change if set() is used > >This patch is going to fix that issue. > >Cc: Bob Feng >Cc: Liming Gao >Signed-off-by: Zhiju.Fan >--- > BaseTools/Source/Python/Workspace/DscBuildData.py | 20 ++++++++++----- >----- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >b/BaseTools/Source/Python/Workspace/DscBuildData.py >index 5431296b5a..1d7a6a11b8 100644 >--- a/BaseTools/Source/Python/Workspace/DscBuildData.py >+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >@@ -1632,7 +1632,7 @@ class DscBuildData(PlatformBuildClassObject): > AvailableSkuIdSet =3D copy.copy(self.SkuIds) > > 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() >@@ -1643,11 +1643,11 @@ class DscBuildData(PlatformBuildClassObject): > EdkLogger.error('build ', PARAMETER_INVALID, 'Sku %s is n= ot defined >in [SkuIds] section' % SkuName, > File=3Dself.MetaFile, Line=3D= Dummy5) > if SkuName in (self.SkuIdMgr.SystemSkuId, TAB_DEFAULT, >TAB_COMMON): >- if "." not in TokenSpaceGuid and "[" not in PcdCName: >- PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, Dummy5= )) >+ if "." not in TokenSpaceGuid and "[" not in PcdCName and >(PcdCName, TokenSpaceGuid, SkuName, Dummy5) not in PcdList: >+ PcdList.append((PcdCName, TokenSpaceGuid, SkuName, >Dummy5)) > PcdDict[Arch, PcdCName, TokenSpaceGuid, SkuName] =3D Sett= ing > >- for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet: >+ for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList: > Setting =3D PcdDict[self._Arch, PcdCName, TokenSpaceGuid, Sku= Name] > if Setting is None: > continue >@@ -2700,7 +2700,7 @@ class DscBuildData(PlatformBuildClassObject): > if SkuName not in AvailableSkuIdSet: > EdkLogger.error('build', PARAMETER_INVALID, 'Sku %s is no= t defined >in [SkuIds] section' % SkuName, > File=3Dself.MetaFile, Line=3D= Dummy5) >- if "." not in TokenSpaceGuid and "[" not in PcdCName: >+ if "." not in TokenSpaceGuid and "[" not in PcdCName and (Pcd= CName, >TokenSpaceGuid, SkuName, Dummy5) not in PcdList: > PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5= )) > PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] =3D Setting > >@@ -2852,7 +2852,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) >@@ -2873,13 +2873,13 @@ class DscBuildData(PlatformBuildClassObject): > if DefaultStore not in DefaultStoresDefine: > EdkLogger.error('build', PARAMETER_INVALID, 'DefaultStore= s %s is >not defined in [DefaultStores] section' % DefaultStore, > File=3Dself.MetaFile, Line=3D= Dummy5) >- if "." not in TokenSpaceGuid and "[" not in PcdCName: >- PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultSto= re, >Dummy5)) >+ if "." not in TokenSpaceGuid and "[" not in PcdCName and (Pcd= CName, >TokenSpaceGuid, SkuName, DefaultStore, Dummy5) not in PcdList: >+ PcdList.append((PcdCName, TokenSpaceGuid, SkuName, >DefaultStore, Dummy5)) > PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, DefaultStore= ] =3D >Setting > > > # Remove redundant PCD candidates, per the ARCH and SKU >- for PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy4 in >PcdSet: >+ for PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy4 in >PcdList: > > Setting =3D PcdDict[self._Arch, SkuName, PcdCName, TokenSpace= Guid, >DefaultStore] > if Setting is None: >@@ -3036,7 +3036,7 @@ class DscBuildData(PlatformBuildClassObject): > if SkuName not in AvailableSkuIdSet: > EdkLogger.error('build', PARAMETER_INVALID, 'Sku %s is no= t defined >in [SkuIds] section' % SkuName, > File=3Dself.MetaFile, Line=3D= Dummy5) >- if "." not in TokenSpaceGuid and "[" not in PcdCName: >+ if "." not in TokenSpaceGuid and "[" not in PcdCName and (Pcd= CName, >TokenSpaceGuid, SkuName, Dummy5) not in PcdList: > PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5= )) > PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] =3D Setting > >-- >2.14.1.windows.1