According to our documentation submodules are supported, but
limitations apply (see below).
>
> > But as it turns out, Kas's include handler (defined in
> > includehandler.py) calls Repo.get_root_path(), which returns the
> > root
> > directory of the parent Git project instead of the root directory
> > of the
> > submodule.
> >
> > I think this might be a bug, because:
> >
> > 1. The documented behavior (which is what we want) doesn't match
> > the
> > implementation
If I got your issue right, the documentation exactly explains this case
in the submodule note:
Citing the docs:
Git submodules are considered to be part of the main repository. Hence,
including config files from a submodule is supported.
The repository root is always the root of the main repository
----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^
(if under VCS) or the directory of the first kas config file otherwise.
> > 2. The implementation makes it hard to pull in somebody's Kas-based
> > design as a dependency in a larger build.
Not really, as you can just add a kas file in your repo that fetches
just the sub-repo and includes files from there.
> >
> > What do you folks think about this?
In general, I do not recommend to mix repository management tools like
repotool, git submodules and kas, as you almost certainly will run into
corner cases.
Also, I personally do not recommend to use git submodules at all -
these are fundamentally broken for years and hard to work with.
>
> IMHO it should be added to the documentation that this use case is
> not
> supported.
Feel free to send a patch to improve the documentation regarding this
:)
Best regards,
Felix
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany