[OE-core] [PATCH] package.bbclass: allow shell-style wildcards in PRIVATE_LIBS

Alexander Kanavin alex.kanavin at gmail.com
Wed Sep 4 10:04:40 UTC 2019


On Wed, 4 Sep 2019 at 09:32, Quentin Schulz <
quentin.schulz at streamunlimited.com> wrote:

> >                      # if library is private (only used by package) then
> do not build shlib for it
> > -                    if not private_libs or this_soname not in
> private_libs:
> > +                    import fnmatch
> > +                    if not private_libs or len([i for i in private_libs
> if fnmatch.fnmatch(this_soname, i)]) == 0:
>
> We only need to know if this_soname is matching one of the patterns, we
> don't need to check for each and every pattern.
>
> Something like:
>
> for pattern in private_libs:
>         if fnmatch.fnmatch(this_soname, pattern)]) == 0:
>                 sonames.add(prov)
>                 break
>
> would be possible?
>

Yes, although there should only be very few patterns, and most of the time
just one: *.so*. Not worth it I'd say. There are other spots in do_package
which truly slow down things and could use a bit of optimization.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190904/f2031272/attachment.html>


More information about the Openembedded-core mailing list