All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] bitbake warning fix: No bb files matched BBFILE_PATTERN_packageName
@ 2017-10-12 11:08 mounesh.sutar
  0 siblings, 0 replies; only message in thread
From: mounesh.sutar @ 2017-10-12 11:08 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Mounesh Sutar

From: Mounesh Sutar <mounesh_sutar@mentor.com>

bitbake is parsing all recipe files, against layers BBFILE_PATTERN for warning message display.
In case of sublayer with lower/equal priority, then all sublayer's patterns are not being
considered for pattern match. While checking recipe file against matching pattern,
the first matching pattern is accepted and added to matched list, while remaning PATTERNs are
not being considered. With this, the recipes are being neglected from PATTERN match.
This fix let's parser run through all the layers PATTERNs and on matching added to match list.

Signed-off-by: Mounesh Sutar <mounesh_sutar@mentor.com>

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index f44a088..4cf00ee 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1412,13 +1412,23 @@ class CookerCollectFiles(object):
         self.bbfile_config_priorities = priorities
 
     def calc_bbfile_priority( self, filename, matched = None ):
+        objectInitialised = False
+        tmppri = 0
+        tmpregex = {}
         for _, _, regex, pri in self.bbfile_config_priorities:
-            if regex.match(filename):
-                if matched != None:
-                    if not regex in matched:
-                        matched.add(regex)
-                return pri
-        return 0
+            if regex.match(filename) :
+                if objectInitialised == False:
+                   tmpregex = regex
+                   tmppri = pri
+                   objectInitialised = True
+                else:
+                    if len(regex.pattern) > len(tmpregex.pattern):
+                        tmpregex = regex
+                        tmppri = pri
+        if matched != None:
+            if not tmpregex in matched:
+                matched.add(tmpregex)
+        return tmppri
 
     def get_bbfiles(self):
         """Get list of default .bb files by reading out the current directory"""
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-12 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 11:08 [PATCH v2 1/1] bitbake warning fix: No bb files matched BBFILE_PATTERN_packageName mounesh.sutar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.