public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fixed build report issue.
@ 2018-12-29  8:44 BobCF
  2019-01-02  1:39 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: BobCF @ 2018-12-29  8:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng, Bob C, Liming Gao

From: "Feng, Bob C" <bob.c.feng@intel.com>

This patch is going to fix the regression issue
by 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5

After enable PCD array, the Pcd.OverrideStruct has a new
key, array index, but the build report is not changed correspondingly.

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/build/BuildReport.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index d379866618..3f3c1a12f1 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1422,13 +1422,14 @@ class PcdReport(object):
                     self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
 
     def OverrideFieldValue(self, Pcd, OverrideStruct):
         OverrideFieldStruct = collections.OrderedDict()
         if OverrideStruct:
-            for Key, Values in OverrideStruct.items():
-                if Values[1] and Values[1].endswith('.dsc'):
-                    OverrideFieldStruct[Key] = Values
+            for _, Values in OverrideStruct.items():
+                for Key,value in Values.items():
+                    if value[1] and value[1].endswith('.dsc'):
+                        OverrideFieldStruct[Key] = value
         if Pcd.PcdFieldValueFromFdf:
             for Key, Values in Pcd.PcdFieldValueFromFdf.items():
                 if Key in OverrideFieldStruct and Values[0] == OverrideFieldStruct[Key][0]:
                     continue
                 OverrideFieldStruct[Key] = Values
-- 
2.19.1.windows.1



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

* Re: [Patch] BaseTools: Fixed build report issue.
  2018-12-29  8:44 [Patch] BaseTools: Fixed build report issue BobCF
@ 2019-01-02  1:39 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2019-01-02  1:39 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: Saturday, December 29, 2018 4:45 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: Fixed build report issue.
>
>From: "Feng, Bob C" <bob.c.feng@intel.com>
>
>This patch is going to fix the regression issue
>by 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5
>
>After enable PCD array, the Pcd.OverrideStruct has a new
>key, array index, but the build report is not changed correspondingly.
>
>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/build/BuildReport.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/BuildReport.py
>b/BaseTools/Source/Python/build/BuildReport.py
>index d379866618..3f3c1a12f1 100644
>--- a/BaseTools/Source/Python/build/BuildReport.py
>+++ b/BaseTools/Source/Python/build/BuildReport.py
>@@ -1422,13 +1422,14 @@ class PcdReport(object):
>                     self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch,
>DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
>
>     def OverrideFieldValue(self, Pcd, OverrideStruct):
>         OverrideFieldStruct = collections.OrderedDict()
>         if OverrideStruct:
>-            for Key, Values in OverrideStruct.items():
>-                if Values[1] and Values[1].endswith('.dsc'):
>-                    OverrideFieldStruct[Key] = Values
>+            for _, Values in OverrideStruct.items():
>+                for Key,value in Values.items():
>+                    if value[1] and value[1].endswith('.dsc'):
>+                        OverrideFieldStruct[Key] = value
>         if Pcd.PcdFieldValueFromFdf:
>             for Key, Values in Pcd.PcdFieldValueFromFdf.items():
>                 if Key in OverrideFieldStruct and Values[0] ==
>OverrideFieldStruct[Key][0]:
>                     continue
>                 OverrideFieldStruct[Key] = Values
>--
>2.19.1.windows.1



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

end of thread, other threads:[~2019-01-02  1:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-29  8:44 [Patch] BaseTools: Fixed build report issue BobCF
2019-01-02  1:39 ` Gao, Liming

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