From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2FF1C2194D3B8 for ; Fri, 5 Oct 2018 11:14:00 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 11:14:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,345,1534834800"; d="scan'208";a="97769835" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 05 Oct 2018 11:13:20 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 5 Oct 2018 11:13:16 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by FMSMSX109.amr.corp.intel.com ([169.254.15.83]) with mapi id 14.03.0319.002; Fri, 5 Oct 2018 11:13:16 -0700 From: "Carsey, Jaben" To: Matthew Yeazel , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] BaseTools: Add support for dots in paths Thread-Index: AQHUXM8Rr0oJ22191Uy1Z0YGiCRsT6UQ82fw Date: Fri, 5 Oct 2018 18:13:15 +0000 Message-ID: References: <38601194f721dcbf6c2b10c981e25714c073a854.1538756540.git.yeazelm@amazon.com> In-Reply-To: <38601194f721dcbf6c2b10c981e25714c073a854.1538756540.git.yeazelm@amazon.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjZmYWFmZjMtOWRjNy00NTk0LWI2ZWQtYWZiNjI2NWNmMTE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidkR1ZzIwUlF4d1p3YVIrN2tpb2dyYWJFcWd2UzhnaUtoVDdRR3hnOEwwKzlyb2NvN1wveUNJYWJYV0RmMllRSncifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools: Add support for dots in paths X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2018 18:14:01 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Matthew, Would os.path. (maybe splitext) be a better function than using = the string rsplit function? It just seems like we should use the python f= ile path manipulation functions instead of trying to trick the string manip= ulation routines into the same behavior... -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Matthew Yeazel > Sent: Friday, October 05, 2018 10:13 AM > To: edk2-devel@lists.01.org > Cc: Matthew Yeazel > Subject: [edk2] [PATCH] BaseTools: Add support for dots in paths >=20 > The split assumes that there isn't a dot in the path to the file but > this isn't always the case. This will support more diverse paths. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Note: Section 3, paragraph 1, is read as an OR. > Signed-off-by: Matthew Yeazel > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > b/BaseTools/Source/Python/AutoGen/AutoGen.py > index eb1b283889..54ad4a5247 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -3062,7 +3062,7 @@ class ModuleAutoGen(AutoGen): > self.BuildOption > for SingleFile in FileList: > if self.BuildRuleOrder and SingleFile.Ext in self.BuildRuleO= rder and > SingleFile.Ext in self.BuildRules: > - key =3D SingleFile.Path.split(SingleFile.Ext)[0] > + key =3D SingleFile.Path.rsplit(SingleFile.Ext, 1)[0] > if key in Order_Dict: > Order_Dict[key].append(SingleFile.Ext) > else: > -- > 2.19.0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel