From: "Fan, ZhijuX" <zhijux.fan@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Feng, Bob C" <bob.c.feng@intel.com>
Subject: [PATCH V2] BaseTools:Fixed an issue where the order of GuidS changed in guid.xref
Date: Fri, 26 Apr 2019 02:29:58 +0000 [thread overview]
Message-ID: <FAD0D7E0AE0FA54D987F6E72435CAFD50AF4D22E@SHSMSX101.ccr.corp.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5280 bytes --]
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1749
Add content to dsc
[PcdsPatchableInModule.common]
gEfiMdeModulePkgTokenSpaceGuid.test1|FALSE
The order of file Guid.xref will change after increment build.
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
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4634 bytes --]
next reply other threads:[~2019-04-26 2:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 2:29 Fan, ZhijuX [this message]
2019-05-01 2:56 ` [PATCH V2] BaseTools:Fixed an issue where the order of GuidS changed in guid.xref Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FAD0D7E0AE0FA54D987F6E72435CAFD50AF4D22E@SHSMSX101.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox