[bitbake-devel,1/1] lib/bb/command: fix overrides in remote datastores where there is no default

Submitted by Paul Eggleton on April 20, 2017, 2:20 a.m. | Patch ID: 139270

Details

Message ID 3653b7e0f718b37496d75f950d13ceead2ae6675.1492654797.git.paul.eggleton@linux.intel.com
State New
Headers show

Commit Message

Paul Eggleton April 20, 2017, 2:20 a.m.
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).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 lib/bb/command.py | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/lib/bb/command.py b/lib/bb/command.py
index 390d4f1..ab51d8e 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -479,6 +479,9 @@  class CommandsSync:
                         '_connector_overrides': overridedata}
             else:
                 value['_connector_overrides'] = overridedata
+        else:
+            value = {}
+            value['_connector_overrides'] = overridedata
         return value
     dataStoreConnectorFindVar.readonly = True