diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-06-21 15:17:24 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-29 15:21:45 +0800 |
commit | 395f33368620e13b64f7f5c10fd1d87c7559a2fc (patch) | |
tree | 5ad879213f1406f673b457b407409ee84f2a0ee8 /BaseTools/Source/Python/Workspace/MetaFileParser.py | |
parent | cd7bd491f3f9c43e4bb6c9516784ef3a09b6e337 (diff) | |
download | edk2-395f33368620e13b64f7f5c10fd1d87c7559a2fc.tar.gz edk2-395f33368620e13b64f7f5c10fd1d87c7559a2fc.tar.bz2 edk2-395f33368620e13b64f7f5c10fd1d87c7559a2fc.zip |
BaseTools: Fix two drivers include the same file issue
Two drivers include the same PCD file, the PCD value in the first
driver is correct, but it in the second driver is incorrect.
DSC:
[Components]
Testpkg/Testdriver1.inf {
<PcdsFixedAtBuild>
!include Test.txt
}
Testpkg/Testdriver2.inf {
<PcdsFixedAtBuild>
!include Test.txt
}
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index f089758fe6..f35778d18a 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -886,7 +886,7 @@ class DscParser(MetaFileParser): #
def __init__(self, FilePath, FileType, Arch, Table, Owner= -1, From= -1):
# prevent re-initialization
- if hasattr(self, "_Table"):
+ if hasattr(self, "_Table") and self._Table is Table:
return
MetaFileParser.__init__(self, FilePath, FileType, Arch, Table, Owner, From)
self._Version = 0x00010005 # Only EDK2 dsc file is supported
@@ -1557,12 +1557,12 @@ class DscParser(MetaFileParser): self._FileWithError = IncludedFile1
- IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False)
FromItem = self._Content[self._ContentIndex - 1][0]
if self._InSubsection:
Owner = self._Content[self._ContentIndex - 1][8]
else:
Owner = self._Content[self._ContentIndex - 1][0]
+ IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False, FromItem=FromItem)
Parser = DscParser(IncludedFile1, self._FileType, self._Arch, IncludedFileTable,
Owner=Owner, From=FromItem)
|