[edk2] [Patch] BaseTools: update error message for SKUID_IDENTIFIER format

Yonghong Zhu posted 1 patch 7 years ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Common/Misc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[edk2] [Patch] BaseTools: update error message for SKUID_IDENTIFIER format
Posted by Yonghong Zhu 7 years ago
Per DSC spec, the SkuUiName use '|' as separator, so this patch update
the error message to use '|' but not space as separator.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/Common/Misc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 1a5968a..390ef36 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -2004,21 +2004,21 @@ class SkuClass():
             try: 
                 self.SkuIdNumberSet = [SkuIds[k].strip() + 'U' for k in self.SkuIdSet]   
             except Exception:
                 EdkLogger.error("build", PARAMETER_INVALID,
                             ExtraData = "SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"
-                                      % (k, " ".join(SkuIds.keys())))
+                                      % (k, " | ".join(SkuIds.keys())))
         if len(self.SkuIdSet) == 2 and 'DEFAULT' in self.SkuIdSet and SkuIdentifier != 'ALL':
             self.SkuIdSet.remove('DEFAULT')
             self.SkuIdNumberSet.remove('0U')
         for each in self.SkuIdSet:
             if each in SkuIds:
                 self.AvailableSkuIds[each] = SkuIds[each]
             else:
                 EdkLogger.error("build", PARAMETER_INVALID,
                             ExtraData="SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"
-                                      % (each, " ".join(SkuIds.keys())))
+                                      % (each, " | ".join(SkuIds.keys())))
         
     def __SkuUsageType(self): 
         
         if len(self.SkuIdSet) == 1:
             if self.SkuIdSet[0] == 'DEFAULT':
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: update error message for SKUID_IDENTIFIER format
Posted by Gao, Liming 7 years ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Saturday, April 1, 2017 1:59 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [Patch] BaseTools: update error message for SKUID_IDENTIFIER format
> 
> Per DSC spec, the SkuUiName use '|' as separator, so this patch update
> the error message to use '|' but not space as separator.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/Python/Common/Misc.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
> index 1a5968a..390ef36 100644
> --- a/BaseTools/Source/Python/Common/Misc.py
> +++ b/BaseTools/Source/Python/Common/Misc.py
> @@ -2004,21 +2004,21 @@ class SkuClass():
>              try:
>                  self.SkuIdNumberSet = [SkuIds[k].strip() + 'U' for k in self.SkuIdSet]
>              except Exception:
>                  EdkLogger.error("build", PARAMETER_INVALID,
>                              ExtraData = "SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"
> -                                      % (k, " ".join(SkuIds.keys())))
> +                                      % (k, " | ".join(SkuIds.keys())))
>          if len(self.SkuIdSet) == 2 and 'DEFAULT' in self.SkuIdSet and SkuIdentifier != 'ALL':
>              self.SkuIdSet.remove('DEFAULT')
>              self.SkuIdNumberSet.remove('0U')
>          for each in self.SkuIdSet:
>              if each in SkuIds:
>                  self.AvailableSkuIds[each] = SkuIds[each]
>              else:
>                  EdkLogger.error("build", PARAMETER_INVALID,
>                              ExtraData="SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"
> -                                      % (each, " ".join(SkuIds.keys())))
> +                                      % (each, " | ".join(SkuIds.keys())))
> 
>      def __SkuUsageType(self):
> 
>          if len(self.SkuIdSet) == 1:
>              if self.SkuIdSet[0] == 'DEFAULT':
> --
> 2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel