]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaFileParser.py
BaseTools: Fix two drivers include the same file issue
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaFileParser.py
index f089758fe66cfbab81aed656604e060f560f9c7d..f35778d18afff744357fbdddd9144dbfcbf1fd6d 100644 (file)
@@ -886,7 +886,7 @@ class DscParser(MetaFileParser):
     #\r
     def __init__(self, FilePath, FileType, Arch, Table, Owner= -1, From= -1):\r
         # prevent re-initialization\r
-        if hasattr(self, "_Table"):\r
+        if hasattr(self, "_Table") and self._Table is Table:\r
             return\r
         MetaFileParser.__init__(self, FilePath, FileType, Arch, Table, Owner, From)\r
         self._Version = 0x00010005  # Only EDK2 dsc file is supported\r
@@ -1557,12 +1557,12 @@ class DscParser(MetaFileParser):
 \r
             self._FileWithError = IncludedFile1\r
 \r
-            IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False)\r
             FromItem = self._Content[self._ContentIndex - 1][0]\r
             if self._InSubsection:\r
                 Owner = self._Content[self._ContentIndex - 1][8]\r
             else:\r
                 Owner = self._Content[self._ContentIndex - 1][0]\r
+            IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False, FromItem=FromItem)\r
             Parser = DscParser(IncludedFile1, self._FileType, self._Arch, IncludedFileTable,\r
                                Owner=Owner, From=FromItem)\r
 \r