Skip to contentSkip to conversation

overuse of bitbake flags considered harmful

DISCUSSION Phil Blundell 2 participants 2 messages Sep 27, 2012

lore
Share & tools
lore
#0 lore raw

I was mildly amused to discover, the other day, that the output of "bitbake -e rpm | grep PACKAGECONFIG" is not quite as one might naïvely expect.

I guess the right response to this is perhaps that bitbake ought nowadays to find some other way to store its own internal state, since the idiom of using flags is pretty well established in oe-core.

p.

#1 lore raw
Quoted 7 lines · Phil Blundell

I was mildly amused to discover, the other day, that the output of "bitbake -e rpm | grep PACKAGECONFIG" is not quite as one might naïvely expect.

I guess the right response to this is perhaps that bitbake ought nowadays to find some other way to store its own internal state, since the idiom of using flags is pretty well established in oe-core.

For those who don't realise what's going on here, the output is:

python PACKAGECONFIG () {
db bzip2 zlib beecrypt openssl libelf python}

since "python" is a flag bitbake uses to identify python functions too.

I suspect the better solution would be to use "_python" internally since we already have a convention within bitbake of prefixing internally used flags with "_".

http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/data_smart.py?id=49bc007c80e429090c4db51e30c5ce27e8a72558
http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/data_smart.py?id=980d658f3f1e6c5b459f741385533a11d35009ca

This would mean the metadata shouldn't use that namespace but I think we can live with that.

Cheers,

Richard