public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix a bug about Structure PCD
@ 2019-02-19 13:29 Feng, Bob C
  2019-02-22  7:27 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Feng, Bob C @ 2019-02-19 13:29 UTC (permalink / raw)
  To: edk2-devel; +Cc: Bob Feng, Liming Gao

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1535
If there is Hii Structure Pcd, build will fail, root cause is that
there is an incorrect variable access method used in code.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index e45beb3924..2e6eb16b08 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2392,11 +2392,11 @@ class DscBuildData(PlatformBuildClassObject):
                 skuinfo = Pcd.SkuInfoList[skuname]
                 if skuinfo.VariableName:
                     for defaultstore in skuinfo.DefaultStoreDict:
                         pcddscrawdefaultvalue = self.GetPcdDscRawDefaultValue(Pcd, skuname, defaultstore)
                         if pcddscrawdefaultvalue:
-                            Value = skuinfo[defaultstore]
+                            Value = skuinfo.DefaultStoreDict[defaultstore]
                             if "{CODE(" in Value:
                                 realvalue = Value.strip()[6:-2] # "{CODE(").rstrip(")}"
                                 CApp += "static %s %s_%s_%s_%s_Value%s = %s;\n" % (Pcd.BaseDatumType,Pcd.TokenSpaceGuidCName,Pcd.TokenCName,skuname,defaultstore,Demesion,realvalue)
                 else:
                     pcddscrawdefaultvalue = self.GetPcdDscRawDefaultValue(Pcd, skuname, TAB_DEFAULT_STORES_DEFAULT)
-- 
2.20.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: Fix a bug about Structure PCD
  2019-02-19 13:29 [Patch] BaseTools: Fix a bug about Structure PCD Feng, Bob C
@ 2019-02-22  7:27 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2019-02-22  7:27 UTC (permalink / raw)
  To: Feng, Bob C, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Feng, Bob C
>Sent: Tuesday, February 19, 2019 9:30 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: Fix a bug about Structure PCD
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1535
>If there is Hii Structure Pcd, build will fail, root cause is that
>there is an incorrect variable access method used in code.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>---
> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
>b/BaseTools/Source/Python/Workspace/DscBuildData.py
>index e45beb3924..2e6eb16b08 100644
>--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
>+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
>@@ -2392,11 +2392,11 @@ class DscBuildData(PlatformBuildClassObject):
>                 skuinfo = Pcd.SkuInfoList[skuname]
>                 if skuinfo.VariableName:
>                     for defaultstore in skuinfo.DefaultStoreDict:
>                         pcddscrawdefaultvalue = self.GetPcdDscRawDefaultValue(Pcd,
>skuname, defaultstore)
>                         if pcddscrawdefaultvalue:
>-                            Value = skuinfo[defaultstore]
>+                            Value = skuinfo.DefaultStoreDict[defaultstore]
>                             if "{CODE(" in Value:
>                                 realvalue = Value.strip()[6:-2] # "{CODE(").rstrip(")}"
>                                 CApp += "static %s %s_%s_%s_%s_Value%s = %s;\n" %
>(Pcd.BaseDatumType,Pcd.TokenSpaceGuidCName,Pcd.TokenCName,skunam
>e,defaultstore,Demesion,realvalue)
>                 else:
>                     pcddscrawdefaultvalue = self.GetPcdDscRawDefaultValue(Pcd,
>skuname, TAB_DEFAULT_STORES_DEFAULT)
>--
>2.20.1.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-22  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 13:29 [Patch] BaseTools: Fix a bug about Structure PCD Feng, Bob C
2019-02-22  7:27 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox