Bug 1476263 - Suggest to create mozconfig if it does not exist. r=gps
authorAndreas Tolfsen <ato@sny.no>
Tue, 17 Jul 2018 13:47:19 +0100
changeset 823521 953910565893b2da0891a9d033d3fa0a6bad8b81
parent 823520 fb14942bee960713f30179ea93d8964f1dbb06ed
child 823522 53ea40188efab3406b5ec7709699bb673176bee6
push id117712
push userrwood@mozilla.com
push dateFri, 27 Jul 2018 15:10:54 +0000
reviewersgps
bugs1476263
milestone63.0a1
Bug 1476263 - Suggest to create mozconfig if it does not exist. r=gps A frequent question when mentoring new contributors is what "your mozconfig file" is. By suggesting to create the file if it does not exist, we can hopefully alleviate some new contributor frustration. This change does unfortunately not take into account that the mozconfig file can be named .mozconfig or even be in a designated location defined by the MOZCONFIG environment variable, but it seems reasonable to assume that developers who already know about those alternatives will know which file to edit, and that what we should optimise for during the bootstrapping process is to get new contributors up and running quickly.
python/mozboot/mozboot/android.py
python/mozboot/mozboot/base.py
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -38,46 +38,48 @@ bootstrap again.
 INSTALLING_ANDROID_PACKAGES = '''
 We are now installing the following Android packages:
 %s
 You may be prompted to agree to the Android license. You may see some of
 output as packages are downloaded and installed.
 '''
 
 MOBILE_ANDROID_MOZCONFIG_TEMPLATE = '''
-Paste the lines between the chevrons (>>> and <<<) into your mozconfig file:
+Paste the lines between the chevrons (>>> and <<<) into your
+$topsrcdir/mozconfig file, or create the file if it does not exist:
 
-<<<
+>>>
 # Build Firefox for Android:
 ac_add_options --enable-application=mobile/android
 ac_add_options --target=arm-linux-androideabi
 
 {extra_lines}
 # With the following Android SDK and NDK:
 ac_add_options --with-android-sdk="{sdk_path}"
 ac_add_options --with-android-ndk="{ndk_path}"
->>>
+<<<
 '''
 
 MOBILE_ANDROID_ARTIFACT_MODE_MOZCONFIG_TEMPLATE = '''
-Paste the lines between the chevrons (>>> and <<<) into your mozconfig file:
+Paste the lines between the chevrons (>>> and <<<) into your
+$topsrcdir/mozconfig file, or create the file if it does not exist:
 
-<<<
+>>>
 # Build Firefox for Android Artifact Mode:
 ac_add_options --enable-application=mobile/android
 ac_add_options --target=arm-linux-androideabi
 ac_add_options --enable-artifact-builds
 
 {extra_lines}
 # With the following Android SDK:
 ac_add_options --with-android-sdk="{sdk_path}"
 
 # Write build artifacts to:
 mk_add_options MOZ_OBJDIR=./objdir-frontend
->>>
+<<<
 '''
 
 
 def install_mobile_android_sdk_or_ndk(url, path):
     '''
     Fetch an Android SDK or NDK from |url| and unpack it into
     the given |path|.
 
--- a/python/mozboot/mozboot/base.py
+++ b/python/mozboot/mozboot/base.py
@@ -128,22 +128,23 @@ system, ensure it is on the $PATH and tr
 install Rust manually.
 
 We recommend the installer from https://rustup.rs/ for installing Rust,
 but you may be able to get a recent enough version from a software install
 tool or package manager on your system, or directly from https://rust-lang.org/
 '''
 
 BROWSER_ARTIFACT_MODE_MOZCONFIG = '''
-Paste the lines between the chevrons (>>> and <<<) into your mozconfig file:
+Paste the lines between the chevrons (>>> and <<<) into your
+$topsrcdir/mozconfig file, or create the file if it does not exist:
 
-<<<
+>>>
 # Automatically download and use compiled C++ components:
 ac_add_options --enable-artifact-builds
->>>
+<<<
 '''
 
 # Upgrade Mercurial older than this.
 # This should match OLDEST_NON_LEGACY_VERSION from
 # the hg setup wizard in version-control-tools.
 MODERN_MERCURIAL_VERSION = LooseVersion('4.3.3')
 
 # Upgrade Python older than this.