]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
base.bbclass: Fix bitbake example class usage
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jan 2013 12:39:28 +0000 (12:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jan 2013 12:39:31 +0000 (12:39 +0000)
Patch from Andrew Stubbs <ams@codesourcery.com> to fix listtasks and showdata
functions to output data correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/base.bbclass

index 49f8e397696082e2f79082e80258b529e2ea3cba..0972d69440947e9d0c22c037302208e6b9749945 100644 (file)
@@ -44,7 +44,7 @@ python do_showdata() {
        # 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 @@ python do_listtasks() {
        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