public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "Feng, Bob C" <bob.c.feng@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [Patch 1/1] BaseTools: Create ".cache" folder when initialize Build object
Date: Fri, 19 Jul 2019 01:31:30 +0000	[thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F5B9D78F10@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <20190719011302.7660-1-bob.c.feng@intel.com>

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@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@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@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@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


  reply	other threads:[~2019-07-19  1:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  1:13 [Patch 1/1] BaseTools: Create ".cache" folder when initialize Build object Bob Feng
2019-07-19  1:31 ` Michael D Kinney [this message]
2019-07-19  2:25   ` Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E92EE9817A31E24EB0585FDF735412F5B9D78F10@ORSMSX113.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox