diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-10 17:03:29 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-14 11:14:24 +0800 |
commit | 5bc96263ea2bfecb07deea81c68a6c3e226ebda1 (patch) | |
tree | af553c434ac2b33b4c6dcd4f84634ddfd8ce18ca /BaseTools/Source/Python/Workspace/MetaFileTable.py | |
parent | 7217b8796d2727db76cd6684ba706c3b643b1d62 (diff) | |
download | edk2-5bc96263ea2bfecb07deea81c68a6c3e226ebda1.tar.gz edk2-5bc96263ea2bfecb07deea81c68a6c3e226ebda1.tar.bz2 edk2-5bc96263ea2bfecb07deea81c68a6c3e226ebda1.zip |
BaseTools: Enable component override functionality
https://bugzilla.tianocore.org/show_bug.cgi?id=1449
This patch enable build tools to recognize that
when two given files have the same GUID, file path and ARCH in Dsc,
The later one's definition will be used.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileTable.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileTable.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index 004e9494c3..823a87e057 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -76,7 +76,7 @@ class MetaFileTable(): self.CurrentContent.append(self._DUMMY_)
def GetAll(self):
- return [item for item in self.CurrentContent if item[0] >= 0 ]
+ return [item for item in self.CurrentContent if item[0] >= 0 and item[-1]>=0]
## Python class representation of table storing module data
class ModuleTable(MetaFileTable):
@@ -373,7 +373,6 @@ class PlatformTable(MetaFileTable): QueryTab = self.CurrentContent
result = [item for item in QueryTab if item[1] == Model and item[-1]>0 ]
-
if Scope1 is not None and Scope1 != TAB_ARCH_COMMON:
Sc1 = set(['COMMON'])
Sc1.add(Scope1)
@@ -397,6 +396,10 @@ class PlatformTable(MetaFileTable): result = [ [r[2],r[3],r[4],r[5],r[6],r[7],r[0],r[9]] for r in result ]
return result
+ def DisableComponent(self,comp_id):
+ for item in self.CurrentContent:
+ if item[0] == comp_id or item[8] == comp_id:
+ item[-1] = -1
## Factory class to produce different storage for different type of meta-file
class MetaFileStorage(object):
|