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
This commit is contained in:
Mitchell Hentges 2021-07-16 21:47:53 +00:00
Родитель 83721fed8d
Коммит 75de81c99a
2 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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):