All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Misc minor fixes
@ 2011-07-22 17:30 Paul Eggleton
  2011-07-22 17:30 ` [PATCH 1/6] bitbake: add note to -b option indicating no dependency handling Paul Eggleton
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

Some minor usability-related fixes for bitbake and bitbake-layers.

The changes (against poky, apply against bitbake master with -p2) are
available in the git repository at:
  git://git.pokylinux.org/poky-contrib paule/bitbake-tweaks
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/bitbake-tweaks

Paul Eggleton (6):
  bitbake: add note to -b option indicating no dependency handling
  bitbake/cooker: show a warning when -b is specified
  bitbake: adjust comments/messages for default server change
  bitbake-layers: check for errors before parsing
  bitbake-layers: add command help
  bitbake-layers: remove unneeded do_EOF

 bitbake/bin/bitbake        |    8 +++---
 bitbake/bin/bitbake-layers |   45 +++++++++++++++++++++++++++++++++++++++----
 bitbake/lib/bb/cooker.py   |    4 +++
 3 files changed, 48 insertions(+), 9 deletions(-)

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] bitbake: add note to -b option indicating no dependency handling
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-22 17:30 ` [PATCH 2/6] bitbake/cooker: show a warning when -b is specified Paul Eggleton
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

The -b option doesn't handle dependencies so note this in the help.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 206d97b..f198fd1 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -102,7 +102,7 @@ It expects that BBFILES is defined, which is a space separated list of files to
 be executed.  BBFILES does support wildcards.
 Default BBFILES are the .bb files in the current directory.""")
 
-    parser.add_option("-b", "--buildfile", help = "execute the task against this .bb file, rather than a package from BBFILES.",
+    parser.add_option("-b", "--buildfile", help = "execute the task against this .bb file, rather than a package from BBFILES. Does not handle any dependencies.",
                action = "store", dest = "buildfile", default = None)
 
     parser.add_option("-k", "--continue", help = "continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same.",
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] bitbake/cooker: show a warning when -b is specified
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
  2011-07-22 17:30 ` [PATCH 1/6] bitbake: add note to -b option indicating no dependency handling Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-22 17:30 ` [PATCH 3/6] bitbake: adjust comments/messages for default server change Paul Eggleton
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

Too many people are using -b because they think it is the normal way of
specifying a target to be built, and then get confused when the build
fails due to a missing dependency; so show a warning about dependencies
not being handled when this option is used.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/cooker.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 7cf43a0..b0ddb2e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -906,6 +906,10 @@ class BBCooker:
         Build the file matching regexp buildfile
         """
 
+        # Too many people use -b because they think it's how you normally
+        # specify a target to be built, so show a warning
+        bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.")
+
         # Parse the configuration here. We need to do it explicitly here since
         # buildFile() doesn't use the cache
         self.parseConfiguration()
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] bitbake: adjust comments/messages for default server change
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
  2011-07-22 17:30 ` [PATCH 1/6] bitbake: add note to -b option indicating no dependency handling Paul Eggleton
  2011-07-22 17:30 ` [PATCH 2/6] bitbake/cooker: show a warning when -b is specified Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-22 17:30 ` [PATCH 4/6] bitbake-layers: check for errors before parsing Paul Eggleton
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

Default server is process, adjust comments and messages accordingly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index f198fd1..8d6fef7 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -172,8 +172,8 @@ Default BBFILES are the .bb files in the current directory.""")
 
     ui_main = get_ui(configuration)
 
-    # Server type could be xmlrpc or none currently, if nothing is specified,
-    # default server would be none
+    # Server type can be xmlrpc, process or none currently, if nothing is specified,
+    # the default server is process
     if configuration.servertype:
         server_type = configuration.servertype
     else:
@@ -184,7 +184,7 @@ Default BBFILES are the .bb files in the current directory.""")
         server = getattr(module, server_type)
     except AttributeError:
         sys.exit("FATAL: Invalid server type '%s' specified.\n"
-                 "Valid interfaces: xmlrpc, process, none [default]." % servertype)
+                 "Valid interfaces: xmlrpc, process [default], none." % servertype)
 
     # Save a logfile for cooker into the current working directory. When the
     # server is daemonized this logfile will be truncated.
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] bitbake-layers: check for errors before parsing
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
                   ` (2 preceding siblings ...)
  2011-07-22 17:30 ` [PATCH 3/6] bitbake: adjust comments/messages for default server change Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-22 17:30 ` [PATCH 5/6] bitbake-layers: add command help Paul Eggleton
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

Don't always parse on initialisation - instead check for errors and then
parse when we know we need to. Avoids keeping the user waiting.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake-layers |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 1c48c8c..56253f5 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -48,7 +48,7 @@ class Commands(cmd.Cmd):
                                          self.register_idle_function)
         self.config_data = self.cooker.configuration.data
         bb.providers.logger.setLevel(logging.ERROR)
-        self.prepare_cooker()
+        self.cooker_data = None
 
     def register_idle_function(self, function, data):
         pass
@@ -71,10 +71,16 @@ class Commands(cmd.Cmd):
         self.cooker_data = self.cooker.status
         self.cooker_data.appends = self.cooker.appendlist
 
+    def check_prepare_cooker(self):
+        if not self.cooker_data:
+            self.prepare_cooker()
+
     def do_show_layers(self, args):
+        self.check_prepare_cooker()
         logger.info(str(self.config_data.getVar('BBLAYERS', True)))
 
     def do_show_overlayed(self, args):
+        self.check_prepare_cooker()
         if self.cooker.overlayed:
             logger.info('Overlayed recipes:')
             for f in self.cooker.overlayed.iterkeys():
@@ -94,6 +100,7 @@ class Commands(cmd.Cmd):
             logger.error('Directory %s exists and is non-empty, please clear it out first' % arglist[0])
             return
 
+        self.check_prepare_cooker()
         layers = (self.config_data.getVar('BBLAYERS', True) or "").split()
         for layer in layers:
             overlayed = []
@@ -143,6 +150,7 @@ class Commands(cmd.Cmd):
         recipefile.writelines(appendfile.readlines())
 
     def do_show_appends(self, args):
+        self.check_prepare_cooker()
         if not self.cooker_data.appends:
             logger.info('No append files found')
             return
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] bitbake-layers: add command help
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
                   ` (3 preceding siblings ...)
  2011-07-22 17:30 ` [PATCH 4/6] bitbake-layers: check for errors before parsing Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-22 17:30 ` [PATCH 6/6] bitbake-layers: remove unneeded do_EOF Paul Eggleton
  2011-07-25 11:49 ` [PATCH 0/6] Misc minor fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

If you run "bitbake-layers help commandname" it now provides some useful
help text.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake-layers |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 56253f5..746d79d 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -76,10 +76,18 @@ class Commands(cmd.Cmd):
             self.prepare_cooker()
 
     def do_show_layers(self, args):
+        """show_layers: shows current configured layers"""
         self.check_prepare_cooker()
         logger.info(str(self.config_data.getVar('BBLAYERS', True)))
 
     def do_show_overlayed(self, args):
+        """show_overlayed: list overlayed recipes (where there is a recipe in another
+layer that has a higher layer priority)
+
+syntax: show_overlayed
+
+Highest priority recipes are listed with the recipes they overlay as subitems.
+"""
         self.check_prepare_cooker()
         if self.cooker.overlayed:
             logger.info('Overlayed recipes:')
@@ -91,9 +99,25 @@ class Commands(cmd.Cmd):
             logger.info('No overlayed recipes found')
 
     def do_flatten(self, args):
