From 395f33368620e13b64f7f5c10fd1d87c7559a2fc Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Thu, 21 Jun 2018 15:17:24 +0800 Subject: 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 { !include Test.txt } Testpkg/Testdriver2.inf { !include Test.txt } Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py') 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) -- cgit v1.2.3