From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3D80281FD6 for ; Sun, 4 Dec 2016 20:25:20 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP; 04 Dec 2016 20:25:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,302,1477983600"; d="scan'208";a="38872255" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 04 Dec 2016 20:25:19 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 4 Dec 2016 20:25:16 -0800 Received: from bgsmsx101.gar.corp.intel.com (10.223.4.170) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 4 Dec 2016 20:25:16 -0800 Received: from bgsmsx102.gar.corp.intel.com ([169.254.2.193]) by BGSMSX101.gar.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Mon, 5 Dec 2016 09:55:00 +0530 From: "Thomaiyar, Richard Marian" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Ma, Maurice" , "Yao, Jiewen" , "Mudusuru, Giri P" Thread-Topic: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Thread-Index: AQHSTqKv0XT+2AwMoEy+XcPJROeCnqD4ryUQgAASYIA= Date: Mon, 5 Dec 2016 04:24:59 +0000 Message-ID: <4D8FDCBD0A020645AD4A2EB6A09DD3DA62CE9068@BGSMSX102.gar.corp.intel.com> References: <1480906365-51724-1-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2016 04:25:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tested-by: Richard Thomaiyar Verified with both, PACAKGES_PATH not defined and defined. Regards, Richard -----Original Message----- From: Thomaiyar, Richard Marian=20 Sent: Monday, December 5, 2016 8:49 AM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Ma, Maurice ; Yao, Jiewen ;= Mudusuru, Giri P Subject: RE: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Thanks Star, for fixing it.=20 Reviewed by: Richard Thomaiyar Regards, Richard -----Original Message----- From: Zeng, Star Sent: Monday, December 5, 2016 8:23 AM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Thomaiyar, Richard Marian ; Ma, Maurice ; Yao, Jiewen = ; Mudusuru, Giri P Subject: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build There may be no environment variable PACKAGES_PATH defined in flat tree, th= en 41d739e breaks flat tree build. This patch is to update GenCfgOpt.py to be compatible with both flat tree a= nd package path build. Cc: Richard Thomaiyar Cc: Maurice Ma Cc: Jiewen Yao Cc: Giri P Mudusuru Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- 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 =3D Match.group(1) IncludeFilePath =3D self.ExpandMac= ros(IncludeFilePath) PackagesPath =3D os.getenv("PACKAG= ES_PATH") - for PackagePath in PackagesPath.sp= lit(os.pathsep): - IncludeFilePathAbs =3D os.path= .join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath)) - if os.path.exists(IncludeFileP= athAbs): - IncludeDsc =3D open(Inclu= deFilePathAbs, "r") - break + if PackagesPath: + for PackagePath in PackagesPath.= split(os.pathsep): + IncludeFilePathAbs =3D os.pa= th.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath)) + if os.path.exists(IncludeFil= ePathAbs): + IncludeDsc =3D open(Inc= ludeFilePathAbs, "r") + break + else: + IncludeDsc =3D=20 + open(IncludeFilePath, "r") if IncludeDsc =3D=3D None: print("ERROR: Cannot open file= '%s'" % IncludeFilePath) raise SystemExit -- 2.7.0.windows.1