diff options
Diffstat (limited to 'bitbake/lib/bb/command.py')
| -rw-r--r-- | bitbake/lib/bb/command.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index d5be86dab8..b296b8ce84 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
| @@ -493,6 +493,50 @@ class CommandsSync: | |||
| 493 | varparse = bb.data_smart.VariableParse(varname, datastore) | 493 | varparse = bb.data_smart.VariableParse(varname, datastore) |
| 494 | return varparse.python_sub(expr) | 494 | return varparse.python_sub(expr) |
| 495 | 495 | ||
| 496 | def dataStoreConnectorRelease(self, command, params): | ||
| 497 | dsindex = params[0] | ||
| 498 | if dsindex <= 0: | ||
| 499 | raise CommandError('dataStoreConnectorRelease: invalid index %d' % dsindex) | ||
| 500 | command.remotedatastores.release(dsindex) | ||
| 501 | |||
| 502 | def parseRecipeFile(self, command, params): | ||
| 503 | """ | ||
| 504 | Parse the specified recipe file (with or without bbappends) | ||
| 505 | and return a datastore object representing the environment | ||
| 506 | for the recipe. | ||
| 507 | """ | ||
| 508 | fn = params[0] | ||
| 509 | appends = params[1] | ||
| 510 | appendlist = params[2] | ||
| 511 | if len(params) > 3: | ||
| 512 | config_data_dict = params[3] | ||
| 513 | config_data = command.remotedatastores.receive_datastore(config_data_dict) | ||
| 514 | else: | ||
| 515 | config_data = None | ||
| 516 | |||
| 517 | if appends: | ||
| 518 | if appendlist is not None: | ||
| 519 | appendfiles = appendlist | ||
| 520 | else: | ||
| 521 | appendfiles = command.cooker.collection.get_file_appends(fn) | ||
| 522 | else: | ||
| 523 | appendfiles = [] | ||
| 524 | # We are calling bb.cache locally here rather than on the server, | ||
| 525 | # but that's OK because it doesn't actually need anything from | ||
| 526 | # the server barring the global datastore (which we have a remote | ||
| 527 | # version of) | ||
| 528 | if config_data: | ||
| 529 | # We have to use a different function here if we're passing in a datastore | ||
| 530 | # NOTE: we took a copy above, so we don't do it here again | ||
| 531 | envdata = bb.cache.parse_recipe(config_data, fn, appendfiles)[''] | ||
| 532 | else: | ||
| 533 | # Use the standard path | ||
| 534 | parser = bb.cache.NoCache(command.cooker.databuilder) | ||
| 535 | envdata = parser.loadDataFull(fn, appendfiles) | ||
| 536 | idx = command.remotedatastores.store(envdata) | ||
| 537 | return DataStoreConnectionHandle(idx) | ||
| 538 | parseRecipeFile.readonly = True | ||
| 539 | |||
| 496 | class CommandsAsync: | 540 | class CommandsAsync: |
| 497 | """ | 541 | """ |
| 498 | A class of asynchronous commands | 542 | A class of asynchronous commands |
