d.getVar("X", expand=False) is not correct anymore, the default value has been removed and running bitbake will resutl in an error. the current latest online docuementation http://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python does not mention this, even if it should since the bitbake version shipped with YP Core - Krogoth 2.1 does not have the default anymore. this caused some confusion for me when I was looking for the reason why the samples to my bitbake tutorial (http://a4z.bitbucket.org/docs/BitBake/guide.html) stopped working
Right, this needs to be corrected.
Hi, Tell me what I need for that line for it to be correct. Thanks, Scott
There is no default for the expand parameter anymore, so replace 'expand=True' with 'expand'. We'll want to do the same for getVarFlag() as well.
Hi, I took out the "=True" part for both of these in the table. There still is an "expand=False" piece for them. Does that matter? Can you look this change over? http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python Thanks, Scott
the operation column need to be changed, I can see no change in the link you posted d.getVar("X", expand=False) should be d.getVar("X", expand) it seems that this d.getVarFlag("X", flag, expand=False) needs the same change ans should become d.getVarFlag("X", flag, expand) btw, the whole story motivated me to write a blog where I refer to documents that talk about changing user interfaces and flags in functions, possible interesting for Paul (should be) http://a4z.bitbucket.org/blog/2016/05/28/A-broken-interface-or-why-ZMQ-C4-is-worth-reading.html
I was basing my changes on Comment 3, which seemed to not really address any defaults. Thanks for clearing that up. If you look at the two areas I changed, I did change "exand=True" to "expand" in each of the latter parts of those pieces - see d.getVar and d.getVarFlag in http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python. You will see the last part of the description for each of those now says " Using "expand" expands the value." and "Using "expand" expands the named flag.", respectively. They used to say ".... expand=True ..." in both cases. So you are saying I need to restore those particular pieces and remove the "expand=False" part for them both? Scott
yes, it should be Operation: d.getVar("X", expand) Description: Returns the value of variable "X". Using "expand=True" expands the value. comment 3 talked already about some future state of the function where the function default value might be true, seems that is the plan, and was therefore not correct. imho just an other sing that my blog post about flags in functions targets some truths :-) (just kidding, but I mean it serious)
How does this look? http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python Thanks, Scott
looks good for me. this would have told me immediately that there is no default any more, so I thinks it's fine. Thanks for you effort Scott!
No problem Harald... thanks for taking the time to note it here. Best, Scott Setting to RESOLVED and moving the doc flag to done.