From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=52.95.48.154; helo=smtp-fw-6001.amazon.com; envelope-from=prvs=809865459=yeazelm@amazon.com; receiver=edk2-devel@lists.01.org Received: from smtp-fw-6001.amazon.com (smtp-fw-6001.amazon.com [52.95.48.154]) (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 AB18321A02937 for ; Fri, 5 Oct 2018 13:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1538770057; x=1570306057; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=IS3kW5nUlRoQKZ3/b3ss3KtWQHXHIWQCiGN/max2zRA=; b=Xu//i5ndPVu4290nQ7jJ+1reQMCKnZIWQOPdlaWj9X6kLEQqCtNnWNZD XH4bqOsMu8YrMBsOt6WTtJi76BPjIqH8wXTdvNkOuw1JIcRZRQSRbIX5J ijVQizJIkAuliLox6zi+EA1wZsbSUWShslMpY1pyPSzMYEZEWbwbvpna5 Q=; X-IronPort-AV: E=Sophos;i="5.54,345,1534809600"; d="scan'208";a="360896678" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Oct 2018 20:07:36 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w95K7UQP045920 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 5 Oct 2018 20:07:35 GMT Received: from EX13D04UWA002.ant.amazon.com (10.43.160.31) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Oct 2018 20:07:34 +0000 Received: from EX13D04UWA003.ant.amazon.com (10.43.160.212) by EX13D04UWA002.ant.amazon.com (10.43.160.31) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Oct 2018 20:07:34 +0000 Received: from EX13D04UWA003.ant.amazon.com ([10.43.160.212]) by EX13D04UWA003.ant.amazon.com ([10.43.160.212]) with mapi id 15.00.1367.000; Fri, 5 Oct 2018 20:07:34 +0000 From: "Yeazel (Prime Air), Matt" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] BaseTools: Add support for dots in paths Thread-Index: AQHUXMgTzQq1z+qIT0mSZ+AtITA/OKUQ9JqAgAAb7Ds= Date: Fri, 5 Oct 2018 20:07:34 +0000 Message-ID: <1538770053707.32060@amazon.com> References: <38601194f721dcbf6c2b10c981e25714c073a854.1538756540.git.yeazelm@amazon.com>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.162.104] MIME-Version: 1.0 Precedence: Bulk Subject: Re: [PATCH] BaseTools: Add support for dots in paths X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2018 20:07:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable splitext is probably the exact function we want. I noticed os.path is used = extensively through this file but not in this case and was concerned there = was a reason behind using SingleFile.Ext to split so I chose to change it a= s minimally as possible to avoid unintended side effects. I can switch to u= sing os.path.splitext as well if that would be more desired.=0A= =0A= Matthew=0A= ________________________________________=0A= From: Carsey, Jaben =0A= Sent: Friday, October 5, 2018 11:13 AM=0A= To: Yeazel (Prime Air), Matt; edk2-devel@lists.01.org=0A= Subject: RE: [edk2] [PATCH] BaseTools: Add support for dots in paths=0A= =0A= Matthew,=0A= =0A= 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...=0A= =0A= -Jaben=0A= =0A= > -----Original Message-----=0A= > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of=0A= > Matthew Yeazel=0A= > Sent: Friday, October 05, 2018 10:13 AM=0A= > To: edk2-devel@lists.01.org=0A= > Cc: Matthew Yeazel =0A= > Subject: [edk2] [PATCH] BaseTools: Add support for dots in paths=0A= >=0A= > The split assumes that there isn't a dot in the path to the file but=0A= > this isn't always the case. This will support more diverse paths.=0A= >=0A= > Contributed-under: TianoCore Contribution Agreement 1.1=0A= > Note: Section 3, paragraph 1, is read as an OR.=0A= > Signed-off-by: Matthew Yeazel =0A= > ---=0A= > BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-=0A= > 1 file changed, 1 insertion(+), 1 deletion(-)=0A= >=0A= > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py=0A= > b/BaseTools/Source/Python/AutoGen/AutoGen.py=0A= > index eb1b283889..54ad4a5247 100644=0A= > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py=0A= > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py=0A= > @@ -3062,7 +3062,7 @@ class ModuleAutoGen(AutoGen):=0A= > self.BuildOption=0A= > for SingleFile in FileList:=0A= > if self.BuildRuleOrder and SingleFile.Ext in self.BuildRuleO= rder and=0A= > SingleFile.Ext in self.BuildRules:=0A= > - key =3D SingleFile.Path.split(SingleFile.Ext)[0]=0A= > + key =3D SingleFile.Path.rsplit(SingleFile.Ext, 1)[0]=0A= > if key in Order_Dict:=0A= > Order_Dict[key].append(SingleFile.Ext)=0A= > else:=0A= > --=0A= > 2.19.0=0A= >=0A= > _______________________________________________=0A= > edk2-devel mailing list=0A= > edk2-devel@lists.01.org=0A= > https://lists.01.org/mailman/listinfo/edk2-devel=0A=