[oe] getVar. setVar, "d", etc.

Richard Purdie rpurdie at rpsys.net
Tue Feb 5 22:03:11 UTC 2008


On Mon, 2008-02-04 at 18:37 -0800, Rich Pixley wrote:
> Let me try this again.
> 
> I have a class.  My class is listed in the INHERIT in my local.conf.
> 
> My class intends to set a variable, SUBMISSION_busybox, which will be 
> used by a bb file as "PR = ${SUBMISSION_busybox}".
> 
> I'm setting the variable via setVar, and pretty printing "d" shows me 
> that it's in p.dict.
> 
> However, attempting to bitbake yields:
> 
> NOTE: <type 'exceptions.SyntaxError'>:EOL while scanning single-quoted 
> string (<string>, line 1) while evaluating:
> ${@base_set_filespath([ 
> "/home/rich/projects/nova/oe-bom/nova/oe/packages/busybox/busybox-1.7.2-${SUBMISSION_busybox}", 
> "/home/rich/projects/nova/oe-bom/nova/oe/packages/busybox/busybox-1.7.2", 
> "/home/rich/projects/nova/oe-bom/nova/oe/packages/busybox/busybox", 
> "/home/rich/projects/nova/oe-bom/nova/oe/packages/busybox/files", 
> "/home/rich/projects/nova/oe-bom/nova/oe/packages/busybox" ], d)}
> ERROR: Error in executing:
> ERROR: Exception:<type 'exceptions.SyntaxError'> Message:EOL while 
> scanning single-quoted string (<string>, line 1)
> ERROR: Printing the environment of the function

The problem is the point at which some variables are accessed. How,
where and when your class sets this variable SUBMISSION_busybox is very
important. 

In this case bitbake is trying to evaluate FILESPATH set in
base.bbclass. To do this it references the ${PF} variable which in turn
contains ${PR} which in turn contains ${SUBMISSION_busybox}. At this
point ${SUBMISSION_busybox} isn't set so it errors.

> And I'm totally confused.  It would appear to me as though 
> SUBMISSION_busybox isn't being found and thus isn't being expanded.  I'm 
> assuming that my understanding of the various "d"'s is my conceptual 
> weakness here.

At the point in time where bitbake is trying to evaluate FILESPATH which
indirectly includes SUBMISSION_busybox, SUBMISSION_busybox isn't in d.

Regards,

Richard





More information about the Openembedded-devel mailing list