diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-03-20 17:05:52 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:22 +0000 |
commit | 99414bdb1c64f7f03e12c347cc16c43c2fa336b2 (patch) | |
tree | ed87faa1728cd3731a846b278269281e348c401b /bitbake/lib/bb/command.py | |
parent | 0cb6f853357f26962748ab1a21490e7d4af53af0 (diff) | |
download | poky-99414bdb1c64f7f03e12c347cc16c43c2fa336b2.tar.gz |
bitbake: tinfoil: fix override handling in remote datastores
There was a huge gap in the remote datastore code introduced in the
tinfoil2 rework - we weren't handling overrides at all, since these are
stored separately from the actual data in the DataSmart object. Thus,
when a datastore actually represents a remote datastore we need to go
back to that remote datastore to get the override data as well, so
introduce code to do that.
To avoid a second round-trip I had to modify the _findVar() function to
return the override data as well. This will increase the overhead a
little when that data is superfluous, but without making the function
even uglier I don't think there's a way to avoid that.
(Bitbake rev: 4f9d6f060ed247fb6fa2f45668a892a1788d3f91)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r-- | bitbake/lib/bb/command.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index db20f3ffad..222a76e580 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -457,16 +457,22 @@ class CommandsSync: | |||
457 | dsindex = params[0] | 457 | dsindex = params[0] |
458 | name = params[1] | 458 | name = params[1] |
459 | datastore = command.remotedatastores[dsindex] | 459 | datastore = command.remotedatastores[dsindex] |
460 | value = datastore._findVar(name) | 460 | value, overridedata = datastore._findVar(name) |
461 | 461 | ||
462 | if value: | 462 | if value: |
463 | content = value.get('_content', None) | 463 | content = value.get('_content', None) |
464 | if isinstance(content, bb.data_smart.DataSmart): | 464 | if isinstance(content, bb.data_smart.DataSmart): |
465 | # Value is a datastore (e.g. BB_ORIGENV) - need to handle this carefully | 465 | # Value is a datastore (e.g. BB_ORIGENV) - need to handle this carefully |
466 | idx = command.remotedatastores.check_store(content, True) | 466 | idx = command.remotedatastores.check_store(content, True) |
467 | return {'_content': DataStoreConnectionHandle(idx), '_connector_origtype': 'DataStoreConnectionHandle'} | 467 | return {'_content': DataStoreConnectionHandle(idx), |
468 | '_connector_origtype': 'DataStoreConnectionHandle', | ||
469 | '_connector_overrides': overridedata} | ||
468 | elif isinstance(content, set): | 470 | elif isinstance(content, set): |
469 | return {'_content': list(content), '_connector_origtype': 'set'} | 471 | return {'_content': list(content), |
472 | '_connector_origtype': 'set', | ||
473 | '_connector_overrides': overridedata} | ||
474 | else: | ||
475 | value['_connector_overrides'] = overridedata | ||
470 | return value | 476 | return value |
471 | dataStoreConnectorFindVar.readonly = True | 477 | dataStoreConnectorFindVar.readonly = True |
472 | 478 | ||