From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 CF0AF81FE1 for ; Sun, 4 Dec 2016 20:33:49 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 04 Dec 2016 20:33:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,302,1477983600"; d="scan'208";a="38873675" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 04 Dec 2016 20:33:49 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 4 Dec 2016 20:33:49 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Mon, 5 Dec 2016 12:33:45 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build Thread-Index: AQHSTqKuznd6YrUiQUOw26nMx4wCK6D4xDeA Date: Mon, 5 Dec 2016 04:33:45 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386E012E@shsmsx102.ccr.corp.intel.com> References: <1480906365-51724-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1480906365-51724-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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:33:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 ; Thomaiyar, Richard Marian > ; Ma, Maurice > ; Yao, Jiewen ; Mudusuru, > Giri P > Subject: [PATCH] IntelFsp2Pkg: 41d739e breaks flat tree build >=20 > 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. >=20 > 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(-) >=20 > 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.ExpandMacros(IncludeFilePath) > PackagesPath =3D > os.getenv("PACKAGES_PATH") > - for PackagePath in > PackagesPath.split(os.pathsep): > - IncludeFilePathAbs =3D > os.path.join(os.path.normpath(PackagePath), > os.path.normpath(IncludeFilePath)) > - if > os.path.exists(IncludeFilePathAbs): > - IncludeDsc =3D > open(IncludeFilePathAbs, "r") > - break > + if PackagesPath: > + for PackagePath in > PackagesPath.split(os.pathsep): > + IncludeFilePathAbs > =3D os.path.join(os.path.normpath(PackagePath), > os.path.normpath(IncludeFilePath)) > + if > os.path.exists(IncludeFilePathAbs): > + IncludeDsc > =3D open(IncludeFilePathAbs, "r") > + break > + else: > + IncludeDsc =3D > open(IncludeFilePath, "r") > if IncludeDsc =3D=3D None: > print("ERROR: > Cannot open file '%s'" % IncludeFilePath) > raise SystemExit > -- > 2.7.0.windows.1