All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix bundled base.bbclass file
@ 2013-01-14 15:19 Andrew Stubbs
  2013-01-15 12:52 ` Andrew Stubbs
  2013-01-18 12:43 ` Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Stubbs @ 2013-01-14 15:19 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]

Hi,

The base.bbclass file that is included with the bitbake sources does not 
appear to work properly. Specifically, none of the output appears on screen.

A quick look at the poky equivalent shows that they use a different 
means to print the data. Presumably something got updated somewhere, and 
the example base class is merely out of date.

The attached patch fixes the do_listtasks and do_showdata code such that 
it works as I would expect.

I had expected that the base_do_build function would run if my .bb file 
did not define do_build, but it does not appear to, and it's not obvious 
to me how, when, or why it is supposed to work.

Andrew

[-- Attachment #2: baseclass.patch --]
[-- Type: text/x-patch, Size: 613 bytes --]

--- /opt/bitbake/classes/base.bbclass	2012-11-26 09:55:32.000000000 +0000
+++ classes/base.bbclass	2013-01-14 15:02:36.965594908 +0000
@@ -44,7 +44,7 @@
 	# emit the metadata which isnt valid shell
 	for e in bb.data.keys(d):
 		if d.getVarFlag(e, 'python'):
-			sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, True)))
+			bb.plain("\npython %s () {\n%s}" % (e, d.getVar(e, True)))
 }
 
 addtask listtasks
@@ -53,7 +53,7 @@
 	import sys
 	for e in bb.data.keys(d):
 		if d.getVarFlag(e, 'task'):
-			sys.__stdout__.write("%s\n" % e)
+			bb.plain("%s" % e)
 }
 
 addtask build

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

* Re: [PATCH] fix bundled base.bbclass file
  2013-01-14 15:19 [PATCH] fix bundled base.bbclass file Andrew Stubbs
@ 2013-01-15 12:52 ` Andrew Stubbs
  2013-01-18 12:43 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Stubbs @ 2013-01-15 12:52 UTC (permalink / raw)
  Cc: bitbake-devel

On 14/01/13 15:19, Andrew Stubbs wrote:
> Hi,
>
> The base.bbclass file that is included with the bitbake sources does not
> appear to work properly. Specifically, none of the output appears on
> screen.
>
> A quick look at the poky equivalent shows that they use a different
> means to print the data. Presumably something got updated somewhere, and
> the example base class is merely out of date.
>
> The attached patch fixes the do_listtasks and do_showdata code such that
> it works as I would expect.
>
> I had expected that the base_do_build function would run if my .bb file
> did not define do_build, but it does not appear to, and it's not obvious
> to me how, when, or why it is supposed to work.

I forgot to add, the env printing still doesn't work, but I don't know 
how best to fix that? The emit_env method takes a file handle, but 
stdout and stderr don't work.

Andrew



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

* Re: [PATCH] fix bundled base.bbclass file
  2013-01-14 15:19 [PATCH] fix bundled base.bbclass file Andrew Stubbs
  2013-01-15 12:52 ` Andrew Stubbs
@ 2013-01-18 12:43 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2013-01-18 12:43 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: bitbake-devel

On Mon, 2013-01-14 at 15:19 +0000, Andrew Stubbs wrote:
> The base.bbclass file that is included with the bitbake sources does not 
> appear to work properly. Specifically, none of the output appears on screen.
> 
> A quick look at the poky equivalent shows that they use a different 
> means to print the data. Presumably something got updated somewhere, and 
> the example base class is merely out of date.
> 
> The attached patch fixes the do_listtasks and do_showdata code such that 
> it works as I would expect.

I merged that, thanks.

> I had expected that the base_do_build function would run if my .bb file 
> did not define do_build, but it does not appear to, and it's not obvious 
> to me how, when, or why it is supposed to work.

Your expectation is correct, I'm not sure why that wouldn't happen. The
EXPORT_FUNCTIONS do_build should mean do_build gets mapped to
base_do_build.

Cheers,

Richard




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

end of thread, other threads:[~2013-01-18 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 15:19 [PATCH] fix bundled base.bbclass file Andrew Stubbs
2013-01-15 12:52 ` Andrew Stubbs
2013-01-18 12:43 ` 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.