]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker.py: Don't show spurious warnings for collections of .bbappend files
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 May 2011 22:45:31 +0000 (23:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 16:19:10 +0000 (17:19 +0100)
Seeing warnings like:

WARNING: No bb files matched BBFILE_PATTERN_yocto '^/xxx/meta-yocto/'

are not encouraging to users and we shouldn't show these if we found
.bbappend files (but no .bb files). This change stops these warnings
from appearing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 06912bde65e36b4cbf72192160ba7ce7524cafb8..6ecb4f7a9a49dcebc823531e1050757f53759e41 100644 (file)
@@ -432,9 +432,26 @@ class BBCooker:
         # Calculate priorities for each file
         for p in self.status.pkg_fn:
             self.status.bbfile_priority[p] = calc_bbfile_priority(p)
+        # Don't show the warning if the BBFILE_PATTERN did match .bbappend files
+        unmatched = set()
+        for _, _, regex, pri in self.status.bbfile_config_priorities:        
+            if not regex in matched:
+                unmatched.add(regex)
+
+        def findmatch(regex):
+            for bbfile in self.appendlist:
+                for append in self.appendlist[bbfile]:
+                    if regex.match(append):
+                        return True
+            return False
+
+        for unmatch in unmatched.copy():
+            if findmatch(unmatch):
+                unmatched.remove(unmatch)
 
         for collection, pattern, regex, _ in self.status.bbfile_config_priorities:
-            if not regex in matched:
+            if regex in unmatched:
                 collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
 
     def findConfigFiles(self, varname):