summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/MetaFileTable.py
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-12-22 20:46:15 +0800
committerLiming Gao <liming.gao@intel.com>2017-12-25 11:05:47 +0800
commit8518bf0b92a78938341a2752a0044f04336668cc (patch)
tree42cb756c581e15ff9a505c27f216d9f0331509de /BaseTools/Source/Python/Workspace/MetaFileTable.py
parent34952f493c24c02f5eba6ae86ed758d3311cddb1 (diff)
downloadedk2-8518bf0b92a78938341a2752a0044f04336668cc.tar.gz
edk2-8518bf0b92a78938341a2752a0044f04336668cc.tar.bz2
edk2-8518bf0b92a78938341a2752a0044f04336668cc.zip
BaseTools: Support Structure PCD value inherit between the different SKUs
https://bugzilla.tianocore.org/show_bug.cgi?id=543 Structure PCD field value can inherit between the different SKUIds. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Feng Bob C <bob.c.feng@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.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py
index aedcacada1..d8549c9d66 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py
@@ -23,6 +23,7 @@ from MetaDataTable import Table, TableFile
from MetaDataTable import ConvertToSqlString
from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE_INF, \
MODEL_FILE_OTHERS
+from Common.DataType import *
class MetaFileTable(Table):
# TRICK: use file ID as the part before '.'
@@ -271,6 +272,7 @@ class PlatformTable(MetaFileTable):
Value3 TEXT,
Scope1 TEXT,
Scope2 TEXT,
+ Scope3 TEXT,
BelongsToItem REAL NOT NULL,
FromItem REAL NOT NULL,
StartLine INTEGER NOT NULL,
@@ -280,7 +282,7 @@ class PlatformTable(MetaFileTable):
Enabled INTEGER DEFAULT 0
'''
# used as table end flag, in case the changes to database is not committed to db file
- _DUMMY_ = "-1, -1, '====', '====', '====', '====', '====', -1, -1, -1, -1, -1, -1, -1"
+ _DUMMY_ = "-1, -1, '====', '====', '====', '====', '====','====', -1, -1, -1, -1, -1, -1, -1"
## Constructor
def __init__(self, Cursor, MetaFile, Temporary):
@@ -304,9 +306,9 @@ class PlatformTable(MetaFileTable):
# @param EndColumn: EndColumn of a Dsc item
# @param Enabled: If this item enabled
#
- def Insert(self, Model, Value1, Value2, Value3, Scope1='COMMON', Scope2='COMMON', BelongsToItem=-1,
+ def Insert(self, Model, Value1, Value2, Value3, Scope1='COMMON', Scope2='COMMON', Scope3=TAB_DEFAULT_STORES_DEFAULT,BelongsToItem=-1,
FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):
- (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))
+ (Value1, Value2, Value3, Scope1, Scope2,Scope3) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2,Scope3))
return Table.Insert(
self,
Model,
@@ -315,6 +317,7 @@ class PlatformTable(MetaFileTable):
Value3,
Scope1,
Scope2,
+ Scope3,
BelongsToItem,
FromItem,
StartLine,
@@ -336,7 +339,7 @@ class PlatformTable(MetaFileTable):
#
def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):
ConditionString = "Model=%s AND Enabled>0" % Model
- ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"
+ ValueString = "Value1,Value2,Value3,Scope1,Scope2,Scope3,ID,StartLine"
if Scope1 != None and Scope1 != 'COMMON':
ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Scope1