From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.3797.1578618371371016882 for ; Thu, 09 Jan 2020 17:06:11 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 17:06:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,414,1571727600"; d="scan'208";a="229541949" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga001.fm.intel.com with ESMTP; 09 Jan 2020 17:06:10 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.106]) by ORSMSX108.amr.corp.intel.com ([169.254.2.134]) with mapi id 14.03.0439.000; Thu, 9 Jan 2020 17:06:10 -0800 From: "Nate DeSimone" To: =?iso-8859-1?Q?Philippe_Mathieu-Daud=E9?= , "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: build_linux_installer.py path fixes Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: build_linux_installer.py path fixes Thread-Index: AQHVvFoSv5B6emvnvE6PPnjmiicVXqfYUTcAgACoF4CACjH/0A== Date: Fri, 10 Jan 2020 01:06:09 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5C998C8@ORSMSX114.amr.corp.intel.com> References: <20191227020452.9085-1-nathaniel.l.desimone@intel.com> <4CF3A9EB60ABDA47BE7821A4DA3A0A3353CCB72A@ORSMSX116.amr.corp.intel.com> <53dd0ca7-1c36-9003-87bc-a9f99154235e@redhat.com> In-Reply-To: <53dd0ca7-1c36-9003-87bc-a9f99154235e@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2I0YWEwMzItNGQyMS00YmMxLTg2ZTktNTUxYjBjMjEyYThiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTldESVV5Y3lvVkFMZmFjYzd5MnJZZTVtSm1heHFQbVgzc0xnN3NjTkkrbk5jRVwvMDExaTJXcmhcL0lWOE9cL2h4ZCJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Philippe, I sincerely appreciate the code review, thank you! I have addressed your fe= edback, please see PATCH V2. Thanks, Nate -----Original Message----- From: Philippe Mathieu-Daud=E9 =20 Sent: Thursday, January 2, 2020 9:24 PM To: devel@edk2.groups.io; Desimone, Ashley E ;= Desimone, Nathaniel L Cc: Pandya, Puja ; Bjorge, Erik C ; Bret Barkelew Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: build_lin= ux_installer.py path fixes Hi Nate, > From: Nate DeSimone >=20 > Make path handling in build_linux_installer.py more platform agnostic >=20 > Cc: Ashley DeSimone > Cc: Puja Pandya > Cc: Erik Bjorge > Cc: Bret Barkelew > Signed-off-by: Nate DeSimone > --- > build-scripts/build_linux_installer.py | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/build-scripts/build_linux_installer.py=20 > b/build-scripts/build_linux_installer.py > index 84ccf79..df316b9 100755 > --- a/build-scripts/build_linux_installer.py > +++ b/build-scripts/build_linux_installer.py > @@ -21,7 +21,7 @@ def main(): > os.environ['BUILD_NUMBER'] =3D args.build >=20 > # Step 1: Create required directory structure > - dist_root =3D os.path.abspath('../dist/self_extract') > + dist_root =3D=20 > + os.path.abspath('..{0}dist{0}self_extract'.format(os.sep)) The rest of this file already use os.path.join(), can we use it instead of = format(os.sep)? dist_root =3D os.path.abspath(os.path.join('..', 'dist', 'self_extract')) > if not os.path.isdir(os.path.join(dist_root, 'wheels')): > os.makedirs(os.path.join(dist_root, 'wheels')) > if not os.path.isdir(os.path.join(dist_root, 'config')): > @@ -35,7 +35,7 @@ def main(): > return 1 >=20 > # Step 3: Copy required files > - inst_root =3D os.path.abspath('../edkrepo_installer') > + inst_root =3D=20 > + os.path.abspath('..{0}edkrepo_installer'.format(os.sep)) inst_root =3D os.path.abspath(os.path.join('..', 'edkrepo_installer= ')) > ven_root =3D os.path.join(inst_root, 'Vendor') > linux_root =3D os.path.join(inst_root, 'linux-scripts') > try: > @@ -55,7 +55,7 @@ def main(): >=20 > # Step 4: Package installer files > try: > - subprocess.run('./final_copy.py', check=3DTrue) > + subprocess.run('.{0}final_copy.py'.format(os.sep),=20 > + check=3DTrue) Maybe we can directly simplify as: subprocess.run('final_copy.py', check=3DTrue) > except: > print('Failed to generate installer package') > return 1 > @@ -65,7 +65,7 @@ def main(): > shutil.rmtree(dist_root, ignore_errors=3DTrue) > except: > print('Failed to remove temporary files') > - os.unlink('./final_copy.py') > + os.unlink('.{0}final_copy.py'.format(os.sep)) Similarly: os.unlink('final_copy.py') >=20 > return 0 >=20 > -- > 2.20.1