Bug 9148

Summary: Cover variable references not being expanded in python functions
Product: [Documentation] BitBake User Manual Reporter: Paul Eggleton <bluelightning>
Component: bitbake-manualAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact: Francisco Pedraza <francisco.j.pedraza.gonzalez>
Severity: enhancement    
Priority: Medium+ CC: alexandru.c.georgescu, sgw, srifenbark
Version: unspecified   
Target Milestone: 2.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: 3 March 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Paul Eggleton 2016-02-21 21:04:22 UTC
In "BitBake Style Python Functions", could you please add a note box with the following content:

Variable expressions e.g. ${X} are no longer expanded within Python functions. This is intentional in order to allow you to freely set variable values to expandable expressions without having them expanded prematurely. If you do wish to expand a variable within a Python function, use d.getVar("X", True), or for more complicated expressions use d.expand().
Comment 1 Scott Rifenbark 2016-02-23 17:23:18 UTC
Paul, 

See http://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#bitbake-style-python-functions and let me know if the note is okay.  Pretty much what you suggested.
Comment 2 Scott Rifenbark 2016-03-03 17:24:13 UTC
Paul, 

Check this out when you can... the bug got moved to Medium +.

Thanks, 
Scott
Comment 3 Paul Eggleton 2016-03-03 17:27:48 UTC
Yep, looks good to me.
Comment 4 Scott Rifenbark 2016-03-03 17:29:29 UTC
Thanks for the verification Paul.  Setting status to RESOLVED and moving the doc flag to "done."

Scott