+        """flatten: flattens layer configuration into a separate output directory.
+
+syntax: flatten <outputdir>
+
+Takes the current layer configuration and builds a "flattened" directory
+containing the contents of all layers, with any overlayed recipes removed
+and bbappends appended to the corresponding recipes. Note that some manual
+cleanup may still be necessary afterwards, in particular:
+
+* where non-recipe files (such as patches) are overwritten (the flatten
+  command will show a warning for these)
+* where anything beyond the normal layer setup has been added to
+  layer.conf (only the lowest priority layer's layer.conf is used)
+* overridden/appended items from bbappends will need to be tidied up
+"""
         arglist = args.split()
         if len(arglist) != 1:
-            logger.error('syntax: flatten <outputdir>')
+            logger.error('Please specify an output directory')
+            self.do_help('flatten')
             return
 
         if os.path.exists(arglist[0]) and os.listdir(arglist[0]):
@@ -150,6 +174,12 @@ class Commands(cmd.Cmd):
         recipefile.writelines(appendfile.readlines())
 
     def do_show_appends(self, args):
+        """show_appends: List bbappend files and recipe files they apply to
+
+syntax: show_appends
+
+Recipes are listed with the bbappends that apply to them as subitems.
+"""
         self.check_prepare_cooker()
         if not self.cooker_data.appends:
             logger.info('No append files found')
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] bitbake-layers: remove unneeded do_EOF
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
                   ` (4 preceding siblings ...)
  2011-07-22 17:30 ` [PATCH 5/6] bitbake-layers: add command help Paul Eggleton
@ 2011-07-22 17:30 ` Paul Eggleton
  2011-07-25 11:49 ` [PATCH 0/6] Misc minor fixes Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-07-22 17:30 UTC (permalink / raw)
  To: bitbake-devel

do_EOF is only needed when using the Python cmd class in line-oriented
mode - we are just sending single commands to it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake-layers |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 746d79d..3d563b5 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -240,9 +240,6 @@ Recipes are listed with the bbappends that apply to them as subitems.
                 notappended.append(basename)
         return appended, notappended
 
-    def do_EOF(self, line):
-        return True
-
 
 class Config(object):
     def __init__(self, **options):
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] Misc minor fixes
  2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
                   ` (5 preceding siblings ...)
  2011-07-22 17:30 ` [PATCH 6/6] bitbake-layers: remove unneeded do_EOF Paul Eggleton
@ 2011-07-25 11:49 ` Richard Purdie
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2011-07-25 11:49 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: bitbake-devel

On Fri, 2011-07-22 at 18:30 +0100, Paul Eggleton wrote:
> Some minor usability-related fixes for bitbake and bitbake-layers.
> 
> The changes (against poky, apply against bitbake master with -p2) are
> available in the git repository at:
>   git://git.pokylinux.org/poky-contrib paule/bitbake-tweaks
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/bitbake-tweaks
> 
> Paul Eggleton (6):
>   bitbake: add note to -b option indicating no dependency handling
>   bitbake/cooker: show a warning when -b is specified
>   bitbake: adjust comments/messages for default server change
>   bitbake-layers: check for errors before parsing
>   bitbake-layers: add command help
>   bitbake-layers: remove unneeded do_EOF

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-25 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 17:30 [PATCH 0/6] Misc minor fixes Paul Eggleton
2011-07-22 17:30 ` [PATCH 1/6] bitbake: add note to -b option indicating no dependency handling Paul Eggleton
2011-07-22 17:30 ` [PATCH 2/6] bitbake/cooker: show a warning when -b is specified Paul Eggleton
2011-07-22 17:30 ` [PATCH 3/6] bitbake: adjust comments/messages for default server change Paul Eggleton
2011-07-22 17:30 ` [PATCH 4/6] bitbake-layers: check for errors before parsing Paul Eggleton
2011-07-22 17:30 ` [PATCH 5/6] bitbake-layers: add command help Paul Eggleton
2011-07-22 17:30 ` [PATCH 6/6] bitbake-layers: remove unneeded do_EOF Paul Eggleton
2011-07-25 11:49 ` [PATCH 0/6] Misc minor fixes 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.