mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1690870: Remove "artifact mode" from bootstrap options on M1 Macs r=firefox-build-system-reviewers,andi
As pointed out by Harry, this will help in the short-term with onboarding new developers who will be using M1 macs. Note that this patch doesn't leverage the "instance" classes to define whether they're artifact-mode compatible or not, and that's because: * Most (all except one?) of the systems support artifact mode, therefore * Since this is a temporary workaround, it's more deletable to have a top-level `if/else` than to add a `supports_artifact_mode` property to each Bootstrapper. Differential Revision: https://phabricator.services.mozilla.com/D117946
This commit is contained in:
parent
cade41ef59
commit
c335e37407
@ -36,7 +36,7 @@ from mozboot.util import get_state_dir
|
||||
# Use distro package to retrieve linux platform information
|
||||
import distro
|
||||
|
||||
APPLICATION_CHOICE = """
|
||||
ARTIFACT_MODE_NOTE = """
|
||||
Note on Artifact Mode:
|
||||
|
||||
Artifact builds download prebuilt C++ components rather than building
|
||||
@ -46,10 +46,13 @@ Artifact builds are recommended for people working on Firefox or
|
||||
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
|
||||
for those working on C++ code. For more information see:
|
||||
https://firefox-source-docs.mozilla.org/contributing/build/artifact_builds.html.
|
||||
""".lstrip()
|
||||
|
||||
APPLICATION_CHOICE = """
|
||||
Please choose the version of Firefox you want to build:
|
||||
%s
|
||||
Your choice: """
|
||||
Your choice:
|
||||
""".strip()
|
||||
|
||||
APPLICATIONS = OrderedDict(
|
||||
[
|
||||
@ -101,14 +104,7 @@ mozilla-unified).
|
||||
Would you like to run a few configuration steps to ensure Git is
|
||||
optimally configured?"""
|
||||
|
||||
DEBIAN_DISTROS = (
|
||||
"debian",
|
||||
"ubuntu",
|
||||
"linuxmint",
|
||||
"elementary",
|
||||
"neon",
|
||||
"pop",
|
||||
)
|
||||
DEBIAN_DISTROS = ("debian", "ubuntu", "linuxmint", "elementary", "neon", "pop")
|
||||
|
||||
ADD_GIT_CINNABAR_PATH = """
|
||||
To add git-cinnabar to the PATH, edit your shell initialization script, which
|
||||
@ -288,17 +284,29 @@ class Bootstrapper(object):
|
||||
|
||||
def bootstrap(self, settings):
|
||||
if self.choice is None:
|
||||
applications = APPLICATIONS
|
||||
if isinstance(self.instance, OSXBootstrapperLight):
|
||||
applications = {
|
||||
key: value
|
||||
for key, value in applications.items()
|
||||
if "artifact_mode" not in value
|
||||
}
|
||||
print(
|
||||
'Note: M1 Macs don\'t support "Artifact Mode", so '
|
||||
"it has been removed from the list of options below"
|
||||
)
|
||||
else:
|
||||
print(ARTIFACT_MODE_NOTE)
|
||||
|
||||
# Like ['1. Firefox for Desktop', '2. Firefox for Android Artifact Mode', ...].
|
||||
labels = [
|
||||
"%s. %s" % (i, name) for i, name in enumerate(APPLICATIONS.keys(), 1)
|
||||
"%s. %s" % (i, name) for i, name in enumerate(applications.keys(), 1)
|
||||
]
|
||||
choices = [" {} [default]".format(labels[0])]
|
||||
choices += [" {}".format(label) for label in labels[1:]]
|
||||
prompt = APPLICATION_CHOICE % "\n".join(choices)
|
||||
prompt_choice = self.instance.prompt_int(
|
||||
prompt=prompt,
|
||||
low=1,
|
||||
high=len(APPLICATIONS),
|
||||
prompt=prompt, low=1, high=len(APPLICATIONS)
|
||||
)
|
||||
name, application = list(APPLICATIONS.items())[prompt_choice - 1]
|
||||
elif self.choice in APPLICATIONS.keys():
|
||||
@ -536,7 +544,7 @@ def current_firefox_checkout(env, hg=None):
|
||||
HG_ROOT_REVISIONS = set(
|
||||
[
|
||||
# From mozilla-unified.
|
||||
"8ba995b74e18334ab3707f27e9eb8f4e37ba3d29",
|
||||
"8ba995b74e18334ab3707f27e9eb8f4e37ba3d29"
|
||||
]
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user