Bug 1260327 - Remove the --recheck option of config.status. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 13 Apr 2016 11:51:16 +0900
changeset 350311 c52f5e471e7089348405f04cf7badaded1543b3e
parent 350310 5be027826cb3b4d89a1637ad64da5121c5ab99b4
child 350312 87658d3e65adfebc329456e3387a452aca816bb5
child 350314 16fc531a1fc484cd4b5b71278a96735cf4304674
push id15292
push userbmo:mh+mozilla@glandium.org
push dateWed, 13 Apr 2016 08:16:21 +0000
reviewerschmanchester
bugs1260327
milestone48.0a1
Bug 1260327 - Remove the --recheck option of config.status. r?chmanchester With mozconfigs injecting options, it never really worked as intended.
python/mozbuild/mozbuild/config_status.py
--- a/python/mozbuild/mozbuild/config_status.py
+++ b/python/mozbuild/mozbuild/config_status.py
@@ -69,19 +69,16 @@ def config_status(topobjdir='.', topsrcd
     Contrary to config.status, it doesn't use CONFIG_FILES or CONFIG_HEADERS
     variables.
 
     Without the -n option, this program acts as config.status and considers
     the current directory as the top object directory, even when config.status
     is in a different directory. It will, however, treat the directory
     containing config.status as the top object directory with the -n option.
 
-    The --recheck option, like with the original config.status, runs configure
-    again, with the options given in the "ac_configure_args" subst.
-
     The options to this function are passed when creating the
     ConfigEnvironment. These lists, as well as the actual wrapper script
     around this function, are meant to be generated by configure.
     See build/autoconf/config.status.m4.
     '''
 
     if 'CONFIG_FILES' in os.environ:
         raise Exception('Using the CONFIG_FILES environment variable is not '
@@ -93,18 +90,16 @@ def config_status(topobjdir='.', topsrcd
     if not os.path.isabs(topsrcdir):
         raise Exception('topsrcdir must be defined as an absolute directory: '
             '%s' % topsrcdir)
 
     default_backends = ['RecursiveMake']
     default_backends = (substs or {}).get('BUILD_BACKENDS', ['RecursiveMake'])
 
     parser = ArgumentParser()
-    parser.add_argument('--recheck', dest='recheck', action='store_true',
-                        help='update config.status by reconfiguring in the same conditions')
     parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
                         help='display verbose output')
     parser.add_argument('-n', dest='not_topobjdir', action='store_true',
                         help='do not consider current directory as top object directory')
     parser.add_argument('-d', '--diff', action='store_true',
                         help='print diffs of changed files.')
     parser.add_argument('-b', '--backend', nargs='+', choices=sorted(backends),
                         default=default_backends,
@@ -137,21 +132,16 @@ def config_status(topobjdir='.', topsrcd
         for b in selected_backends:
             b.dry_run = True
 
     reader = BuildReader(env)
     emitter = TreeMetadataEmitter(env)
     # This won't actually do anything because of the magic of generators.
     definitions = emitter.emit(reader.read_topsrcdir())
 
-    if options.recheck:
-        # Execute configure from the top object directory
-        os.chdir(topobjdir)
-        os.execlp('sh', 'sh', '-c', ' '.join([os.path.join(topsrcdir, 'configure'), env.substs['ac_configure_args'], '--no-create', '--no-recursion']))
-
     log_level = logging.DEBUG if options.verbose else logging.INFO
     log_manager.add_terminal_logging(level=log_level)
     log_manager.enable_unstructured()
 
     print('Reticulating splines...', file=sys.stderr)
     if len(selected_backends) > 1:
         definitions = list(definitions)