[edk2-devel] [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref

Fan, ZhijuX posted 1 patch 5 years ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Workspace/DscBuildData.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
[edk2-devel] [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref
Posted by Fan, ZhijuX 5 years ago
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 <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
 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 = copy.copy(self.SkuIds)
 
         PcdDict = tdict(True, 4)
-        PcdSet = set()
+        PcdList = []
         # Find out all possible PCD candidates for self._Arch
         RecordList = self._RawData[Type, self._Arch]
         PcdValueDict = OrderedDict()
@@ -1643,11 +1643,11 @@ class DscBuildData(PlatformBuildClassObject):
                 EdkLogger.error('build ', PARAMETER_INVALID, 'Sku %s is not defined in [SkuIds] section' % SkuName,
                                             File=self.MetaFile, Line=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] = Setting
 
-        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet:
+        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList:
             Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid, SkuName]
             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 not defined in [SkuIds] section' % SkuName,
                                             File=self.MetaFile, Line=Dummy5)
-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName, TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
 
@@ -2852,7 +2852,7 @@ class DscBuildData(PlatformBuildClassObject):
         # PCD settings for certain ARCH and SKU
         #
         PcdDict = tdict(True, 5)
-        PcdSet = set()
+        PcdList = []
         RecordList = self._RawData[Type, self._Arch]
         # Find out all possible PCD candidates for self._Arch
         AvailableSkuIdSet = copy.copy(self.SkuIds)
@@ -2873,13 +2873,13 @@ class DscBuildData(PlatformBuildClassObject):
             if DefaultStore not in DefaultStoresDefine:
                 EdkLogger.error('build', PARAMETER_INVALID, 'DefaultStores %s is not defined in [DefaultStores] section' % DefaultStore,
                                             File=self.MetaFile, Line=Dummy5)
-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
-                PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy5))
+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy5) not in PcdList:
+                PcdList.append((PcdCName, TokenSpaceGuid, SkuName, DefaultStore, Dummy5))
             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, DefaultStore] = 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 = PcdDict[self._Arch, SkuName, PcdCName, TokenSpaceGuid, 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 not defined in [SkuIds] section' % SkuName,
                                             File=self.MetaFile, Line=Dummy5)
-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName, TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
 
