[oe] bitbake: environments getting lost inside python callback function

Anand Sivaram aspnair at gmail.com
Mon Jun 28 12:02:20 UTC 2010


Dear All,

I am using OE to make a davinci dm6446 build.  The build machine is an
Athlon X4 with Ubuntu 10.04 amd64 installed.  Everything is building fine
(palmtop-image, x11-gpe-image etc.), now I am moving onto gstreamer-ti
related recipes.

As a part of that I tried the following
bitbake -v -b ./recipes/ti/ti-dspbios_5.41.00.06.bb -f
This downloads bios_setuplinux_5_41_00_06.bin from TI site and trying to
unpack it for which it uses recipes/ti/ti-eula-unpack.inc

Since it was not working, I tried to understand
recipes/ti/ti-eula-unpack.inc, used the following debug code snippets.

Updated the first python callback "python do_unpack" to the following to get
the list of environments
python do_unpack () {
    os.system("/usr/bin/env > /tmp/env_py.txt 2>&1")
    os.system("/bin/echo env complete >> /tmp/env.txt")
    bb.build.exec_func('base_do_unpack', d)
    bb.build.exec_func('ti_bin_do_unpack', d)
}

Now going through the output of "cat /tmp/env_py.txt" from a shell.
*Every* *environment* *is* *lost* *with* *the* *exception* of PWD,
SHLVwhere PWD is showing the complete path of workdir,SHLV=1 (like a
top level shell)
This was causing the rest of the script file to give errors.

Next I commented out the whole python do_unpack() callback put a new custom
do_unpack() shell callback, just for finding the environment list.
do_unpack() {
   echo unpacking..................
   env > /tmp/env_shell.txt 2>&1
   sleep 100
}
Now cat /tmp/env_shell.txt is showing proper environments.

Could anyone throw some light on this?

Thanks and Regards

Anand



More information about the Openembedded-devel mailing list