<div dir="ltr"><div dir="ltr">On Wed, 4 Sep 2019 at 09:32, Quentin Schulz <<a href="mailto:quentin.schulz@streamunlimited.com">quentin.schulz@streamunlimited.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> # if library is private (only used by package) then do not build shlib for it<br>
> - if not private_libs or this_soname not in private_libs:<br>
> + import fnmatch<br>
> + if not private_libs or len([i for i in private_libs if fnmatch.fnmatch(this_soname, i)]) == 0:<br>
<br>
We only need to know if this_soname is matching one of the patterns, we<br>
don't need to check for each and every pattern.<br>
<br>
Something like:<br>
<br>
for pattern in private_libs:<br>
if fnmatch.fnmatch(this_soname, pattern)]) == 0:<br>
sonames.add(prov)<br>
break<br>
<br>
would be possible?<br></blockquote><div><br></div>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.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Alex<br></div></div>