On Fri, May 28, 2021 at 09:57:26AM -0400, Robert P. J. Day wrote:
> On Fri, 28 May 2021, Quentin Schulz wrote:
> 
> > On Fri, May 28, 2021 at 08:51:51AM -0400, Robert P. J. Day wrote:
> > >
> > >   as a short followup to my earlier note about creating a bunch of
> > > externalsrc-based recipes to demonstrate their proper structure, it's
> > > easy to add the recipe files to a layer, but i then realized i needed
> > > to figure out where to put the corresponding source, and how i would
> > > refer to it with the EXTERNALSRC variable, and after some thought, it
> > > occurred that the simplest solution is to simply put the source in a
> > > "src" subdirectory next to the recipe itself, and use:
> > >
> > >   inherit externalsrc
> > >
> > >   EXTERNALSRC = "${THISDIR}/src"
> >
> > FWIW, we use multiple ../ in the variable and it works just fine.
> > Might be a slightly better example than having it next to the
> > recipe, since this would actually be covered by SRC_URI =
> > "file://whatever". In that case, you could add the sources in
> > `yocto-docs/externalsrc-src` for example?
> 
>   after further cogitation, it seems like using SRC_URI might be the
> way to go after all, unless i drastically misunderstand some features
> of "externalsrc".
> 
>   at the moment, most of this external source has to be compiled in
> place; very little of it supports "out of tree" building, which means
> that i'm forced to(?):

What make you say that? Links, sources? By default it builds in the
usual ${WORKDIR}/${BPN}-${PV}.

> 
>   EXTERNALSRC = <source location>
>   EXTERNALSRC_BUILD = "${EXTERNALSRC}"
> 
> however, that obviously(?) means that only one developer can build
> that recipe at a time, else they would step on each other's ongoing
> builds -- do i understand that correctly?
> 

In the case of EXTERNALSRC_BUILD = "${EXTERNALSRC}" I would say that
this is correct?

Sharing the same externalsrc sources between two distinct Yocto
setups is most likely bound to fail at some point. Anyway, you should
see externalsrc as stable as AUTOREV in SRCREV, at least that's what it
is to me.

externalsrc isn't much more than a stripped down SRC_URI =
"file://src/", the fetch/unpack are different, the way to track if files
is different too.

>   using SRC_URI, on the other hand, would copy the source directory
> into the WORKDIR, so that solves that problem. am i understanding this
> correctly?
> 

SRC_URI by default is looked only in three directories next to the
recipe and therefore is part of the git repo of your Yocto metadata.
externalsrc can be used to have sources anywhere on a filesystem.

I'm not sure I fully understood your confusion therefore I might have
not made anything clearer. Let me know what's confusing in SRC_URI vs
externalsrc or something else, I may be able to help.

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152375): 
https://lists.openembedded.org/g/openembedded-core/message/152375
Mute This Topic: https://lists.openembedded.org/mt/83147632/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to