* [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
@ 2016-12-05 2:52 Star Zeng
2016-12-05 3:19 ` Thomaiyar, Richard Marian
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Star Zeng @ 2016-12-05 2:52 UTC (permalink / raw)
To: edk2-devel
Cc: Star Zeng, Richard Thomaiyar, Maurice Ma, Jiewen Yao,
Giri P Mudusuru
There may be no environment variable PACKAGES_PATH defined
in flat tree, then 41d739e breaks flat tree build.
This patch is to update GenCfgOpt.py to be compatible with
both flat tree and package path build.
Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
IntelFsp2Pkg/Tools/GenCfgOpt.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py
index 0675b55c169c..7658b7fc5cb0 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -524,11 +524,14 @@ EndList
IncludeFilePath = Match.group(1)
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
PackagesPath = os.getenv("PACKAGES_PATH")
- for PackagePath in PackagesPath.split(os.pathsep):
- IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
- if os.path.exists(IncludeFilePathAbs):
- IncludeDsc = open(IncludeFilePathAbs, "r")
- break
+ if PackagesPath:
+ for PackagePath in PackagesPath.split(os.pathsep):
+ IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
+ if os.path.exists(IncludeFilePathAbs):
+ IncludeDsc = open(IncludeFilePathAbs, "r")
+ break
+ else:
+ IncludeDsc = open(IncludeFilePath, "r")
if IncludeDsc == None:
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
raise SystemExit
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
2016-12-05 2:52 [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Star Zeng
@ 2016-12-05 3:19 ` Thomaiyar, Richard Marian
2016-12-05 4:24 ` Thomaiyar, Richard Marian
2016-12-05 4:33 ` Yao, Jiewen
2 siblings, 0 replies; 4+ messages in thread
From: Thomaiyar, Richard Marian @ 2016-12-05 3:19 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org
Cc: Ma, Maurice, Yao, Jiewen, Mudusuru, Giri P
Thanks Star, for fixing it.
Reviewed by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Regards,
Richard
-----Original Message-----
From: Zeng, Star
Sent: Monday, December 5, 2016 8:23 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Thomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Mudusuru, Giri P <giri.p.mudusuru@intel.com>
Subject: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
There may be no environment variable PACKAGES_PATH defined in flat tree, then 41d739e breaks flat tree build.
This patch is to update GenCfgOpt.py to be compatible with both flat tree and package path build.
Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
IntelFsp2Pkg/Tools/GenCfgOpt.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py index 0675b55c169c..7658b7fc5cb0 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -524,11 +524,14 @@ EndList
IncludeFilePath = Match.group(1)
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
PackagesPath = os.getenv("PACKAGES_PATH")
- for PackagePath in PackagesPath.split(os.pathsep):
- IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
- if os.path.exists(IncludeFilePathAbs):
- IncludeDsc = open(IncludeFilePathAbs, "r")
- break
+ if PackagesPath:
+ for PackagePath in PackagesPath.split(os.pathsep):
+ IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
+ if os.path.exists(IncludeFilePathAbs):
+ IncludeDsc = open(IncludeFilePathAbs, "r")
+ break
+ else:
+ IncludeDsc =
+ open(IncludeFilePath, "r")
if IncludeDsc == None:
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
raise SystemExit
--
2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
2016-12-05 2:52 [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Star Zeng
2016-12-05 3:19 ` Thomaiyar, Richard Marian
@ 2016-12-05 4:24 ` Thomaiyar, Richard Marian
2016-12-05 4:33 ` Yao, Jiewen
2 siblings, 0 replies; 4+ messages in thread
From: Thomaiyar, Richard Marian @ 2016-12-05 4:24 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org
Cc: Ma, Maurice, Yao, Jiewen, Mudusuru, Giri P
Tested-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Verified with both, PACAKGES_PATH not defined and defined.
Regards,
Richard
-----Original Message-----
From: Thomaiyar, Richard Marian
Sent: Monday, December 5, 2016 8:49 AM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
Cc: Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Mudusuru, Giri P <giri.p.mudusuru@intel.com>
Subject: RE: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
Thanks Star, for fixing it.
Reviewed by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Regards,
Richard
-----Original Message-----
From: Zeng, Star
Sent: Monday, December 5, 2016 8:23 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Thomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Mudusuru, Giri P <giri.p.mudusuru@intel.com>
Subject: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
There may be no environment variable PACKAGES_PATH defined in flat tree, then 41d739e breaks flat tree build.
This patch is to update GenCfgOpt.py to be compatible with both flat tree and package path build.
Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
IntelFsp2Pkg/Tools/GenCfgOpt.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py index 0675b55c169c..7658b7fc5cb0 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -524,11 +524,14 @@ EndList
IncludeFilePath = Match.group(1)
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
PackagesPath = os.getenv("PACKAGES_PATH")
- for PackagePath in PackagesPath.split(os.pathsep):
- IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
- if os.path.exists(IncludeFilePathAbs):
- IncludeDsc = open(IncludeFilePathAbs, "r")
- break
+ if PackagesPath:
+ for PackagePath in PackagesPath.split(os.pathsep):
+ IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
+ if os.path.exists(IncludeFilePathAbs):
+ IncludeDsc = open(IncludeFilePathAbs, "r")
+ break
+ else:
+ IncludeDsc =
+ open(IncludeFilePath, "r")
if IncludeDsc == None:
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
raise SystemExit
--
2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
2016-12-05 2:52 [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Star Zeng
2016-12-05 3:19 ` Thomaiyar, Richard Marian
2016-12-05 4:24 ` Thomaiyar, Richard Marian
@ 2016-12-05 4:33 ` Yao, Jiewen
2 siblings, 0 replies; 4+ messages in thread
From: Yao, Jiewen @ 2016-12-05 4:33 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org
Reviewed-by: jiewen.yao@intel.com
> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, December 5, 2016 10:53 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Thomaiyar, Richard Marian
> <richard.marian.thomaiyar@intel.com>; Ma, Maurice
> <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Mudusuru,
> Giri P <giri.p.mudusuru@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build
>
> There may be no environment variable PACKAGES_PATH defined
> in flat tree, then 41d739e breaks flat tree build.
> This patch is to update GenCfgOpt.py to be compatible with
> both flat tree and package path build.
>
> Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> IntelFsp2Pkg/Tools/GenCfgOpt.py | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> index 0675b55c169c..7658b7fc5cb0 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -524,11 +524,14 @@ EndList
> IncludeFilePath =
> Match.group(1)
> IncludeFilePath =
> self.ExpandMacros(IncludeFilePath)
> PackagesPath =
> os.getenv("PACKAGES_PATH")
> - for PackagePath in
> PackagesPath.split(os.pathsep):
> - IncludeFilePathAbs =
> os.path.join(os.path.normpath(PackagePath),
> os.path.normpath(IncludeFilePath))
> - if
> os.path.exists(IncludeFilePathAbs):
> - IncludeDsc =
> open(IncludeFilePathAbs, "r")
> - break
> + if PackagesPath:
> + for PackagePath in
> PackagesPath.split(os.pathsep):
> + IncludeFilePathAbs
> = os.path.join(os.path.normpath(PackagePath),
> os.path.normpath(IncludeFilePath))
> + if
> os.path.exists(IncludeFilePathAbs):
> + IncludeDsc
> = open(IncludeFilePathAbs, "r")
> + break
> + else:
> + IncludeDsc =
> open(IncludeFilePath, "r")
> if IncludeDsc == None:
> print("ERROR:
> Cannot open file '%s'" % IncludeFilePath)
> raise SystemExit
> --
> 2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-05 4:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 2:52 [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Star Zeng
2016-12-05 3:19 ` Thomaiyar, Richard Marian
2016-12-05 4:24 ` Thomaiyar, Richard Marian
2016-12-05 4:33 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox