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.120, mailfrom: bob.c.feng@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Sun, 21 Jul 2019 18:25:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2019 18:25:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,292,1559545200"; d="scan'208";a="159732106" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 21 Jul 2019 18:25:13 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 21 Jul 2019 18:25:12 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 21 Jul 2019 18:25:13 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 21 Jul 2019 18:25:12 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.232]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.240]) with mapi id 14.03.0439.000; Mon, 22 Jul 2019 09:25:11 +0800 From: "Bob Feng" To: "Kinney, Michael D" , "Gao, Liming" , "devel@edk2.groups.io" 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: AQHVPdkXFFDGME2uXEiVkm57qPAogabQ3uOAgAT938A= Date: Mon, 22 Jul 2019 01:25:10 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160B44EE6@SHSMSX105.ccr.corp.intel.com> References: <20190719022410.9752-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 Pushed @ 5f89bcc4604ea9e439039d873e34a8c06b47c707 -----Original Message----- From: Kinney, Michael D=20 Sent: Friday, July 19, 2019 1:11 PM To: Feng, Bob C ; devel@edk2.groups.io; Kinney, Micha= el D Cc: Gao, Liming Subject: RE: [Patch 1/1 V2] BaseTools: Create ".cache" folder when initiali= ze Build object Bob, Thanks for the quick fix. I have tested this change with the Vlv2TbltDevic= ePkg updates that are under review that include the use of a PREBUILD scrip= t. 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=20 > ; 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=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 > --- > V2: Remove the ".cache" creation action in other place. > BaseTools/Source/Python/Common/Misc.py | 7 +------=20 > 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,=20 > Workspace): > if '.' in Filename: > Filename =3D BaseName + Path.BaseName +=20 > 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=20 > 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=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