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.93, mailfrom: liming.gao@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Thu, 18 Jul 2019 22:12:39 -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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 22:12:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="191827338" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2019 22:12:39 -0700 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 22:12:39 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 22:12:38 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.3]) with mapi id 14.03.0439.000; Fri, 19 Jul 2019 13:12:36 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Feng, Bob C" CC: "Kinney, Michael D" Subject: Re: [edk2-devel] [Patch 1/1 V2] BaseTools: Create ".cache" folder when initialize Build object Thread-Topic: [edk2-devel] [Patch 1/1 V2] BaseTools: Create ".cache" folder when initialize Build object Thread-Index: AQHVPdkX4Y5+UtGijU6863iq69Vy8KbRZXHQ Date: Fri, 19 Jul 2019 05:12:36 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4AC44E@SHSMSX104.ccr.corp.intel.com> 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: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Bob Feng >Sent: Friday, July 19, 2019 10:24 AM >To: devel@edk2.groups.io >Cc: Feng, Bob C ; Kinney, Michael D >; Gao, Liming >Subject: [edk2-devel] [Patch 1/1 V2] BaseTools: Create ".cache" folder wh= en >initialize Build object > >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1986 > >Create "Conf/.cache" folder as early as possible >so that the later code do need to check >if it exits and then create it. > >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(-) > >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 > >- # >- # 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 t= he >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 > > >