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.115, mailfrom: michael.d.kinney@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Thu, 18 Jul 2019 22:10:59 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 22:10:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="191827038" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2019 22:10:58 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 22:10:58 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.128]) by ORSMSX154.amr.corp.intel.com ([169.254.11.96]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 22:10:57 -0700 From: "Michael D Kinney" To: "Feng, Bob C" , "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Gao, Liming" Subject: Re: [Patch 1/1 V2] BaseTools: Create ".cache" folder when initialize Build object Thread-Topic: [Patch 1/1 V2] BaseTools: Create ".cache" folder when initialize Build object Thread-Index: AQHVPdkW2AYT4pxcDEGikUnQzpoEQabRZJJA Date: Fri, 19 Jul 2019 05:10:57 +0000 Message-ID: References: <20190719022410.9752-1-bob.c.feng@intel.com> In-Reply-To: <20190719022410.9752-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 Bob, Thanks for the quick fix. I have tested this change with the Vlv2TbltDevicePkg updates that are under review that include the use of a PREBUILD script. It works when the .cache dir is not present. Reviewed-by: Michael D Kinney Mike > -----Original Message----- > From: Feng, Bob C > Sent: Thursday, July 18, 2019 7:24 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Kinney, Michael > D ; Gao, Liming > > Subject: [Patch 1/1 V2] 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 > --- > V2: Remove the ".cache" creation action in other place. > BaseTools/Source/Python/Common/Misc.py | 7 +------ > BaseTools/Source/Python/build/build.py | 3 ++- > 2 files changed, 3 insertions(+), 7 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Common/Misc.py > b/BaseTools/Source/Python/Common/Misc.py > index 9a63463913d0..27dbdace4252 100644 > --- a/BaseTools/Source/Python/Common/Misc.py > +++ b/BaseTools/Source/Python/Common/Misc.py > @@ -244,17 +244,12 @@ def ProcessDuplicatedInf(Path, > BaseName, Workspace): > if '.' in Filename: > Filename =3D BaseName + Path.BaseName + > Filename[Filename.rfind('.'):] > else: > Filename =3D BaseName + Path.BaseName >=20 > - # > - # If -N is specified on command line, cache is > disabled > - # The directory has to be created > - # > DbDir =3D os.path.split(GlobalData.gDatabasePath)[0] > - if not os.path.exists(DbDir): > - os.makedirs(DbDir) > + > # > # A temporary INF is copied to database path which > must have write permission > # The temporary will be removed at the end of build > # In case of name conflict, the file name is > # FILE_GUIDBaseName (0D1B936F-68F3-4589-AFCC- > FB8B7AEBC836module.inf) > 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