From e8a47801a1dfdb148b1bfcd5bdc8ebc3bf51f92d Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Mon, 18 Nov 2013 07:41:21 +0000 Subject: Sync BaseTool trunk (version r2610) into EDKII BaseTools. Signed-off-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Workspace/MetaFileTable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Workspace/MetaFileTable.py') diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index 088a118de1..607225a0ef 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -134,7 +134,7 @@ class ModuleTable(MetaFileTable): # # @retval: A recordSet of all found records # - def Query(self, Model, Arch=None, Platform=None): + def Query(self, Model, Arch=None, Platform=None, BelongsToItem=None): ConditionString = "Model=%s AND Enabled>=0" % Model ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine" @@ -142,6 +142,8 @@ class ModuleTable(MetaFileTable): ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch if Platform != None and Platform != 'COMMON': ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Platform + if BelongsToItem != None: + ConditionString += " AND BelongsToItem=%s" % BelongsToItem SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString) return self.Exec(SqlCommand) -- cgit v1.2.3