<div dir="ltr"><div>Hi,</div><div>The intention of this patch was to, let parse recipe files against all PATTERNS.</div><div>So that, the correct priority of recipe file with respect to pattern is returned.</div><div>As you agree, currently the first match is being returned, I believe this is not expected behaviour.</div><div>As per the function name, it should check the bbfile priority and return the corrosponding value.</div><div>I don't know much about priority assignments to layers and this patches implications.</div><div><br></div><div>I have modified the patch and submitted now.</div><div>Request you to provide your feedback and suggestions for possible improvements.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 7, 2017 at 3:31 PM, Richard Purdie <span dir="ltr"><<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, 2017-10-06 at 13:37 -0700, Andre McCurdy wrote:<br>
> ><br>
> > On Tue, Sep 27, 2016 at 11:54 AM, Mounesh Sutar <mounesh.sutar@gmai<br>
> > <a href="http://l.com" rel="noreferrer" target="_blank">l.com</a>><br>
> > ><br>
> > ><br>
> > > bitbake is parsing all recipe files, against layers<br>
> > > BBFILE_PATTERN for<br>
> > > warning message display.<br>
> > > In case of sublayer with lower/equal priority, then all<br>
> > > sublayer's<br>
> > > patterns are not being<br>
> > > considered for pattern match. While checking recipe file against<br>
> > > matching<br>
> > > pattern,<br>
> > > the first matching pattern is accepted and added to matched list,<br>
> > > while<br>
> > > remaning PATTERNs are<br>
> > > not being considered. With this, the recipes are being neglected<br>
> > > from<br>
> > > PATTERN match.<br>
> > > This fix let's parser run through all the layers PATTERNs and on<br>
> > > matching<br>
> > > added to match list.<br>
> > ><br>
> > > Upstream-Status: Submitted [<a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.<wbr>openembedded.org</a>]<br>
> > ><br>
> > > Signed-off-by: Mounesh Sutar <<a href="mailto:mounesh_sutar@mentor.com">mounesh_sutar@mentor.com</a>><br>
> > > ---<br>
> > > bitbake/lib/bb/cooker.py | 2 +-<br>
> > > 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> > ><br>
> > > diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py<br>
> > > index 4df8881..5fde995 100644<br>
> > > --- a/bitbake/lib/bb/cooker.py<br>
> > > +++ b/bitbake/lib/bb/cooker.py<br>
> > > @@ -1705,7 +1705,7 @@ class CookerCollectFiles(object):<br>
> > > if matched != None:<br>
> > > if not regex in matched:<br>
> > > <wbr>matched.add(regex)<br>
> > > - return pri<br>
> > > + <wbr>return pri<br>
> > > return 0<br>
> > ><br>
> > > def get_bbfiles(self):<br>
> > > --<br>
> Resurrecting an old thread as it's been pointed out to me that this<br>
> patch fixes the issue I raised a while ago on the oe-core list:<br>
><br>
> <a href="http://lists.openembedded.org/pipermail/openembedded-core/2016-July" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>pipermail/openembedded-core/<wbr>2016-July</a><br>
> /123466.html<br>
><br>
> Are there any problems or concerns with this change?<br>
<br>
</div></div>I had to go and look at this again but yes, there are problems with the<br>
patch:<br>
<br>
a) If matched = None, the function never returns a priority after this <br>
change.<br>
b) Currently the first match is returned and also used in parallel for <br>
the priority calculation. After the patch, the priority used would <br>
be the last match found. The patch therefore reverses priority <br>
assignments for layers.<br>
<br>
There is a definite problem here but the patch simply moves the<br>
goalposts, it doesn't actually fix it. It breaks the current behaviour<br>
too.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div><br></div>