def execute_cmds(config, input_mods, _mstdout, mstderr): Import.execute(config) # Import foreign data '''Checks are always done - to be sure that e.g. the dependencies are correct. Please note: there is no 'ONE' latest continuum any more - but a list.''' try: topic_continuum_set = TopicContinuumSet(input_mods, config) except RMTException as rmte: mstderr.write("+++ ERROR: Problem reading in the continuum [%s]\n" % Encoding.to_unicode(rmte)) return False # If there is a problem with the last requirement set included in # the requirements continuum and stop processing. (Note the logs # were already written out). if not topic_continuum_set.is_usable(): mstderr.write("+++ ERROR: topic continuum set is not usable.\n") return False # When only the dependencies are needed, output them to the given # file. cmad_filename = config.get_value_wo_throw( 'actions.create_makefile_dependencies') if cmad_filename is not None: Output.execute(config, topic_continuum_set, mstderr, "cmad_") return True # The requirements are syntactically correct now: therefore it is # possible to do some analytics on them. # Note that analytics are only run on the latest version. if not Analytics.execute(config, topic_continuum_set, mstderr): if config.get_bool('processing.analytics.stop_on_errors', True): return False # Output everything Output.execute(config, topic_continuum_set, mstderr, "") return True
def execute_cmds(config, input_mods, _mstdout, mstderr): '''Checks are always done - to be sure that e.g. the dependencies are correct. Please note: there is no 'ONE' latest continuum any more - but a list.''' try: topic_continuum_set = TopicContinuumSet(input_mods, config) except RMTException as rmte: mstderr.write("+++ ERROR: Problem reading in the continuum [%s]\n" % Encoding.to_unicode(rmte)) return False # If there is a problem with the last requirement set included in # the requirements continuum and stop processing. (Note the logs # were already written out). if not topic_continuum_set.is_usable(): mstderr.write("+++ ERROR: topic continuum set is not usable.\n") return False # When only the dependencies are needed, output them to the given # file. cmad_filename = config.get_value_wo_throw( 'actions.create_makefile_dependencies') if cmad_filename is not None: Output.execute(config, topic_continuum_set, mstderr, "cmad_") return True # The requirements are syntactically correct now: therefore it is # possible to do some analytics on them. # Note that analytics are only run on the latest version. if not Analytics.execute(config, topic_continuum_set, mstderr): if config.get_bool('processing.analytics.stop_on_errors', True): return False # Output everything Output.execute(config, topic_continuum_set, mstderr, "") return True
ohandler.create_makefile_dependencies(ofile, rc) ofile.close() return True # Print out all logs (from all kinds of objects) reqs.write_log(mstderr) topics.write_log(mstderr) # If there is a problem with the last requirement set included in # the requirements continuum and stop processing. (Note the logs # were already written out). if not reqs.is_usable(): return False # The requirments are syntatically correct now: therefore it is # possible to do some analytics on them if not Analytics.run(config, reqs, topics): reqs.write_log(mstderr) reqs.write_analytics_result(mstderr) if hasattr(config, 'analytics_specs') \ and 'stop_on_errors' in config.analytics_specs \ and config.analytics_specs['stop_on_errors']: return False # Output everything ohandler.output(rc) return True def main_impl(args, mstdout, mstderr): opts, config, mods = MainHelper.main_setup(args, mstdout, mstderr,
mstderr.write("+++ ERROR: topic continuum set is not usable.\n") return False # When only the dependencies are needed, output them to the given # file. cmad_filename = config.get_value_wo_throw( 'actions.create_makefile_dependencies') if cmad_filename != None: Output.execute(config, topic_continuum_set, mstderr, "cmad_") return True # The requirements are syntactically correct now: therefore it is # possible to do some analytics on them. # Note that analytics are only run on the latest version. if not Analytics.execute(config, topic_continuum_set, mstderr): if config.get_bool('processing.analytics.stop_on_errors', True): return False # Output everything Output.execute(config, topic_continuum_set, mstderr, "") return True def main_impl(args, mstdout, mstderr): '''The real implementation of the main function: o get config o set up logging o do everything''' config, input_mods = MainHelper.main_setup(args, mstdout, mstderr) configure_logging(config, mstderr)
latest_topicsc.create_makefile_dependencies(ofile) ofile.close() return True # Print out all logs (from all kinds of objects) topic_continuum.write_log(mstderr) # If there is a problem with the last requirement set included in # the requirements continuum and stop processing. (Note the logs # were already written out). if not topic_continuum.is_usable(): return False # The requirements are syntactically correct now: therefore it is # possible to do some analytics on them. # Note that analytics are only run on the latest version. if not Analytics.run(config, latest_topicsc): latest_topicsc.write_log(mstderr) latest_topicsc.write_analytics_result(mstderr) if config.get_bool('processing.analytics.stop_on_errors', True): return False # Output everything topic_continuum.output() return True def main_impl(args, mstdout, mstderr): # init_logging() config, input_mods = MainHelper.main_setup(args, mstdout, mstderr) return execute_cmds(config, input_mods, mstdout, mstderr)
mstderr.write("+++ ERROR: topic continuum set is not usable.\n") return False # When only the dependencies are needed, output them to the given # file. cmad_filename = config.get_value_wo_throw( 'actions.create_makefile_dependencies') if cmad_filename != None: Output.execute(config, topic_continuum_set, mstderr, "cmad_") return True # The requirements are syntactically correct now: therefore it is # possible to do some analytics on them. # Note that analytics are only run on the latest version. if not Analytics.execute(config, topic_continuum_set, mstderr): if config.get_bool('processing.analytics.stop_on_errors', True): return False # Output everything Output.execute(config, topic_continuum_set, mstderr, "") return True def main_impl(args, mstdout, mstderr): '''The real implementation of the main function: o get config o set up logging o do everything''' config, input_mods = MainHelper.main_setup(args, mstdout, mstderr) configure_logging(config, mstderr) return execute_cmds(config, input_mods, mstdout, mstderr)