From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 43776211B739C for ; Tue, 15 Jan 2019 01:12:42 -0800 (PST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 01:12:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,481,1539673200"; d="dat'59?scan'59,208,59";a="138384863" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 15 Jan 2019 01:12:41 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 15 Jan 2019 01:12:41 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 15 Jan 2019 01:12:40 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.46]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 17:12:39 +0800 From: "Fan, ZhijuX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [edk2][PATCH] BaseTools:build break if the Path contains SingleFile.Ext Thread-Index: AdSssnSscHZT3aPES+CPp2E1fiBNsA== Date: Tue, 15 Jan 2019 09:12:38 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH] BaseTools:build break if the Path contains SingleFile.Ext 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: Tue, 15 Jan 2019 09:12:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1325 if SingleFile.Path =3D "/foo/bar.Sap/yada/source.S" and=20 SingleFile.Ext =3D ".S". Then key would end up "/foo/bar" instead of "/foo/bar.Sap/yada/source" as intended. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 1aa4a5ca5f..4bffb95ce6 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3012,7 +3012,7 @@ class ModuleAutoGen(AutoGen): self.BuildOption for SingleFile in FileList: if self.BuildRuleOrder and SingleFile.Ext in self.BuildRuleOrd= er 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: --=20 2.14.1.windows.1