Bug 1277087 - Always add in-tree search paths when bootstrapping mach. r=gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 01 Jun 2016 07:37:56 +0900
changeset 373816 235409cbc34e2655390969b228d4637275039a4d
parent 373815 389345ac8f7333604ba1bb391d65c23608bacb68
child 373817 b2bb1b2dfb48a3c62458ce03c9de3ba77c289b88
push id19843
push userbmo:mh+mozilla@glandium.org
push dateWed, 01 Jun 2016 08:24:13 +0000
reviewersgps
bugs1277087
milestone49.0a1
Bug 1277087 - Always add in-tree search paths when bootstrapping mach. r=gps
build/mach_bootstrap.py
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -228,21 +228,18 @@ def bootstrap(topsrcdir, mozilla_dir=Non
     # 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.
-    try:
-        import mach.main
-    except ImportError:
-        sys.path[0:0] = [os.path.join(mozilla_dir, path) for path in SEARCH_PATHS]
-        import mach.main
+    sys.path[0:0] = [os.path.join(mozilla_dir, path) for path in SEARCH_PATHS]
+    import mach.main
 
     def telemetry_handler(context, data):
         # We have not opted-in to telemetry
         if 'BUILD_SYSTEM_TELEMETRY' not in os.environ:
             return
 
         telemetry_dir = os.path.join(get_state_dir()[0], 'telemetry')
         try: