Bug 5384 - bitbake does not expand subshell instruction call in conf/local.conf
Summary: bitbake does not expand subshell instruction call in conf/local.conf
Status: RESOLVED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.5.1
Hardware: x86 Multiple
: Low minor
Target Milestone: 1.6
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-24 23:40 UTC by Keller Eric
Modified: 2013-11-25 16:21 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
bitbake traceback (2.54 KB, application/octet-stream)
2013-10-24 23:40 UTC, Keller Eric
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keller Eric 2013-10-24 23:40:41 UTC
Created attachment 1579 [details]
bitbake traceback

using:
grep BB_NUMBER_THREADS conf/local.conf
BB_NUMBER_THREADS ?= "$(grep -i 'model name' /proc/cpuinfo | wc -l)"
PARALLEL_MAKE ?= "-j ${BB_NUMBER_THREADS}"

bitbake does not expand the BB_NUMBER_THREADS variable when setting it.

see attached traceback
Comment 1 Richard Purdie 2013-11-25 16:21:50 UTC
You can't put shell code into a bitbake variable like that. There is no such shell expansion syntax as $(). You could declare a python function:

def get_threads(d):
    import commands
    o = commands.getstatusoutput("grep -i 'model name' /proc/cpuinfo | wc -l")
    return o

BB_NUMBER_THREADS = "${@get_threads(d)}"

or something like that anyway...