Hi folks,
I've again been bitten by an unnecessary restriction on how kas can be used. I appreciate that the intention here is consistency between builds but at the end of the day a tool needs to trust the developer using it. Preventing actions because they may in some use cases be harmful will just result in people bypassing kas when they need to, which actually works against the intention of consistency.
In this case I have a config file which sets up a local sstate & downloads cache, stored in /mnt/cache/yocto/cache.yml so that it can be shared between projects. However, when I try to use this I get an error:
pbarker@owl:~/Projects/Sancloud/meta-sancloud> kas build kas/bbe-poky.yml:kas/inc/ci.yml:kas/inc/debug.yml:/mnt/cache/yocto/cache.yml
2021-09-23 10:48:36 - INFO - kas 2.5 started
2021-09-23 10:48:36 - INFO - /home/pbarker/Projects/Sancloud/meta-sancloud/kas$ git rev-parse --show-toplevel
2021-09-23 10:48:36 - INFO - /home/pbarker/Projects/Sancloud/meta-sancloud/kas/inc$ git rev-parse --show-toplevel
2021-09-23 10:48:36 - INFO - /home/pbarker/Projects/Sancloud/meta-sancloud/kas/inc$ git rev-parse --show-toplevel
2021-09-23 10:48:36 - INFO - /mnt/cache/yocto$ git rev-parse --show-toplevel
2021-09-23 10:48:36 - INFO - /mnt/cache/yocto$ hg root
2021-09-23 10:48:37 - ERROR - All concatenated config files must belong to the same repository or all must be outside of versioning control
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/kas/kas.py", line 180, in main
sys.exit(kas(sys.argv[1:]))
File "/usr/lib/python3.6/site-packages/kas/kas.py", line 169, in kas
plugin.run(args)
File "/usr/lib/python3.6/site-packages/kas/plugins/build.py", line 79, in run
ctx.config = Config(args.config, args.target, args.task)
File "/usr/lib/python3.6/site-packages/kas/config.py", line 49, in __init__
raise IncludeException('All concatenated config files must '
kas.includehandler.IncludeException: All concatenated config files must belong to the same repository or all must be outside of versioning control.
Removing the check and exception results in the local.conf file being written correctly and the build proceeds as expected. So this check is not preventing any actual error, it's just enforcing the intended use case.
If I submit a patch to remove this check, or turn it into a warning which can be disabled, would that be likely to be accepted?
Thanks,
--
Paul Barker
https://pbarker.dev/