From 7a2a24de094ce8f2e2068bbee6709dfc2cdc69b9 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Sat, 2 Jul 2011 23:15:30 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bitbake/lib/bb/cooker.py') 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: return pri return 0 + def show_appends_with_no_recipes( self ): + recipes = set(os.path.basename(f) + for f in self.status.pkg_fn.iterkeys()) + recipes |= set(os.path.basename(f) + for f in self.skiplist.iterkeys()) + appended_recipes = self.appendlist.iterkeys() + appends_without_recipes = [self.appendlist[recipe] + for recipe in appended_recipes + if recipe not in recipes] + if appends_without_recipes: + appendlines = (' %s' % append + for appends in appends_without_recipes + for append in appends) + msg = 'No recipes available for:\n%s' % '\n'.join(appendlines) + warn_only = data.getVar("BB_DANGLINGAPPENDS_WARNONLY", \ + self.configuration.data, False) or "no" + if warn_only.lower() in ("1", "yes", "true"): + bb.warn(msg) + else: + bb.fatal(msg) + def buildDepgraph( self ): all_depends = self.status.all_depends pn_provides = self.status.pn_provides @@ -1009,6 +1030,7 @@ class BBCooker: if not self.parser.parse_next(): collectlog.debug(1, "parsing complete") + self.show_appends_with_no_recipes() self.buildDepgraph() self.state = state.running return None -- cgit v1.2.3-54-g00ecf