]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaFileTable.py
BaseTools: Update sign tool to make MonotonicCount *after* Payload
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaFileTable.py
index 449e56efcc16408b89faafe41cbb8c906ca760da..aedcacada199d094047e7c599630be88cabb0d54 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase a meta file table\r
 #\r
-# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -218,7 +218,7 @@ class PackageTable(MetaFileTable):
     #\r
     def Query(self, Model, Arch=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
-        ValueString = "Value1,Value2,Value3,Scope1,ID,StartLine"\r
+        ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"\r
 \r
         if Arch != None and Arch != 'COMMON':\r
             ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch\r
@@ -341,7 +341,13 @@ class PlatformTable(MetaFileTable):
         if Scope1 != None and Scope1 != 'COMMON':\r
             ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Scope1\r
         if Scope2 != None and Scope2 != 'COMMON':\r
-            ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2\r
+            # Cover the case that CodeBase is 'COMMON' for BuildOptions section\r
+            if '.' in Scope2:\r
+                Index = Scope2.index('.')\r
+                NewScope = 'COMMON'+ Scope2[Index:]\r
+                ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT' OR Scope2='%s')" % (Scope2, NewScope)\r
+            else:\r
+                ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2\r
 \r
         if BelongsToItem != None:\r
             ConditionString += " AND BelongsToItem=%s" % BelongsToItem\r