summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-07-02 23:15:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-05 13:36:54 +0100
commit7a2a24de094ce8f2e2068bbee6709dfc2cdc69b9 (patch)
tree4d3037cc69d1800c33bd78568dda5fb172ab41aa /bitbake/lib/bb/cooker.py
parentdeb14487d1267afbbcb6796035926470cd8152d7 (diff)
downloadpoky-7a2a24de094ce8f2e2068bbee6709dfc2cdc69b9.tar.gz
bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe
This patch moves the logic of show_appends_with_no_recipes from bitbake-layers into bitbake. By default, a fatal message is printed; we can also define a variable BB_DANGLINGAPPENDS_WARNONLY to make the message only a warning(the variables could be defined in conf/local.conf with a value "yes", "true" or "1"). (Bitbake rev: f5ba7c795df7cbd58124e35970ddc5bd84cbfb8e) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 67f0805cbb..7976d299c0 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -483,6 +483,27 @@ class BBCooker:
483 return pri 483 return pri
484 return 0 484 return 0
485 485
486 def show_appends_with_no_recipes( self ):
487 recipes = set(os.path.basename(f)
488 for f in self.status.pkg_fn.iterkeys())
489 recipes |= set(os.path.basename(f)
490 for f in self.skiplist.iterkeys())
491 appended_recipes = self.appendlist.iterkeys()
492 appends_without_recipes = [self.appendlist[recipe]
493 for recipe in appended_recipes
494 if recipe not in recipes]
495 if appends_without_recipes:
496 appendlines = (' %s' % append
497 for appends in appends_without_recipes
498 for append in appends)
499 msg = 'No recipes available for:\n%s' % '\n'.join(appendlines)
500 warn_only = data.getVar("BB_DANGLINGAPPENDS_WARNONLY", \
501 self.configuration.data, False) or "no"
502 if warn_only.lower() in ("1", "yes", "true"):
503 bb.warn(msg)
504 else:
505 bb.fatal(msg)
506
486 def buildDepgraph( self ): 507 def buildDepgraph( self ):
487 all_depends = self.status.all_depends 508 all_depends = self.status.all_depends
488 pn_provides = self.status.pn_provides 509 pn_provides = self.status.pn_provides
@@ -1009,6 +1030,7 @@ class BBCooker:
1009 1030
1010 if not self.parser.parse_next(): 1031 if not self.parser.parse_next():
1011 collectlog.debug(1, "parsing complete") 1032 collectlog.debug(1, "parsing complete")
1033 self.show_appends_with_no_recipes()
1012 self.buildDepgraph() 1034 self.buildDepgraph()
1013 self.state = state.running 1035 self.state = state.running
1014 return None 1036 return None