From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.d.kinney@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Thu, 18 Jul 2019 18:31:32 -0700 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; 18 Jul 2019 18:31:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="179470816" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga002.jf.intel.com with ESMTP; 18 Jul 2019 18:31:31 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 18:31:30 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.128]) by ORSMSX116.amr.corp.intel.com ([169.254.7.102]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 18:31:30 -0700 From: "Michael D Kinney" To: "Feng, Bob C" , "devel@edk2.groups.io" , "Kinney, Michael D" 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: AQHVPc8skMZM2AE/CUCfIehVsygaYKbRJ4rg Date: Fri, 19 Jul 2019 01:31:30 +0000 Message-ID: References: <20190719011302.7660-1-bob.c.feng@intel.com> In-Reply-To: <20190719011302.7660-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Bob, If you create the .cache dir here, can you remove the=20 .cache dir creation in 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 ; Gao, Liming > > Subject: [Patch 1/1] BaseTools: Create ".cache" folder > when initialize 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 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 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