Bug 1353460 Asked the user to restart the shell before building from source. draft
authorUtkarsh Anand <uanand009@gmail.com>
Thu, 06 Apr 2017 08:27:57 +0530
changeset 556560 4e9741efb647c75b05e7b604b0eda18acba4f808
parent 555310 b5d8b27a753725c1de41ffae2e338798f3b5cacd
child 622922 2a5ede66dd3852c85167bc064f8fb149bc36a20a
push id52583
push userbmo:uanand009@gmail.com
push dateThu, 06 Apr 2017 02:59:36 +0000
bugs1353460
milestone55.0a1
Bug 1353460 Asked the user to restart the shell before building from source. When downloading rust manually, it's mandatory to restart the shell, as the script does not export the PATH environment variable. This fix also ensures that the rust version in PATH is modern enough for a successful build. MozReview-Commit-ID: HdLpiLPBLW7
python/mozboot/mozboot/bootstrap.py
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -7,16 +7,17 @@ from __future__ import print_function
 
 import platform
 import sys
 import os
 import subprocess
 
 # Don't forgot to add new mozboot modules to the bootstrap download
 # list in bin/bootstrap.py!
+from mozboot.base import MODERN_RUST_VERSION
 from mozboot.centosfedora import CentOSFedoraBootstrapper
 from mozboot.debian import DebianBootstrapper
 from mozboot.freebsd import FreeBSDBootstrapper
 from mozboot.gentoo import GentooBootstrapper
 from mozboot.osx import OSXBootstrapper
 from mozboot.openbsd import OpenBSDBootstrapper
 from mozboot.archlinux import ArchlinuxBootstrapper
 from mozboot.windows import WindowsBootstrapper
@@ -278,16 +279,18 @@ class Bootstrapper(object):
             if dest:
                 dest = os.path.expanduser(dest)
                 have_clone = clone_firefox(self.instance.which('hg'), dest)
 
         if not have_clone:
             print(SOURCE_ADVERTISE)
 
         print(self.finished % name)
+        if not (self.instance.which('rustc') and self.instance._parse_version('rustc') >= MODERN_RUST_VERSION):
+            print("To build %s, please restart the shell (Start a new terminal window)" % name)
 
         # Like 'suggest_browser_mozconfig' or 'suggest_mobile_android_mozconfig'.
         getattr(self.instance, 'suggest_%s_mozconfig' % application)()
 
 
 def update_vct(hg, root_state_dir):
     """Ensure version-control-tools in the state directory is up to date."""
     vct_dir = os.path.join(root_state_dir, 'version-control-tools')