| Submitter | Andrew Stubbs |
|---|---|
| Date | Jan. 14, 2013, 3:19 p.m. |
| Message ID | <50F421E6.4060400@codesourcery.com> |
| Download | mbox | patch |
| Permalink | /patch/42589/ |
| State | New |
| Headers | show |
Comments
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
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
Patch
--- /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