From 75de81c99a0657def1a5b4471661c854cad94470 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Fri, 16 Jul 2021 21:47:53 +0000 Subject: [PATCH] Bug 1720935: Move state_dir creation comment r=ahal I'm guessing that the code moved to the bootstrap command but the associated comment was forgotten and left abandoned, which is very sad. Differential Revision: https://phabricator.services.mozilla.com/D120098 --- build/mach_bootstrap.py | 8 -------- python/mozboot/mozboot/bootstrap.py | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index c3e676b75dad..ce3e8dcd96b4 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -225,14 +225,6 @@ def bootstrap(topsrcdir): site_paths = set(site.getsitepackages() + [site.getusersitepackages()]) sys.path = [path for path in sys.path if path not in site_paths] - # Global build system and mach state is stored in a central directory. By - # default, this is ~/.mozbuild. However, it can be defined via an - # environment variable. We detect first run (by lack of this directory - # existing) and notify the user that it will be created. The logic for - # creation is much simpler for the "advanced" environment variable use - # case. For default behavior, we educate users and give them an opportunity - # to react. We always exit after creating the directory because users don't - # like surprises. sys.path[0:0] = mach_sys_path(topsrcdir) import mach.base import mach.main diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py index 4d0b141e3fae..57cb6d092d5c 100644 --- a/python/mozboot/mozboot/bootstrap.py +++ b/python/mozboot/mozboot/bootstrap.py @@ -227,6 +227,13 @@ class Bootstrapper(object): self.instance = cls(**args) def create_state_dir(self): + # Global build system and mach state is stored in a central directory. By + # default, this is ~/.mozbuild. However, it can be defined via an + # environment variable. We detect first run (by lack of this directory + # existing) and notify the user that it will be created. The logic for + # creation is much simpler for the "advanced" environment variable use + # case. For default behavior, we educate users and give them an opportunity + # to react. state_dir = get_state_dir() if not os.path.exists(state_dir):