From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 35DB681D91 for ; Mon, 14 Nov 2016 04:35:37 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP; 14 Nov 2016 04:35:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,638,1473145200"; d="scan'208";a="30794972" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 14 Nov 2016 04:35:30 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Nov 2016 04:35:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Nov 2016 04:35:30 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Mon, 14 Nov 2016 20:35:28 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: FILE DATA to support relative path under Multiple workspace Thread-Index: AQHSPmBuU/NZK9+XokKJyQpD2rg4o6DYalpw Date: Mon, 14 Nov 2016 12:35:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4B1A1B@shsmsx102.ccr.corp.intel.com> References: <1479118687-6696-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1479118687-6696-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDVhZjJiZjctMDk0Yy00YjQ0LWI4ZTEtYzFjYzBlZWZkNGNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik9nb2t0b3NwUTVPZVh1alVrK1RcL2FFQ2FjZlpWZlB2aE94d21leEozVURBPSJ9 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: FILE DATA to support relative path under Multiple workspace X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 12:35:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao -----Original Message----- From: Zhu, Yonghong=20 Sent: Monday, November 14, 2016 6:18 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [Patch] BaseTools: FILE DATA to support relative path under Multip= le workspace Fix the bug that FILE DATA to support relative path under Multiple workspace. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index 5489df5..0d30283 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -52,11 +52,11 @@ import Common.GlobalData as GlobalData from Common.Expression import * from Common import GlobalData from Common.String import ReplaceMacro import uuid from Common.Misc import tdict - +from Common.MultipleWorkspace import MultipleWorkspace as mws import Common.LongFilePathOs as os from Common.LongFilePathSupport import OpenLongFilePath as open from Capsule import EFI_CERT_TYPE_PKCS7_GUID from Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID =20 @@ -3501,10 +3501,13 @@ class FdfParser: raise Warning("expected File name", self.FileName, self.Curren= tLineNumber) =20 AnyFileName =3D self.__Token self.__VerifyFile(AnyFileName) =20 + if not os.path.isabs(AnyFileName): + AnyFileName =3D mws.join(GenFdsGlobalVariable.WorkSpaceDir, An= yFileName) + return AnyFileName =20 ## __GetAnyFileStatement() method # # Get AnyFile for capsule --=20 2.6.1.windows.1