From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 75A4181C88 for ; Tue, 29 Nov 2016 10:11:21 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 29 Nov 2016 10:11:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,717,1473145200"; d="scan'208";a="37026382" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga006.fm.intel.com with ESMTP; 29 Nov 2016 10:11:20 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.63]) by ORSMSX108.amr.corp.intel.com ([169.254.2.107]) with mapi id 14.03.0248.002; Tue, 29 Nov 2016 10:11:20 -0800 From: "Mudusuru, Giri P" To: "Thomaiyar, Richard Marian" , "edk2-devel@lists.01.org" CC: "Ma, Maurice" , "Yao, Jiewen" Thread-Topic: [PATCH] IntelFsp2Pkg: Add PACKAGES_PATH support Thread-Index: AQHSRv1RY/VUSIuRPkuJgo05xufpHaDwSe7Q Date: Tue, 29 Nov 2016 18:11:19 +0000 Message-ID: <4666AEFED60F8E4198B42BB01DCEABDF76F6D587@ORSMSX113.amr.corp.intel.com> References: <20161125092106.12296-1-richard.marian.thomaiyar@intel.com> In-Reply-To: <20161125092106.12296-1-richard.marian.thomaiyar@intel.com> Accept-Language: en-US, hi-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFsp2Pkg: Add PACKAGES_PATH support 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: Tue, 29 Nov 2016 18:11:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Giri P Mudusuru > -----Original Message----- > From: Thomaiyar, Richard Marian > Sent: Friday, November 25, 2016 1:21 AM > To: edk2-devel@lists.01.org > Cc: Ma, Maurice ; Yao, Jiewen > ; Mudusuru, Giri P ; > Thomaiyar, Richard Marian > Subject: [PATCH] IntelFsp2Pkg: Add PACKAGES_PATH support >=20 > Add PACKAGES_PATH support in GenCfgOpt.py >=20 > Cc: Maurice Ma > Cc: Jiewen Yao > Cc: Giri P Mudusuru > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Richard Thomaiyar > --- > IntelFsp2Pkg/Tools/GenCfgOpt.py | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py > b/IntelFsp2Pkg/Tools/GenCfgOpt.py > index 654cdfc..0675b55 100644 > --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py > +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py > @@ -523,9 +523,13 @@ EndList > if Match: > IncludeFilePath =3D Match.group(= 1) > IncludeFilePath =3D self.ExpandM= acros(IncludeFilePath) > - try: > - IncludeDsc =3D open(Include= FilePath, "r") > - except: > + PackagesPath =3D os.getenv("PACK= AGES_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(IncludeFil= ePathAbs): > + IncludeDsc =3D open(Inc= ludeFilePathAbs, "r") > + break > + if IncludeDsc =3D=3D None: > print("ERROR: Cannot open fi= le '%s'" % IncludeFilePath) > raise SystemExit > NewDscLines =3D IncludeDsc.readl= ines() > -- > 2.9.0.windows.1