From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Thu, 18 Jul 2019 19:25:53 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 19:25:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="252023014" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 18 Jul 2019 19:25:52 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 19:25:52 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 19:25:52 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.232]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.60]) with mapi id 14.03.0439.000; Fri, 19 Jul 2019 10:25:50 +0800 From: "Bob Feng" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [Patch 1/1] BaseTools: Create ".cache" folder when initialize Build object Thread-Topic: [Patch 1/1] BaseTools: Create ".cache" folder when initialize Build object Thread-Index: AQHVPc8sOsfHd7myGESRBK72GGnkpKbQoaYAgACVCgA= Date: Fri, 19 Jul 2019 02:25:50 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160B43280@SHSMSX105.ccr.corp.intel.com> References: <20190719011302.7660-1-bob.c.feng@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. I only see ".cache" folder is created in one place, in "Misc.py". Thanks, Bob -----Original Message----- From: Kinney, Michael D=20 Sent: Friday, July 19, 2019 9:32 AM To: Feng, Bob C ; devel@edk2.groups.io; Kinney, Micha= el D Cc: Gao, Liming Subject: RE: [Patch 1/1] BaseTools: Create ".cache" folder when initialize = Build object Hi Bob, If you create the .cache dir here, can you remove the .cache dir creation i= n other places, such as Misc.py? Mike > -----Original Message----- > From: Feng, Bob C > Sent: Thursday, July 18, 2019 6:13 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Kinney, Michael D=20 > ; Gao, Liming > Subject: [Patch 1/1] BaseTools: Create ".cache" folder when initialize=20 > Build object >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1986 >=20 > Create "Conf/.cache" folder as early as possible so that the later=20 > code do need to check if it exits and then create it. >=20 > Signed-off-by: Bob Feng > Cc: Michael D Kinney > Cc: Liming Gao > --- > BaseTools/Source/Python/build/build.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/build/build.py > b/BaseTools/Source/Python/build/build.py > index d6006b651f77..6bc528974db1 100644 > --- a/BaseTools/Source/Python/build/build.py > +++ b/BaseTools/Source/Python/build/build.py > @@ -771,11 +771,12 @@ class Build(): > else: > # Get standard WORKSPACE/Conf use the absolute path=20 > to the WORKSPACE/Conf > ConfDirectoryPath =3D > mws.join(self.WorkspaceDir, 'Conf') > GlobalData.gConfDirectory =3D ConfDirectoryPath > GlobalData.gDatabasePath =3D > os.path.normpath(os.path.join(ConfDirectoryPath, > GlobalData.gDatabasePath)) > - > + if not > os.path.exists(os.path.join(GlobalData.gConfDirectory, > '.cache')): > + > os.makedirs(os.path.join(GlobalData.gConfDirectory, > + '.cache')) > self.Db =3D WorkspaceDatabase() > self.BuildDatabase =3D self.Db.BuildObject > self.Platform =3D None > self.ToolChainFamily =3D None > self.LoadFixAddress =3D 0 > -- > 2.20.1.windows.1