All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] toasterui.py: warn if buildstats is missing
@ 2016-10-27 16:36 Olaf Mandel
  2016-10-28  9:27 ` Joshua Lock
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Mandel @ 2016-10-27 16:36 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Olaf Mandel

Like for buildhistory and INHERIT, warn if buildstats is missing
from USER_CLASSES.

Signed-off-by: Olaf Mandel <o.mandel@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.")
+
     if not params.observe_only:
         params.updateFromServer(server)
         params.updateToServer(server, os.environ.copy())
-- 
2.1.4



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

* Re: [PATCH] toasterui.py: warn if buildstats is missing
  2016-10-27 16:36 [PATCH] toasterui.py: warn if buildstats is missing Olaf Mandel
@ 2016-10-28  9:27 ` Joshua Lock
  2016-10-28 14:04   ` [PATCH v2] " Olaf Mandel
  0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lock @ 2016-10-28  9:27 UTC (permalink / raw)
  To: Olaf Mandel, bitbake-devel

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@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
> 


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

* [PATCH v2] toasterui.py: warn if buildstats is missing
  2016-10-28  9:27 ` Joshua Lock
@ 2016-10-28 14:04   ` Olaf Mandel
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf Mandel @ 2016-10-28 14:04 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Olaf Mandel

Like for buildhistory, warn if buildstats is missing from INHERIT.

CC: Joshua Lock <joshua.g.lock@linux.intel.com>
Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
---
 lib/bb/ui/toasterui.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 9808f6b..b1b3684 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -168,6 +168,9 @@ def main(server, eventHandler, params):
         logger.warning("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
         build_history_enabled = False
 
+    if not "buildstats" in inheritlist.split(" "):
+        logger.warning("buildstats is not enabled. Please enable INHERIT += \"buildstats\" to generate build statistics.")
+
     if not params.observe_only:
         params.updateFromServer(server)
         params.updateToServer(server, os.environ.copy())
-- 
2.1.4



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

end of thread, other threads:[~2016-10-28 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 16:36 [PATCH] toasterui.py: warn if buildstats is missing Olaf Mandel
2016-10-28  9:27 ` Joshua Lock
2016-10-28 14:04   ` [PATCH v2] " Olaf Mandel

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.