def run(self, config, options, args, help=None): config.moduleset = 'bootstrap' # load the bootstrap module set if not args: args = ['meta-bootstrap'] for item in options.skip: config.skip += item.split(',') options.skip = [] rc = cmd_build.run(self, config, options, args) return rc
def run(self, config, options, args, help=None): if sys.platform.startswith('win'): config.moduleset = 'windows-bootstrap' else: config.moduleset = 'bootstrap' # load the bootstrap module set if not args: args = ['meta-bootstrap'] for item in options.skip: config.skip += item.split(',') options.skip = [] ignored_modules = [] if not options.ignore_system: # restore system PATH to check for system-installed programs path = os.environ.get('PATH') os.environ['PATH'] = path.replace( os.path.join(config.prefix, 'bin'), '') module_set = jhbuild.moduleset.load(config) modules = args or config.modules module_list = module_set.get_module_list(modules) for module in module_list: if module.type == 'meta': continue for version_regex in (r'.*?[ \(]([\d.]+)', r'^([\d.]+)'): if check_version([module.name, '--version'], version_regex, module.branch.version): ignored_modules.append(module.name) break os.environ['PATH'] = path config.skip.extend(ignored_modules) # cancel the bootstrap updateness check as it has no sense (it *is* # running bootstrap right now) jhbuild.commands.base.check_bootstrap_updateness = lambda x: x rc = cmd_build.run(self, config, options, args) if ignored_modules: logging.info( _('some modules (%s) were automatically ignored as a ' 'sufficient enough version was found installed on ' 'your system. Use --ignore-system if you want to build ' 'them nevertheless.' % ', '.join(ignored_modules))) return rc
def run(self, config, options, args, help=None): config.moduleset = "bootstrap" # load the bootstrap module set if not args: args = ["meta-bootstrap"] for item in options.skip: config.skip += item.split(",") options.skip = [] ignored_modules = [] if not options.ignore_system: # restore system PATH to check for system-installed programs path = os.environ.get("PATH") os.environ["PATH"] = path.replace(os.path.join(config.prefix, "bin"), "") module_set = jhbuild.moduleset.load(config) modules = args or config.modules module_list = module_set.get_module_list(modules) for module in module_list: if module.type == "meta": continue for version_regex in (r".*?[ \(]([\d.]+)", r"^([\d.]+)"): if check_version([module.name, "--version"], version_regex, module.branch.version): ignored_modules.append(module.name) break os.environ["PATH"] = path config.skip.extend(ignored_modules) # cancel the bootstrap updateness check as it has no sense (it *is* # running bootstrap right now) jhbuild.commands.base.check_bootstrap_updateness = lambda x: x rc = cmd_build.run(self, config, options, args) if ignored_modules: logging.info( _( "some modules (%s) were automatically ignored as a " "sufficient enough version was found installed on " "your system. Use --ignore-system if you want to build " "them nevertheless." % ", ".join(ignored_modules) ) ) return rc