-- 
2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39603): https://edk2.groups.io/g/devel/message/39603
Mute This Topic: https://groups.io/mt/31348862/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref
Posted by Liming Gao 5 years ago
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 <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
>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 <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
>---
> 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 = copy.copy(self.SkuIds)
>
>         PcdDict = tdict(True, 4)
>-        PcdSet = set()
>+        PcdList = []
>         # Find out all possible PCD candidates for self._Arch
>         RecordList = self._RawData[Type, self._Arch]
>         PcdValueDict = OrderedDict()
>@@ -1643,11 +1643,11 @@ class DscBuildData(PlatformBuildClassObject):
>                 EdkLogger.error('build ', PARAMETER_INVALID, 'Sku %s is not defined
>in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=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] = Setting
>
>-        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet:
>+        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList:
>             Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid, SkuName]
>             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 not defined
>in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>@@ -2852,7 +2852,7 @@ class DscBuildData(PlatformBuildClassObject):
>         # PCD settings for certain ARCH and SKU
>         #
>         PcdDict = tdict(True, 5)
>-        PcdSet = set()
>+        PcdList = []
>         RecordList = self._RawData[Type, self._Arch]
>         # Find out all possible PCD candidates for self._Arch
>         AvailableSkuIdSet = copy.copy(self.SkuIds)
>@@ -2873,13 +2873,13 @@ class DscBuildData(PlatformBuildClassObject):
>             if DefaultStore not in DefaultStoresDefine:
>                 EdkLogger.error('build', PARAMETER_INVALID, 'DefaultStores %s is
>not defined in [DefaultStores] section' % DefaultStore,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>-                PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultStore,
>Dummy5))
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName,
>TokenSpaceGuid, SkuName, DefaultStore, Dummy5) not in PcdList:
>+                PcdList.append((PcdCName, TokenSpaceGuid, SkuName,
>DefaultStore, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, DefaultStore] =
>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 = PcdDict[self._Arch, SkuName, PcdCName, TokenSpaceGuid,
>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 not defined
>in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>--
>2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39604): https://edk2.groups.io/g/devel/message/39604
Mute This Topic: https://groups.io/mt/31348862/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

[edk2-devel] FW: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref
Posted by Fan, ZhijuX 5 years ago
Hi:

There is no, Need to create one?



Any question, please let me know. Thanks.

Best Regards
Fan Zhiju



-----Original Message-----
From: Gao, Liming 
Sent: Friday, April 26, 2019 9:32 AM
To: Fan, ZhijuX <zhijux.fan@intel.com>; devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>
Subject: RE: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref

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 <liming.gao@intel.com>; Feng, Bob C 
><bob.c.feng@intel.com>
>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 <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
>---
> 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 = copy.copy(self.SkuIds)
>
>         PcdDict = tdict(True, 4)
>-        PcdSet = set()
>+        PcdList = []
>         # Find out all possible PCD candidates for self._Arch
>         RecordList = self._RawData[Type, self._Arch]
>         PcdValueDict = OrderedDict()
>@@ -1643,11 +1643,11 @@ class DscBuildData(PlatformBuildClassObject):
>                 EdkLogger.error('build ', PARAMETER_INVALID, 'Sku %s 
>is not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=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] = 
>Setting
>
>-        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet:
>+        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList:
>             Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid, SkuName]
>             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 
>not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>@@ -2852,7 +2852,7 @@ class DscBuildData(PlatformBuildClassObject):
>         # PCD settings for certain ARCH and SKU
>         #
>         PcdDict = tdict(True, 5)
>-        PcdSet = set()
>+        PcdList = []
>         RecordList = self._RawData[Type, self._Arch]
>         # Find out all possible PCD candidates for self._Arch
>         AvailableSkuIdSet = copy.copy(self.SkuIds) @@ -2873,13 
>+2873,13 @@ class DscBuildData(PlatformBuildClassObject):
>             if DefaultStore not in DefaultStoresDefine:
>                 EdkLogger.error('build', PARAMETER_INVALID, 
>'DefaultStores %s is not defined in [DefaultStores] section' % DefaultStore,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>-                PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultStore,
>Dummy5))
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, DefaultStore, Dummy5) not in PcdList:
>+                PcdList.append((PcdCName, TokenSpaceGuid, SkuName,
>DefaultStore, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, 
>DefaultStore] = 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 = PcdDict[self._Arch, SkuName, PcdCName, 
>TokenSpaceGuid, 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 
>not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>--
>2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39606): https://edk2.groups.io/g/devel/message/39606
Mute This Topic: https://groups.io/mt/31348902/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref
Posted by Bob Feng 5 years ago
Yes. please file a new BZ for this issue.

-----Original Message-----
From: Fan, ZhijuX 
Sent: Friday, April 26, 2019 9:38 AM
To: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>
Cc: Feng, Bob C <bob.c.feng@intel.com>
Subject: FW: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref

Hi:

There is no, Need to create one?



Any question, please let me know. Thanks.

Best Regards
Fan Zhiju



-----Original Message-----
From: Gao, Liming
Sent: Friday, April 26, 2019 9:32 AM
To: Fan, ZhijuX <zhijux.fan@intel.com>; devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>
Subject: RE: [PATCH] BaseTools:Fixed an issue where the order of Guids changed in guid.xref

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 <liming.gao@intel.com>; Feng, Bob C 
><bob.c.feng@intel.com>
>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 <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
>---
> 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 = copy.copy(self.SkuIds)
>
>         PcdDict = tdict(True, 4)
>-        PcdSet = set()
>+        PcdList = []
>         # Find out all possible PCD candidates for self._Arch
>         RecordList = self._RawData[Type, self._Arch]
>         PcdValueDict = OrderedDict()
>@@ -1643,11 +1643,11 @@ class DscBuildData(PlatformBuildClassObject):
>                 EdkLogger.error('build ', PARAMETER_INVALID, 'Sku %s 
>is not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=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] = 
>Setting
>
>-        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdSet:
>+        for PcdCName, TokenSpaceGuid, SkuName, Dummy4 in PcdList:
>             Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid, SkuName]
>             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 
>not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>@@ -2852,7 +2852,7 @@ class DscBuildData(PlatformBuildClassObject):
>         # PCD settings for certain ARCH and SKU
>         #
>         PcdDict = tdict(True, 5)
>-        PcdSet = set()
>+        PcdList = []
>         RecordList = self._RawData[Type, self._Arch]
>         # Find out all possible PCD candidates for self._Arch
>         AvailableSkuIdSet = copy.copy(self.SkuIds) @@ -2873,13
>+2873,13 @@ class DscBuildData(PlatformBuildClassObject):
>             if DefaultStore not in DefaultStoresDefine:
>                 EdkLogger.error('build', PARAMETER_INVALID, 
>'DefaultStores %s is not defined in [DefaultStores] section' % DefaultStore,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>-                PcdSet.add((PcdCName, TokenSpaceGuid, SkuName, DefaultStore,
>Dummy5))
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, DefaultStore, Dummy5) not in PcdList:
>+                PcdList.append((PcdCName, TokenSpaceGuid, SkuName,
>DefaultStore, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid, 
>DefaultStore] = 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 = PcdDict[self._Arch, SkuName, PcdCName, 
>TokenSpaceGuid, 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 
>not defined in [SkuIds] section' % SkuName,
>                                             File=self.MetaFile, Line=Dummy5)
>-            if "." not in TokenSpaceGuid and "[" not in PcdCName:
>+            if "." not in TokenSpaceGuid and "[" not in PcdCName and 
>+ (PcdCName,
>TokenSpaceGuid, SkuName, Dummy5) not in PcdList:
>                 PcdList.append((PcdCName, TokenSpaceGuid, SkuName, Dummy5))
>             PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
>
>--
>2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39607): https://edk2.groups.io/g/devel/message/39607
Mute This Topic: https://groups.io/mt/31348996/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-