* [Patch] BaseTools: enhance error handling for option --binary-source
@ 2018-01-18 5:25 Yonghong Zhu
2018-01-18 5:53 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-01-18 5:25 UTC (permalink / raw)
To: edk2-devel
Enhance error handling for option --binary-source to report invalid
option value. --binary-destination use same rule.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/Source/Python/build/build.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index de19756..e4adee2 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -792,16 +792,22 @@ class Build():
if GlobalData.gBinCacheSource:
BinCacheSource = os.path.normpath(GlobalData.gBinCacheSource)
if not os.path.isabs(BinCacheSource):
BinCacheSource = mws.join(self.WorkspaceDir, BinCacheSource)
GlobalData.gBinCacheSource = BinCacheSource
+ else:
+ if GlobalData.gBinCacheSource != None:
+ EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-source.")
if GlobalData.gBinCacheDest:
BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)
if not os.path.isabs(BinCacheDest):
BinCacheDest = mws.join(self.WorkspaceDir, BinCacheDest)
GlobalData.gBinCacheDest = BinCacheDest
+ else:
+ if GlobalData.gBinCacheDest != None:
+ EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-destination.")
if self.ConfDirectory:
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
ConfDirectoryPath = os.path.normpath(self.ConfDirectory)
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] BaseTools: enhance error handling for option --binary-source
2018-01-18 5:25 [Patch] BaseTools: enhance error handling for option --binary-source Yonghong Zhu
@ 2018-01-18 5:53 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-01-18 5:53 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Thursday, January 18, 2018 1:25 PM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] BaseTools: enhance error handling for option --binary-
>source
>
>Enhance error handling for option --binary-source to report invalid
>option value. --binary-destination use same rule.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index de19756..e4adee2 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -792,16 +792,22 @@ class Build():
> if GlobalData.gBinCacheSource:
> BinCacheSource = os.path.normpath(GlobalData.gBinCacheSource)
> if not os.path.isabs(BinCacheSource):
> BinCacheSource = mws.join(self.WorkspaceDir, BinCacheSource)
> GlobalData.gBinCacheSource = BinCacheSource
>+ else:
>+ if GlobalData.gBinCacheSource != None:
>+ EdkLogger.error("build", OPTION_VALUE_INVALID,
>ExtraData="Invalid value of option --binary-source.")
>
> if GlobalData.gBinCacheDest:
> BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)
> if not os.path.isabs(BinCacheDest):
> BinCacheDest = mws.join(self.WorkspaceDir, BinCacheDest)
> GlobalData.gBinCacheDest = BinCacheDest
>+ else:
>+ if GlobalData.gBinCacheDest != None:
>+ EdkLogger.error("build", OPTION_VALUE_INVALID,
>ExtraData="Invalid value of option --binary-destination.")
>
> if self.ConfDirectory:
> # Get alternate Conf location, if it is absolute, then just use the absolute
>directory name
> ConfDirectoryPath = os.path.normpath(self.ConfDirectory)
>
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-18 5:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 5:25 [Patch] BaseTools: enhance error handling for option --binary-source Yonghong Zhu
2018-01-18 5:53 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox