From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.6537.1586914637801629367 for ; Tue, 14 Apr 2020 18:37:17 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: heng.luo@intel.com) IronPort-SDR: IdetexYC5hK7U9y0XVSt1ju2s9r40+cXpX8/8704+nM+Tm2HoeMKhDsiAnntjwuHgCIvbwhoQl suOwSx1AFjRw== X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 18:37:16 -0700 IronPort-SDR: e0zAb+GzExx7VKYXBT7VLTpJmEMgcj+tX6yrxxvSHOi3AQSUNNpDlf3jSdZcIKJDCo1rONdZys ddde2wRvHKSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,385,1580803200"; d="scan'208,223";a="271586830" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 14 Apr 2020 18:37:15 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 18:37:15 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 18:37:15 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.146]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.191]) with mapi id 14.03.0439.000; Wed, 15 Apr 2020 09:37:11 +0800 From: "Heng Luo" To: "Dong, Eric" , "Feng, Bob C" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Gao, Liming" , "Chan, Amy" Subject: Re: [PATCH] Platform/Intel/Tools: Add scripts to set PACKAGES_PATH environment Thread-Topic: [PATCH] Platform/Intel/Tools: Add scripts to set PACKAGES_PATH environment Thread-Index: AQHWDtRaRIQqy+bBjkCWiQJ3ZUAxg6h5ZVZA//97JgCAAI2ocA== Date: Wed, 15 Apr 2020 01:37:11 +0000 Message-ID: <8AA0A44780D72D4CABD3ED3688D16E3E78FD278E@SHSMSX103.ccr.corp.intel.com> References: <20200410010549.866-1-heng.luo@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: heng.luo@intel.com X-Groupsio-MsgNum: 57389 Content-Language: en-US Content-Type: multipart/mixed; boundary="_002_8AA0A44780D72D4CABD3ED3688D16E3E78FD278ESHSMSX103ccrcor_" --_002_8AA0A44780D72D4CABD3ED3688D16E3E78FD278ESHSMSX103ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Attach the patch. Thank Bob and Eric. Best Regards Heng > -----Original Message----- > From: Dong, Eric > Sent: Wednesday, April 15, 2020 9:07 AM > To: Feng, Bob C ; Luo, Heng ; > devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Liming ; Chan, > Amy > Subject: RE: [PATCH] Platform/Intel/Tools: Add scripts to set > PACKAGES_PATH environment >=20 > Thanks bob. >=20 >=20 > Heng, >=20 > Please help to update the patch and send it to me, I will help to push i= t. >=20 > Thanks, > Eric >=20 > > -----Original Message----- > > From: Feng, Bob C > > Sent: Wednesday, April 15, 2020 9:05 AM > > To: Luo, Heng ; devel@edk2.groups.io > > Cc: Ni, Ray ; Dong, Eric ; Gao, > > Liming ; Chan, Amy > > Subject: RE: [PATCH] Platform/Intel/Tools: Add scripts to set > > PACKAGES_PATH environment > > > > A typo in the Readme.md. Others are fine for me. > > **:+The old PACKAGES_PATH will be replaced by new one.s > > > > After fix that typo, > > Reviewed-by: Bob Feng > > > > -----Original Message----- > > From: Luo, Heng > > Sent: Friday, April 10, 2020 9:06 AM > > To: devel@edk2.groups.io > > Cc: Ni, Ray ; Dong, Eric ; Gao, > > Liming ; Feng, Bob C ; > > Chan, Amy > > Subject: [PATCH] Platform/Intel/Tools: Add scripts to set > > PACKAGES_PATH environment > > > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2656 > > > > 1. Add GetPackagesPath.py, it will be used to get package pathes from > > special directories. A sub directory is a qualified package path > > when an EDKII Package can be found under it. > > 2. Add AppendPackagesPath.bat and AppendPackagesPath.sh, these scripts > > call GetPackagesPath.py to collect all package paths under specified > > directories and append them to PACKAGES_PATH environment variable. > > > > Cc: Ray Ni > > Cc: Eric Dong > > Cc: Liming Gao > > Cc: Bob Feng > > Cc: Amy Chan > > Signed-off-by: Heng Luo > > --- > > Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.bat | 33 > > +++++++++++++++++++++++++++++++++ > > Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.sh | 42 > > ++++++++++++++++++++++++++++++++++++++++++ > > Platform/Intel/Tools/AppendPackagesPath/GetPackagesPath.py | 98 > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > ++++++++++++++++++++++++++++++++++++++++ > > Platform/Intel/Tools/AppendPackagesPath/Readme.md | 28 > > ++++++++++++++++++++++++++++ > > 4 files changed, 201 insertions(+) > > > > diff --git > > a/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.bat > > b/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.bat > > new file mode 100644 > > index 0000000000..da15d9c451 > > --- /dev/null > > +++ > b/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.bat > > @@ -0,0 +1,33 @@ > > +@REM @file+@REM Windows batch file to set PACKAGES_PATH > > environment+@REM+@REM Copyright (c) 2020, Intel Corporation. All > > environment+rights > > reserved.
+@REM SPDX-License-Identifier: BSD-2-Clause- > > Patent+@REM+@REM This script calls GetPackagesPath.py to collect all > > package paths under+@REM specified directories and appends them to > > PACKAGES_PATH environment+@REM variable. A sub directory is a > > qualified package path when an EDKII+@REM Package can be found under > > it.++@echo off+@if /I "%1"=3D=3D"" @goto Usage+@if /I "%1"=3D=3D"-h" @g= oto > > Usage+@if /I "%1"=3D=3D"--help" @goto Usage+@if /I "%1"=3D=3D"/?" @goto > > Usage++for /f %%i in ('python %~dp0\GetPackagesPath.py %*') do (+ if > > defined PACKAGES_PATH (+ set > > "PACKAGES_PATH=3D%PACKAGES_PATH%;%%i"+ ) else (+ set > > "PACKAGES_PATH=3D%%i"+ )+)+@goto End++:Usage+@echo Usage: > > AppendPackagesPath.bat directory [directory ...]+@echo Copyright(c) 202= 0, > > Intel Corporation. All rights reserved.+@echo Options:+@echo --help, = -h > > Print this help screen and exit++:Enddiff --git > > a/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.sh > > b/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.sh > > new file mode 100644 > > index 0000000000..599c8d073b > > --- /dev/null > > +++ b/Platform/Intel/Tools/AppendPackagesPath/AppendPackagesPath.sh > > @@ -0,0 +1,42 @@ > > +#!/bin/bash > > + > > +# > > +# Copyright (c) 2020, Intel Corporation. All rights reserved.
# > > +SPDX-License-Identifier: BSD-2-Clause-Patent # # This script calls > > +GetPackagesPath.py to collect all package paths under # specified > > +directories and appends them to PACKAGES_PATH environment # variable. > > A > > +sub directory is a qualified package path when an EDKII # Package can > > +be found under it. > > +# > > +# Note: This script must be \'sourced\' so the environment can be > changed: > > +# source SetPackagesPath.sh > > +# . AppendPackagesPath.sh > > + > > +function Usage() > > +{ > > + echo "Usage: source AppendPackagesPath.sh directory [directory ...= ]" > > + echo "Copyright(c) 2020, Intel Corporation. All rights reserved." > > + echo "Options:" > > + echo " --help, -h Print this help screen and exit" > > + echo "Please note: This script must be \'sourced\' so the > > +environment can > > be changed." > > + echo ". AppendPackagesPath.sh" > > + echo "source AppendPackagesPath.sh" > > +} > > + > > +function SetEnv() > > +{ > > + local tool_path=3D$(dirname "$BASH_SOURCE") > > + local paths=3D$(python $tool_path/GetPackagesPath.py $@) > > + if [ "$PACKAGES_PATH" ]; then > > + PACKAGES_PATH=3D$PACKAGES_PATH:$paths > > + else > > + PACKAGES_PATH=3D$paths > > + fi > > +} > > + > > +if [ $# -eq 0 -o "$1" =3D=3D "-h" -o "$1" =3D=3D "--help" -o "$1" =3D= =3D "/?" ]; then > > + Usage > > +else > > + SetEnv $@ > > +fi > > diff --git > > a/Platform/Intel/Tools/AppendPackagesPath/GetPackagesPath.py > > b/Platform/Intel/Tools/AppendPackagesPath/GetPackagesPath.py > > new file mode 100644 > > index 0000000000..31ed44cfa3 > > --- /dev/null > > +++ b/Platform/Intel/Tools/AppendPackagesPath/GetPackagesPath.py > > @@ -0,0 +1,98 @@ > > +## @file+# Get all recursive package paths from special > > +directories.+#+# > > Copyright (c) 2020, Intel Corporation. All rights reserved.
+# > > SPDX- > > License-Identifier: BSD-2-Clause-Patent+#++import os+import > > glob+import > > argparse++#+# Globals for help information+#+__prog__ =3D > > 'GetPackagesPath.py'+__copyright__ =3D 'Copyright (c) 2020, Intel > Corporation. > > All rights reserved.'+__description__ =3D 'Gets all recursive package p= aths in > > specified directory.\n'++def __get_packages_path(root):+ """ Gets al= l > > recursive package paths in specified directory.+ A directory is = a package > > path if it satisfies conditions below:+ 1. it is a directory+ = 2. it is not > an > > EDK II Package. An EDK II Package (directory) is+ a directory= that > > contains an EDK II package declaration (DEC) file.+ 3. it contai= ns at least > > one first level EDK II Package.+ Note: A directory is not packag= e path but > > its subdirectory could be.+ Example: edk2-platforms/Features is = not > > package path+ but edk2-platforms/Features/Intel is.++ :pa= ram root: > > The specified directory to find package paths in it,+ the ca= ller should > > ensure it is an valid directory+ :type root: String+ :ret= urns: Return all > > recursive package paths+ :rtype: String list+ """++ paths = =3D []+ > > contain_package =3D False+ for filename in os.listdir(root):+ = # skip files > > whose name starts with ".", such as ".git"+ if filename.startswi= th('.'):+ > > continue+ filepath =3D os.path.join(root, filename)+ if > > os.path.isdir(filepath):+ if glob.glob(os.path.join(filepath= , '*.dec')):+ > > # it is an EDK II Package+ contain_package =3D True+ = else:+ > > # get package paths for subdirectory if it is not package+ = paths =3D > > paths + __get_packages_path(filepath)++ if contain_package:+ = # root > is > > a package path because it contains EDK II Package+ # in first le= vel folder, > > inset it to head of list+ paths.insert(0, root)++ # return pa= ckage paths+ > > return paths++def get_packages_path(directories):+ """ For each dire= cory > > in directories, gets all recursive package paths+ in this direct= ory and > joins > > them into one string.++ :param directories: the list of > directory+ :type > > directories: String list+ :returns: Return string of package > paths+ :rtype: > > String+ """++ packages_path =3D ''+ for directory in directori= es:+ > > directory =3D os.path.abspath(directory)+ if (not os.path.exists= (directory)) > > or (not os.path.isdir(directory)):+ continue++ if > > glob.glob(os.path.join(directory, '*.dec')):+ # it is an EDK= II Package+ > > continue++ paths =3D __get_packages_path(directory)+ for = path in > > paths:+ if packages_path =3D=3D '':+ packages= _path =3D path+ > > else:+ packages_path +=3D os.pathsep + path+ return > > packages_path++if __name__ =3D=3D '__main__':+ # Create command line > > argument parser object+ parser =3D argparse.ArgumentParser(+ > > prog=3D__prog__,+ description=3D__description__ + __copyrigh= t__,+ > > conflict_handler=3D'resolve'+ )+ parser.add_argument('directory', > > nargs=3D'+',+ help=3D'Specified directory where package pack= ages are got > > from')+ args =3D parser.parse_args()+ > > print(get_packages_path(args.directory))diff --git > > a/Platform/Intel/Tools/AppendPackagesPath/Readme.md > > b/Platform/Intel/Tools/AppendPackagesPath/Readme.md > > new file mode 100644 > > index 0000000000..66aebee7cf > > --- /dev/null > > +++ b/Platform/Intel/Tools/AppendPackagesPath/Readme.md > > @@ -0,0 +1,28 @@ > > ++# How to use AppendPackagesPath++## Overview++This script calls > > GetPackagesPath.py to collect all package paths under specified > > directories and appends them to PACKAGES_PATH environment variable. A > > sub directory is a qualified package path when an EDKII Package can be > > found under it.++**Notice**:+The old PACKAGES_PATH will be replaced by > > new one.s++## The usage of the tool++### Windows++Usage: > > AppendPackagesPath.bat directory [directory ...]+Copyright(c) 2020, Int= el > > Corporation. All rights reserved.+Options:+ --help, -h Print this = help > screen > > and exit++### Ubuntu++Usage: source AppendPackagesPath.sh directory > > [directory ...]+Copyright(c) 2020, Intel Corporation. All rights > > reserved.+Options:+ --help, -h Print this help screen and exit+Ple= ase > note: > > This script must be \'sourced\' so the environment can be changed.+. > > AppendPackagesPath.sh+source AppendPackagesPath.sh-- > > 2.24.0.windows.2 > > --_002_8AA0A44780D72D4CABD3ED3688D16E3E78FD278ESHSMSX103ccrcor_ Content-Type: application/octet-stream; name="0001-Platform-Intel-Tools-Add-scripts-to-set-PACKAGES_PAT.patch" Content-Description: 0001-Platform-Intel-Tools-Add-scripts-to-set-PACKAGES_PAT.patch Content-Disposition: attachment; filename="0001-Platform-Intel-Tools-Add-scripts-to-set-PACKAGES_PAT.patch"; size=9538; creation-date="Wed, 15 Apr 2020 01:36:48 GMT"; modification-date="Wed, 15 Apr 2020 01:36:48 GMT" Content-Transfer-Encoding: base64 RnJvbSAyYjVmMGY1NzQ0ZGYyMzdhMWJmNWYxZGQyYjkyMjE0ODFkMjU2ZjFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIZW5nIEx1byA8aGVuZy5sdW9AaW50ZWwuY29tPgpEYXRlOiBX ZWQsIDggQXByIDIwMjAgMTI6NTc6MDggKzA4MDAKU3ViamVjdDogW1BBVENIXSBQbGF0Zm9ybS9J bnRlbC9Ub29sczogQWRkIHNjcmlwdHMgdG8gc2V0IFBBQ0tBR0VTX1BBVEgKIGVudmlyb25tZW50 CgpSZWY6IGh0dHBzOi8vYnVnemlsbGEudGlhbm9jb3JlLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjY1 NgoKMS4gQWRkIEdldFBhY2thZ2VzUGF0aC5weSwgaXQgd2lsbCBi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ICA6cmV0dXJuczogUmV0dXJuIGFsbCByZWN1cnNpdmUg cGFja2FnZSBwYXRocw0KKyAgICAgICAgOnJ0eXBlOiBTdHJpbmcgbGlzdA0KKyAgICAiIiINCisN CisgICAgcGF0aHMgPSBbXQ0KKyAgICBjb250YWluX3BhY2thZ2UgPSBGYWxzZQ0KKyAgICBmb3Ig ZmlsZW5hbWUgaW4gb3MubGlzdGRpcihyb290KToNCisgICAgICAgICMgc2tpcCBmaWxlcyB3aG9z ZSBuYW1lIHN0YXJ0cyB3aXRoICIuIiwgc3VjaCBhcyAiLmdpdCINCisgICAgICAgIGlmIGZpbGVu YW1lLnN0YXJ0c3dpdGgoJy4nKToNCisgICAgICAgICAgICBjb250aW51ZQ0KKyAgICAgICAgZmls ZXBhdGggPSBvcy5wYXRoLmpvaW4ocm9vdCwgZmlsZW5hbWUpDQorICAgICAgICBpZiBvcy5wYXRo LmlzZGlyKGZpbGVwYXRoKToNCisgICAgICAgICAgICBpZiBnbG9iLmdsb2Iob3MucGF0aC5qb2lu KGZpbGVwYXRoLCAnKi5kZWMnKSk6DQorICAgICAgICAgICAgICAgICMgaXQgaXMgYW4gRURLIElJ IFBhY2thZ2UNCisgICAgICAgICAgICAgICAgY29udGFpbl9wYWNrYWdlID0gVHJ1ZQ0KKyAgICAg ICAgICAgIGVsc2U6DQorICAgICAgICAgICAgICAgICMgZ2V0IHBhY2thZ2UgcGF0aHMgZm9yIHN1 YmRpcmVjdG9yeSBpZiBpdCBpcyBub3QgcGFja2FnZQ0KKyAgICAgICAgICAgICAgICBwYXRocyA9 IHBhdGhzICsgX19nZXRfcGFja2FnZXNfcGF0aChmaWxlcGF0aCkNCisNCisgICAgaWYgY29udGFp bl9wYWNrYWdlOg0KKyAgICAgICAgIyByb290IGlzIGEgcGFja2FnZSBwYXRoIGJlY2F1c2UgaXQg Y29udGFpbnMgRURLIElJIFBhY2thZ2UNCisgICAgICAgICMgaW4gZmlyc3QgbGV2ZWwgZm9sZGVy LCBpbnNldCBpdCB0byBoZWFkIG9mIGxpc3QNCisgICAgICAgIHBhdGhzLmluc2VydCgwLCByb290 KQ0KKw0KKyAgICAjIHJldHVybiBwYWNrYWdlIHBhdGhzDQorICAgIHJldHVybiBwYXRocw0KKw0K K2RlZiBnZXRfcGFja2FnZXNfcGF0aChkaXJlY3Rvcmllcyk6DQorICAgICIiIiBGb3IgZWFjaCBk aXJlY29yeSBpbiBkaXJlY3RvcmllcywgZ2V0cyBhbGwgcmVjdXJzaXZlIHBhY2thZ2UgcGF0aHMN CisgICAgICAgIGluIHRoaXMgZGlyZWN0b3J5IGFuZCBqb2lucyB0aGVtIGludG8gb25lIHN0cmlu Zy4NCisNCisgICAgICAgIDpwYXJhbSBkaXJlY3RvcmllczogdGhlIGxpc3Qgb2YgZGlyZWN0b3J5 DQorICAgICAgICA6dHlwZSBkaXJlY3RvcmllczogU3RyaW5nIGxpc3QNCisgICAgICAgIDpyZXR1 cm5zOiBSZXR1cm4gc3RyaW5nIG9mIHBhY2thZ2UgcGF0aHMNCisgICAgICAgIDpydHlwZTogU3Ry aW5nDQorICAgICIiIg0KKw0KKyAgICBwYWNrYWdlc19wYXRoID0gJycNCisgICAgZm9yIGRpcmVj dG9yeSBpbiBkaXJlY3RvcmllczoNCisgICAgICAgIGRpcmVjdG9yeSA9IG9zLnBhdGguYWJzcGF0 aChkaXJlY3RvcnkpDQorICAgICAgICBpZiAobm90IG9zLnBhdGguZXhpc3RzKGRpcmVjdG9yeSkp IG9yIChub3Qgb3MucGF0aC5pc2RpcihkaXJlY3RvcnkpKToNCisgICAgICAgICAgICBjb250aW51 ZQ0KKw0KKyAgICAgICAgaWYgZ2xvYi5nbG9iKG9zLnBhdGguam9pbihkaXJlY3RvcnksICcqLmRl YycpKToNCisgICAgICAgICAgICAjIGl0IGlzIGFuIEVESyBJSSBQYWNrYWdlDQorICAgICAgICAg ICAgY29udGludWUNCisNCisgICAgICAgIHBhdGhzID0gX19nZXRfcGFja2FnZXNfcGF0aChkaXJl Y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