From eeab1bc9bc1e76e952b001fff60dc6970837223c Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 18 Aug 2021 15:36:49 +0200 Subject: [PATCH] config: Pass context to Config constructor Will be used later on to retrieve kas_work_dir. Signed-off-by: Jan Kiszka --- kas/config.py | 2 +- kas/plugins/build.py | 2 +- kas/plugins/checkout.py | 2 +- kas/plugins/for_all_repos.py | 2 +- kas/plugins/shell.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kas/config.py b/kas/config.py index e7ae124..b41a683 100644 --- a/kas/config.py +++ b/kas/config.py @@ -35,7 +35,7 @@ class Config: """ Implements the kas configuration based on config files. """ - def __init__(self, filename, target=None, task=None): + def __init__(self, ctx, filename, target=None, task=None): self._override_target = target self._override_task = task self._config = {} diff --git a/kas/plugins/build.py b/kas/plugins/build.py index e05001c..504ba62 100644 --- a/kas/plugins/build.py +++ b/kas/plugins/build.py @@ -79,7 +79,7 @@ class Build: """ ctx = create_global_context(args) - ctx.config = Config(args.config, args.target, args.task) + ctx.config = Config(ctx, args.config, args.target, args.task) macro = Macro() macro.add(BuildCommand(args.extra_bitbake_args)) diff --git a/kas/plugins/checkout.py b/kas/plugins/checkout.py index 7ce4685..baf6ee4 100644 --- a/kas/plugins/checkout.py +++ b/kas/plugins/checkout.py @@ -55,7 +55,7 @@ class Checkout: def run(self, args): ctx = create_global_context(args) - ctx.config = Config(args.config) + ctx.config = Config(ctx, args.config) macro = Macro() macro.run(ctx, args.skip) diff --git a/kas/plugins/for_all_repos.py b/kas/plugins/for_all_repos.py index c04f065..8351b72 100644 --- a/kas/plugins/for_all_repos.py +++ b/kas/plugins/for_all_repos.py @@ -79,7 +79,7 @@ class ForAllRepos: def run(self, args): ctx = create_global_context(args) - ctx.config = Config(args.config) + ctx.config = Config(ctx, args.config) macro = Macro() macro.add(ForAllReposCommand(args.command)) diff --git a/kas/plugins/shell.py b/kas/plugins/shell.py index 62b6760..2299618 100644 --- a/kas/plugins/shell.py +++ b/kas/plugins/shell.py @@ -77,7 +77,7 @@ class Shell: """ ctx = create_global_context(args) - ctx.config = Config(args.config) + ctx.config = Config(ctx, args.config) if args.keep_config_unchanged: # Skip the tasks which would change the config of the build