[edk2-devel] [Patch 1/1] BaseTools: Create ".cache" folder when initialize Build object

Bob Feng bob.c.feng at intel.com
Fri Jul 19 02:25:50 UTC 2019


Yes. I only see ".cache" folder is created in one place, in "Misc.py".

Thanks,
Bob

-----Original Message-----
From: Kinney, Michael D 
Sent: Friday, July 19, 2019 9:32 AM
To: Feng, Bob C <bob.c.feng at intel.com>; devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>
Cc: Gao, Liming <liming.gao at intel.com>
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 in other places, such as Misc.py?

Mike

> -----Original Message-----
> From: Feng, Bob C
> Sent: Thursday, July 18, 2019 6:13 PM
> To: devel at edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Kinney, Michael D 
> <michael.d.kinney at intel.com>; Gao, Liming <liming.gao at intel.com>
> Subject: [Patch 1/1] BaseTools: Create ".cache" folder when initialize 
> Build object
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1986
> 
> 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 <bob.c.feng at intel.com>
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> ---
>  BaseTools/Source/Python/build/build.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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 =
> mws.join(self.WorkspaceDir, 'Conf')
>          GlobalData.gConfDirectory = ConfDirectoryPath
>          GlobalData.gDatabasePath =
> 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 = WorkspaceDatabase()
>          self.BuildDatabase = self.Db.BuildObject
>          self.Platform = None
>          self.ToolChainFamily = None
>          self.LoadFixAddress = 0
> --
> 2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43995): https://edk2.groups.io/g/devel/message/43995
Mute This Topic: https://groups.io/mt/32521628/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list