[oe] calling python functions or mixing shell and python code

Detlef Vollmann dv at vollmann.ch
Mon Sep 17 18:55:36 UTC 2007


Hello,

how can I mix shell and python code in the same task?

To be more concrete, here is what I tried:
python do_fetch_more () {
    import bb

    bb.data.setVar('SRC_URI', '${SRC_URI_BASEPACKS}', d)
    base_do_fetch
}
addtask fetch_more before do_unpack after do_fetch

But this doesn't work.

Another approach was:
do_fetch_base () {
    export SRC_URI=${SRC_URI_BASEPACKS}
    base_do_fetch
}

But of course this also doesn't work...

Any help appreciated,
  Detlef

-- 
Detlef Vollmann   vollmann engineering gmbh
Linux and C++ for Embedded Systems    http://www.vollmann.ch/




More information about the Openembedded-devel mailing list