On Wed, 2024-11-06 at 08:31 -0800, Chuck Wolber wrote:
> On Wed, Nov 6, 2024 at 6:18 AM Richard Purdie via
> lists.openembedded.org
> <[email protected]> wrote:
> > I think we've had this idea around on occasions before but I'm
> > going to
> > write it down as an official proposal. In the interests of small
> > contained but useful tweaks, I'd like to suggest we add an
> > "include_all" directive.
> > 
> > Example usage would be:
> > 
> > include_all conf/distro/include/maintainers.inc
> > 
> > which would iterate BBPATH and include (in order) each
> > maintainers.inc
> > file it finds.
> > 
> 
> 
> 
> I feel like "include_all" would be read as if it means, "include all
> of the stuff inside of foo.inc" rather than "find all copies of
> foo.inc and include them".

I'd have thought quite differently about that since "include" already
means "include all of the stuff inside of foo.inc".
> 
> Would you be willing to consider naming it "include_each", which fits
> closer to the idea of "for each"?
> 
> Also, is it safe to assume that when you say "each maintainers.inc
> file it finds", it does not actually mean full layer search, but
> something that is path relevant:
> 
> import os
> for DIR in BBPATH.split(":"):
>     F = DIR + "/" + INC_FILE
>     if os.path.exists(F):
>         include F

Correct, the idea is it would mimic the behaviour of the existing
require/include statements but instead of matching one file, it would
match all (hence the naming).

Cheers,

Richard

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

Reply via email to