Le mer. 18 oct. 2023 à 16:29, Mike Crowe via lists.openembedded.org
<mac=mcrowe....@lists.openembedded.org> a écrit :
>
> I'm trying to work out how we can make use of devtool to make our lives
> easier during development. In general it seems to work very well, but the
> way that it modifies bblayers.conf to add an absolute path to the workspace
> directory to BBLAYERS is incompatible with that file being held in a Git
> repository and shared by multiple users in multiple trees. There's a high
> risk that the file will accidentally be committed containing a path that's
> only meaningful for a single user in a single source tree. All of our other
> paths in bblayers.conf are relative to a variable that contains the path to
> the top of the source tree.

Hi Mike,

I think it is a bad idea to version files under the build directory.

Maybe you have a specific use case that you can address in a different way?
You need to share bblayers.conf, I can see 2 options here:
- either you want your co-workers to fetch it only once, when setting
up their source tree
- or you need to frequently modify bblayer.conf because you are adding
or removing layers and want your coworkers to be up-to date

In the first case, TEMPLATECONF is the way to go! More information
here; https://docs.yoctoproject.org/ref-manual/variables.html#term-TEMPLATECONF

In the second scenario, if this is something you *really* need, maybe
you can switch to some other tools such as 'kas'
(https://kas.readthedocs.io/en/latest/)  that should be useful here.

Maybe someone else will have another idea?

If you have a particular use case that is not described here, please
add more details :)

Cheers
Julien




>
> I can manually add ${TOPDIR}/workspace to BBLAYERS in bblayers.conf and
> commit that, but unfortunately devtool insists on continuing to add the
> absolute path since it doesn't know that's the same as ${TOPDIR}/workspace.
>
> I can set "workspace_path = workspace" in devtool.conf to use a relative
> path, and that superficially works until externalsrc.bbclass gets upset
> that the EXTERNALSRC is not an absolute path.
>
> I've tried teaching devtool to prepend ${TOPDIR} if the workspace directory
> is not absolute when writing bblayers.conf, but it looks like I'd also need
> to do so in many other places.
>
> My current workaround is just to add ${TOPDIR}/workspace to the committed
> bblayers.conf myself and nobble devtool's _enable_workspace_layer with an
> early return. This is ugly and we'd have to carry that change around
> forever.
>
> Since I'm clearly swimming against the tide I'm left wondering whether I've
> missed something. Is there a way to use devtool without having an absolute
> path to the workspace in bblayers.conf?
>
> (At the moment I'm still using dunfell, but I looked at current master and
> didn't spot anything that looked like it changed this behaviour.)
>
> Thanks.
>
> Mike.
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189398): 
https://lists.openembedded.org/g/openembedded-core/message/189398
Mute This Topic: https://lists.openembedded.org/mt/102039990/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to