diff --git a/kas/build.py b/kas/build.py index dea3deb..ad343f2 100644 --- a/kas/build.py +++ b/kas/build.py @@ -55,8 +55,7 @@ class Build: bld_psr.add_argument('config', help='Config file') bld_psr.add_argument('--target', - help='Select target to build', - default='core-image-minimal') + help='Select target to build') bld_psr.add_argument('--task', help='Select which task should be executed', default='build') diff --git a/kas/config.py b/kas/config.py index 892b680..9e6d311 100644 --- a/kas/config.py +++ b/kas/config.py @@ -248,7 +248,7 @@ class ConfigPython(Config): """ Sets the configuration for `target` """ - self.target = target + self.target = 'core-image-minimal' if target is None else target self.repos = self._config['get_repos'](self, target) def get_proxy_config(self): @@ -323,7 +323,7 @@ class ConfigStatic(Config): Implements the static kas configuration based on config files. """ - def __init__(self, filename, _): + def __init__(self, filename, target): from .includehandler import GlobalIncludes, IncludeException super().__init__() self.setup_environ() @@ -357,6 +357,9 @@ class ConfigStatic(Config): (self._config, missing_repo_names) = \ self.handler.get_config(repos=repo_paths) + if target: + self._config['target'] = target + def get_repos(self): """ Returns the list of repos.