From 42076dc9b6ee94b907be2aba333e368070706ac8 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 May 2011 23:45:31 +0100 Subject: cooker.py: Don't show spurious warnings for collections of .bbappend files 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. (Bitbake rev: 48899fe7b3791dd897968f44c317e98bad14e146) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a1cd4d750e..b708943682 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -436,9 +436,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): -- cgit v1.2.3-54-g00ecf