* [PATCH 0/1][v3] bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe
@ 2011-07-02 15:15 Dexuan Cui
2011-07-02 15:15 ` [PATCH 1/1][v3] " Dexuan Cui
0 siblings, 1 reply; 3+ messages in thread
From: Dexuan Cui @ 2011-07-02 15:15 UTC (permalink / raw)
To: bitbake-devel
The following changes since commit 2152759b50cc3acc96ee57b242e0b896e65f5e93:
sanity.bbclass: only run check_pseudo_wrapper for bitbake (2011-06-19 19:50:46 +0800)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/bb-v3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/bb-v3
Dexuan Cui (1):
bitbake/cooker, bitbake-layers: show the .bbappend files that matches
no existing .bb recipe
bitbake/bin/bitbake-layers | 21 +--------------------
bitbake/lib/bb/cooker.py | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 20 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1][v3] bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe
2011-07-02 15:15 [PATCH 0/1][v3] bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe Dexuan Cui
@ 2011-07-02 15:15 ` Dexuan Cui
2011-07-05 12:36 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Dexuan Cui @ 2011-07-02 15:15 UTC (permalink / raw)
To: bitbake-devel
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>
---
bitbake/bin/bitbake-layers | 21 +--------------------
bitbake/lib/bb/cooker.py | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 6b5ad5a..9266eb5 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -54,7 +54,7 @@ class Commands(cmd.Cmd):
def prepare_cooker(self):
sys.stderr.write("Parsing recipes..")
- logger.setLevel(logging.ERROR)
+ logger.setLevel(logging.WARNING)
try:
while self.cooker.state in (state.initial, state.parsing):
@@ -85,8 +85,6 @@ class Commands(cmd.Cmd):
self.show_appends_for_skipped()
- self.show_appends_with_no_recipes()
-
def show_appends_for_pn(self, pn):
filenames = self.cooker_data.pkg_pn[pn]
@@ -133,23 +131,6 @@ class Commands(cmd.Cmd):
notappended.add(basename)
return appended, notappended
- def show_appends_with_no_recipes(self):
- recipes = set(os.path.basename(f)
- for f in self.cooker_data.pkg_fn.iterkeys())
- recipes |= set(os.path.basename(f)
- for f in self.cooker.skiplist.iterkeys())
- appended_recipes = self.cooker_data.appends.iterkeys()
- appends_without_recipes = [self.cooker_data.appends[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)
- logger.warn('No recipes available for:\n%s',
- '\n'.join(appendlines))
- self.returncode |= 4
-
def do_EOF(self, line):
return True
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ebf963d..3aca8c6 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -471,6 +471,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
@@ -940,6 +961,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
--
1.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1][v3] bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe
2011-07-02 15:15 ` [PATCH 1/1][v3] " Dexuan Cui
@ 2011-07-05 12:36 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-07-05 12:36 UTC (permalink / raw)
To: Dexuan Cui; +Cc: bitbake-devel
On Sat, 2011-07-02 at 23:15 +0800, Dexuan Cui wrote:
> 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>
> ---
> bitbake/bin/bitbake-layers | 21 +--------------------
> bitbake/lib/bb/cooker.py | 22 ++++++++++++++++++++++
> 2 files changed, 23 insertions(+), 20 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-05 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-02 15:15 [PATCH 0/1][v3] bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe Dexuan Cui
2011-07-02 15:15 ` [PATCH 1/1][v3] " Dexuan Cui
2011-07-05 12:36 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.