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:
parent
4f23045ce8
commit
eeab1bc9bc
@ -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 = {}
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user