From patchwork Mon Jan 14 15:19:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel] fix bundled base.bbclass file Date: Mon, 14 Jan 2013 15:19:02 -0000 From: Andrew Stubbs X-Patchwork-Id: 42589 Message-Id: <50F421E6.4060400@codesourcery.com> To: 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 --- /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