dump --skip init_setup_repos crashes with no attribute

2 views
Skip to first unread message

Jörg Sommer

unread,
Jan 27, 2026, 3:32:50 PM (13 days ago) Jan 27
to kas-...@googlegroups.com
Hello,

I would like to dump the config with all includes as a flat version, but do
not want to checkout the repositories. Trying this I stumbled across this
unexpected error.

```
% cat .config.yaml
header:
version: 11

repos:
bitbake:
url: "https://git.openembedded.org/bitbake"
branch: master
path: "bitbake"

% ./kas-container dump --skip init_setup_repos
2026-01-27 21:08:29 - INFO - kas 5.1 started on Debian GNU/Linux 13
2026-01-27 21:08:29 - ERROR - 'Context' object has no attribute 'missing_repo_names'
Traceback (most recent call last):
File "/usr/local/lib/python3.13/dist-packages/kas/kas.py", line 244, in main
kas(sys.argv[1:])
~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/kas.py", line 218, in kas
plugin.run(args)
~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/plugins/dump.py", line 226, in run
super().run(args)
~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/plugins/checkout.py", line 62, in run
macro.run(ctx, args.skip)
~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 116, in run
if _run_single(cmd[0]) and cmd[1]:
~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 110, in _run_single
command.execute(ctx)
~~~~~~~~~~~~~~~^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 166, in execute
while all(executor(c) for c in self.commands):
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 166, in <genexpr>
while all(executor(c) for c in self.commands):
~~~~~~~~^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 164, in executor
return command.execute(ctx)
~~~~~~~~~~~~~~~^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/libcmds.py", line 541, in execute
if not ctx.missing_repo_names:
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Context' object has no attribute 'missing_repo_names'
```

Is it possible to skip this step?

I also tried to skip all steps, but this does not work:

```
% ./kas-container dump --skip={setup_dir,setup_home,init_setup_repos,repo_setup_loop,finish_setup_repos,repos_checkout,repos_check_signatures,repos_apply_patches,setup_environ,write_bbconfig}
2026-01-27 21:29:18 - INFO - kas 5.1 started on Debian GNU/Linux 13
2026-01-27 21:29:18 - ERROR - Config has not been imported yet.
Traceback (most recent call last):
File "/usr/local/lib/python3.13/dist-packages/kas/kas.py", line 244, in main
kas(sys.argv[1:])
~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/kas.py", line 218, in kas
plugin.run(args)
~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/plugins/dump.py", line 230, in run
else ctx.config.get_config(remove_includes=True)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/config.py", line 88, in get_config
config = copy.deepcopy(self._config)
^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/kas/config.py", line 65, in _config
raise RuntimeError("Config has not been imported yet.")
RuntimeError: Config has not been imported yet.
```

How can I dump the flat config without touching the repositories?


Best regards, Jörg

--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de

Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480

MOESSBAUER, Felix

unread,
Jan 28, 2026, 2:47:12 AM (13 days ago) Jan 28
to joerg....@navimatix.de, kas-...@googlegroups.com
On Tue, 2026-01-27 at 21:32 +0100, 'Jörg Sommer' via kas-devel wrote:
> Hello,
>
> I would like to dump the config with all includes as a flat version, but do
> not want to checkout the repositories. Trying this I stumbled across this
> unexpected error.

Hi, this is currently not possible du to how the config-merging logic
inside kas is implemented. What we would need is a "run-once" mode,
whereby the SetupReposStep [1] is only executed once and then the dict
is dumped.

This should be straight forward to implement.

[1] https://github.com/siemens/kas/blob/master/kas/libcmds.py#L532

Felix
> --
> You received this message because you are subscribed to the Google Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kas-devel/aXkaryFxfd-5uV4J%40navimatix.de.

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Reply all
Reply to author
Forward
0 new messages