summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhaozh1x <zhiqiangx.zhao@intel.com>2018-09-11 18:31:36 +0800
committerLiming Gao <liming.gao@intel.com>2018-10-16 08:59:50 +0800
commit0caf9039132d5530b2a33d1c70b734e57b4edd3b (patch)
tree3991f696ea0f9bafc48eaf1d02b134106d9e9cef
parente451aaa637e437ca9e5435e21f2c9493cd1e044e (diff)
downloadedk2-0caf9039132d5530b2a33d1c70b734e57b4edd3b.tar.gz
edk2-0caf9039132d5530b2a33d1c70b734e57b4edd3b.tar.bz2
edk2-0caf9039132d5530b2a33d1c70b734e57b4edd3b.zip
BaseTools: Code should not update the variable that save the raw data.
Code should not update the value of variable which save the original raw content of meta file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index b7b4b610ca..6106f8ee55 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1899,12 +1899,15 @@ class DscBuildData(PlatformBuildClassObject):
IsArray = IsFieldValueAnArray(FieldList[FieldName][0])
if IsArray:
try:
- FieldList[FieldName][0] = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
+ FieldValue = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
except BadExpression:
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %
(".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
try:
- Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
+ if IsArray:
+ Value, ValueSize = ParseFieldValue (FieldValue)
+ else:
+ Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
except Exception:
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
if isinstance(Value, str):