bitbake: lib/bb/command: fix overrides in remote datastores where there is no default

If you have, for example, no value set for a variable VARIABLE and a
then VARIABLE_pn-something = "value" and then you parse something.bb,
you expect getVar('VARIABLE') on the resulting datastore to return
"value", but the code here assumed that if the variable wasn't set
without overrides then we didn't need to return the overridedata and
thus we didn't get the overridden value.

In OE this affected the ability to get RECIPE_MAINTAINER for a recipe
in a script using tinfoil (since this is only set from an inc file with
_pn- overrides for each recipe, and no default is set).

(Bitbake rev: b3d2c9917c5fd8278878328794daa107ddf79b64)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2017-04-20 14:20:29 +12:00 committed by Richard Purdie
parent 7bde854ef7
commit d45f5be977
1 changed files with 3 additions and 0 deletions

View File

@ -479,6 +479,9 @@ class CommandsSync:
'_connector_overrides': overridedata} '_connector_overrides': overridedata}
else: else:
value['_connector_overrides'] = overridedata value['_connector_overrides'] = overridedata
else:
value = {}
value['_connector_overrides'] = overridedata
return value return value
dataStoreConnectorFindVar.readonly = True dataStoreConnectorFindVar.readonly = True