[OE-core] can i use bitbake to run an arbitrary python routine in a class file?

Robert P. J. Day rpjday at crashcourse.ca
Mon Jul 2 13:40:16 UTC 2012


  i'm not even remotely a python expert (working on that, though) so
there may be a trivial and documented answer to this -- can i use
bitbake to run an arbitrary python routine to see what the output
would be?

  for example, here's qemu.bbclass:

def qemu_target_binary(data):
        import bb

        target_arch = data.getVar("TARGET_ARCH", True)
        if target_arch in ("i486", "i586", "i686"):
                target_arch = "i386"
        elif target_arch == "powerpc":
                target_arch = "ppc"

        return "qemu-" + target_arch

what if i wanted to see what that would return given a current build?
can i do that?  does that question even make sense?

rday

p.s.  i am documenting all these answers, so they're not disappearing
into the ether.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list