Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] fix bundled base.bbclass file
Date: Mon, 14 Jan 2013 15:19:02 +0000	[thread overview]
Message-ID: <50F421E6.4060400@codesourcery.com> (raw)

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

             reply	other threads:[~2013-01-14 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 15:19 Andrew Stubbs [this message]
2013-01-15 12:52 ` [PATCH] fix bundled base.bbclass file Andrew Stubbs
2013-01-18 12:43 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F421E6.4060400@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox