[bitbake-devel] [PATCH] bitbake: added -j option

Richard Purdie richard.purdie at linuxfoundation.org
Mon May 21 14:07:23 UTC 2012


On Sun, 2012-05-20 at 17:21 +0200, Enrico Scholz wrote:
> This patch adds an -j option which overrides/sets BB_NUMBER_THREADS.
> For some use cases like '-c fetchall' it might be useful to modify
> temporarily the number of parallel running tasks without editing
> bitbake.conf.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
> ---
>  bin/bitbake      |    4 ++++
>  doc/bitbake.1    |    4 ++++
>  lib/bb/cooker.py |    7 +++++++
>  3 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/bin/bitbake b/bin/bitbake
> index 478ac06..b29fae9 100755
> --- a/bin/bitbake
> +++ b/bin/bitbake
> @@ -171,6 +171,10 @@ Default BBFILES are the .bb files in the current directory.""")
>  
>      parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to",
>                 action = "store", dest = "bind", default = False)
> +
> +    parser.add_option("-j", "--jobs", help = "The number of threads BitBake should run at once",
> +                      action = "store", dest = "number_threads", default = None)
> +
>      options, args = parser.parse_args(sys.argv)
>  
>      configuration = BBConfiguration(options)


I think in this case you may as well just whitelist BB_NUMBER_THREADS
from the environment and set that variable there. I'm not seeing a huge
need for the specific commandline option...

Cheers,

Richard






More information about the bitbake-devel mailing list