|
From: <yi...@us...> - 2013-09-18 07:10:33
|
Revision: 2601
http://sourceforge.net/p/edk2-buildtools/code/2601
Author: yingke
Date: 2013-09-18 07:10:28 +0000 (Wed, 18 Sep 2013)
Log Message:
-----------
1. The value of FixedAtBuild and PatchableInModule PCDs in DSC can be optional.
2. Fix a bug which causes items in private section cannot be applied.
Reviewed-by: Liming Gao <lim...@in...>
Signed-off-by: Yingke Liu <yin...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2013-08-20 07:39:40 UTC (rev 2600)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2013-09-18 07:10:28 UTC (rev 2601)
@@ -827,6 +827,7 @@
except:
EdkLogger.error("Parser", FILE_READ_FAILURE, ExtraData=self.MetaFile)
+ OwnerId = {}
for Index in range(0, len(Content)):
Line = CleanString(Content[Index])
# skip empty line
@@ -847,6 +848,7 @@
self._SubsectionType = MODEL_UNKNOWN
self._SubsectionName = ''
self._Owner[-1] = -1
+ OwnerId = {}
continue
# subsection header
elif Line[0] == TAB_OPTION_START and Line[-1] == TAB_OPTION_END:
@@ -871,6 +873,9 @@
# LineBegin=-1, ColumnBegin=-1, LineEnd=-1, ColumnEnd=-1, Enabled=-1
#
for Arch, ModuleType in self._Scope:
+ Owner = self._Owner[-1]
+ if self._SubsectionType != MODEL_UNKNOWN:
+ Owner = OwnerId[Arch]
self._LastItem = self._Store(
self._ItemType,
self._ValueList[0],
@@ -878,7 +883,7 @@
self._ValueList[2],
Arch,
ModuleType,
- self._Owner[-1],
+ Owner,
self._From,
self._LineIndex + 1,
- 1,
@@ -886,6 +891,8 @@
- 1,
self._Enabled
)
+ if self._SubsectionType == MODEL_UNKNOWN and self._InSubsection:
+ OwnerId[Arch] = self._LastItem
if self._DirectiveStack:
Type, Line, Text = self._DirectiveStack[-1]
@@ -1040,6 +1047,11 @@
ExtraData=self._CurrentLine + " (<TokenSpaceGuidCName>.<TokenCName>|<PcdValue>)",
File=self.MetaFile, Line=self._LineIndex + 1)
if self._ValueList[2] == '':
+ #
+ # The PCD values are optional for FIXEDATBUILD and PATCHABLEINMODULE
+ #
+ if self._SectionType in (MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE):
+ return
EdkLogger.error('Parser', FORMAT_INVALID, "No PCD value given",
ExtraData=self._CurrentLine + " (<TokenSpaceGuidCName>.<TokenCName>|<PcdValue>)",
File=self.MetaFile, Line=self._LineIndex + 1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|