[bitbake-devel] [PATCH] toasterui.py: warn if buildstats is missing

Joshua Lock joshua.g.lock at linux.intel.com
Fri Oct 28 09:27:58 UTC 2016


On Thu, 2016-10-27 at 16:36 +0000, Olaf Mandel wrote:
> Like for buildhistory and INHERIT, warn if buildstats is missing
> from USER_CLASSES.
> 
> Signed-off-by: Olaf Mandel <o.mandel at menlosystems.com>
> ---
>  lib/bb/ui/toasterui.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
> index 9808f6b..2687faf 100644
> --- a/lib/bb/ui/toasterui.py
> +++ b/lib/bb/ui/toasterui.py
> @@ -168,6 +168,11 @@ def main(server, eventHandler, params):
>          logger.warning("buildhistory is not enabled. Please enable
> INHERIT += \"buildhistory\" to see image details.")
>          build_history_enabled = False
>  
> +    userclasseslist, _ = server.runCommand(["getVariable",
> "USER_CLASSES"])
> +
> +    if not "buildstats" in userclasseslist.split(" "):
> +        logger.warning("buildstats is not enabled. Please enable
> USER_CLASSES += \"buildstats\" to generate build statistics.")

As USER_CLASSES is an intermediate variable whose value becomes part of
the INHERIT assignment it'd be better to check whether buildstats is in
INHERIT, rather than USER_CLASSES. 

This should better handle configurations which include buildstats in a
different manner.

> +
>      if not params.observe_only:
>          params.updateFromServer(server)
>          params.updateToServer(server, os.environ.copy())
> -- 
> 2.1.4
> 



More information about the bitbake-devel mailing list