diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2011-07-02 23:15:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-05 13:35:53 +0100 |
commit | f5ba7c795df7cbd58124e35970ddc5bd84cbfb8e (patch) | |
tree | 64c4675bf8dc6efd2db47b00e9e2b644932d25de /lib/bb/cooker.py | |
parent | edacf98cceb2fe1275042595d3fce6822fa411ca (diff) | |
download | bitbake-f5ba7c795df7cbd58124e35970ddc5bd84cbfb8e.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").
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 83fd07ba0..c35ea372c 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -480,6 +480,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 @@ -1005,6 +1026,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 |