def run(self, args): ctx = create_global_context(args) ctx.config = Config(ctx, args.config) macro = Macro() macro.add(ForAllReposCommand(args.command)) macro.run(ctx, args.skip)
def run(self, args): """ Executes the build command of the kas plugin. """ ctx = create_global_context(args) ctx.config = Config(args.config, args.target, args.task) macro = Macro() macro.add(BuildCommand(args.extra_bitbake_args)) macro.run(ctx, args.skip)
def run(self, args): """ Executes the build command of the kas plugin. """ if args.config and args.config.startswith('-'): args.extra_bitbake_args.insert(0, args.config) args.config = None ctx = create_global_context(args) ctx.config = Config(ctx, args.config, args.target, args.task) macro = Macro() macro.add(BuildCommand(args.extra_bitbake_args)) macro.run(ctx, args.skip)
def run(self, args): """ Runs this kas plugin """ ctx = create_global_context(args) ctx.config = Config(args.config) if args.keep_config_unchanged: # Skip the tasks which would change the config of the build # environment args.skip += [ 'setup_dir', 'finish_setup_repos', 'repos_apply_patches', 'write_bbconfig', ] macro = Macro() macro.add(ShellCommand(args.command)) macro.run(ctx, args.skip)
def run(self, args): """ Runs this kas plugin """ ctx = create_global_context(args) ctx.config = Config(ctx, args.config) if args.preserve_env: # Warn if there's any settings that setup_home would apply # but are now ignored for var in SetupHome.ENV_VARS: if var in os.environ: logging.warning( 'Environment variable "%s" ignored ' 'because user environment is being used', var) if not os.isatty(sys.stdout.fileno()): logging.error("Error: --preserve-env can only be " "run from a tty") sys.exit(1) ctx.environ = os.environ.copy() logging.warning("Preserving the current environment block may " "have unintended side effects on the build.") if args.keep_config_unchanged: # Skip the tasks which would change the config of the build # environment args.skip += [ 'setup_dir', 'finish_setup_repos', 'repos_apply_patches', 'write_bbconfig', ] macro = Macro() macro.add(ShellCommand(args.command)) macro.run(ctx, args.skip)
def run(self, args): """ Runs this kas plugin """ # pylint: disable= no-self-use if args.cmd != 'shell': return False cfg = Config(args.config, args.target) macro = Macro() if not args.keep_config_unchanged: macro.add(SetupDir()) macro.add(SetupProxy()) macro.add(SetupEnviron()) if not args.keep_config_unchanged: macro.add(ReposFetch()) macro.add(ReposCheckout()) macro.add(SetupEnviron()) macro.add(WriteConfig()) macro.add(SetupHome()) macro.add(ShellCommand(args.command)) macro.run(cfg, args.skip) return True
def run(self, args): """ Runs this kas plugin """ # pylint: disable= no-self-use if args.cmd != 'shell': return False cfg = Config(args.config, args.target) macro = Macro() # Prepare if not args.keep_config_unchanged: macro.add(SetupDir()) macro.add(SetupProxy()) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(SetupSSHAgent()) if not args.keep_config_unchanged: macro.add(ReposFetch()) macro.add(ReposCheckout()) macro.add(SetupEnviron()) macro.add(WriteConfig()) else: macro.add(SetupEnviron()) # Shell macro.add(SetupHome()) macro.add(ShellCommand(args.command)) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(CleanupSSHAgent()) macro.run(cfg, args.skip) return True
def run(self, args): """ Runs this kas plugin """ ctx = create_global_context(args) ctx.config = Config(args.config, None, None) macro = Macro() # Prepare if not args.keep_config_unchanged: macro.add(SetupDir()) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(SetupSSHAgent()) ctx.keep_config = args.keep_config_unchanged macro.add(InitSetupRepos()) repo_loop = Loop('repo_setup_loop') repo_loop.add(SetupReposStep()) macro.add(repo_loop) macro.add(FinishSetupRepos()) macro.add(SetupEnviron()) macro.add(SetupHome()) if not args.keep_config_unchanged: macro.add(ReposApplyPatches()) macro.add(WriteBBConfig()) # Shell macro.add(ShellCommand(args.command)) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(CleanupSSHAgent()) macro.run(ctx, args.skip)
def run(self, args): ctx = create_global_context(args) ctx.config = Config(ctx, args.config) macro = Macro() macro.run(ctx, args.skip)
def run(self, args): """ Runs this kas plugin """ # pylint: disable= no-self-use if args.cmd != 'shell': return False ctx = Context(args.config, args.target, None) macro = Macro() # Prepare if not args.keep_config_unchanged: macro.add(SetupDir()) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(SetupSSHAgent()) ctx.keep_config = args.keep_config_unchanged macro.add(SetupRepos()) macro.add(SetupEnviron()) macro.add(SetupHome()) if not args.keep_config_unchanged: macro.add(ReposApplyPatches()) macro.add(WriteBBConfig()) # Shell macro.add(ShellCommand(args.command)) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(CleanupSSHAgent()) macro.run(ctx, args.skip) return True
def run(self, args): """ Runs this kas plugin """ # pylint: disable= no-self-use if args.cmd != 'shell': return False cfg = load_config(args.config, args.target) macro = Macro() macro.add(SetupProxy()) macro.add(SetupEnviron()) macro.add(SetupHome()) macro.add(ShellCommand(args.command)) macro.run(cfg, args.skip) return True
def run(self, args): """ Executes the build command of the kas plugin. """ ctx = create_global_context(args) ctx.config = Config(args.config, args.target, args.task) macro = Macro() # Prepare macro.add(SetupDir()) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(SetupSSHAgent()) macro.add(InitSetupRepos()) repo_loop = Loop('repo_setup_loop') repo_loop.add(SetupReposStep()) macro.add(repo_loop) macro.add(FinishSetupRepos()) macro.add(SetupEnviron()) macro.add(SetupHome()) macro.add(ReposApplyPatches()) macro.add(WriteBBConfig()) # Build macro.add(BuildCommand(args.extra_bitbake_args)) if 'SSH_PRIVATE_KEY' in os.environ: macro.add(CleanupSSHAgent()) macro.run(ctx, args.skip)