[bitbake-devel] Question about python interpreter in methods embedded in recipes

Rémi Peuvergne remi.peuvergne at openwide.fr
Wed Aug 12 09:23:55 UTC 2015


Hi everyone ! 

I've been investigating on an issue when building an image, and I gave up doing what I first wanted. 
I'd like to know more about the issue, and possibly suggest an improvement to bitbake... 

The issue is related to "embedded python methods" in recipes. 

In my image recipe, I'm modifying the rootfs (basically to add a hashed password to /etc/shadow), with something like : 

python set_password() { 
<some piece of python script here> 
} 

The thing is, this piece of code is executed by the *host* interpreter, so it depends on the dev machine (in my case I ran into an issue with crypt.mksalt() not being available). 
It would be nice to allow executing this with the *native* interpreter, the one built during the whole image build process. 

I tried inheriting pythonnative, which sets the PYTHON variable the correct way, but it's not used for those methods... 
I guess it's not easy, since it would need to pass the datastore, but I wonder if there's any smart solution to this ? 

Thanks for your help ! 


Remi 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150812/1ff08391/attachment-0002.html>


More information about the bitbake-devel mailing list