config: Pass context to Config constructor

Will be used later on to retrieve kas_work_dir.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2021-08-18 15:36:49 +02:00
parent 4f23045ce8
commit eeab1bc9bc
5 changed files with 5 additions and 5 deletions

View File

@ -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 = {}

View File

@ -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))

View File

@ -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)

View File

@ -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))

View File

@ -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