From 70ee928f8f4152f198f4db61517c958d54f1c0a7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Apr 2020 13:37:30 +0100 Subject: bitbake: tinfoil: Add back ability to parse on top of a datastore This option was removed recently as we didn't realise the layerindex relies upon it. Add back the API which it turns out can be supported as long as we assume the datastore passed in is a remote datastore which it usually would be unless created locally. (Bitbake rev: 4618da2094189e4d814b7d65672cb65c86c0626a) Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 3 +-- bitbake/lib/bb/tinfoil.py | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 2879950933..6abf38668b 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -499,8 +499,7 @@ class CommandsSync: appends = params[1] appendlist = params[2] if len(params) > 3: - config_data_dict = params[3] - config_data = command.remotedatastores.receive_datastore(config_data_dict) + config_data = command.remotedatastores[params[3]] else: config_data = None diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 1164ee6014..7d53608b21 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py @@ -617,7 +617,7 @@ class Tinfoil: fn = self.get_recipe_file(pn) return self.parse_recipe_file(fn) - def parse_recipe_file(self, fn, appends=True, appendlist=None): + def parse_recipe_file(self, fn, appends=True, appendlist=None, config_data=None): """ Parse the specified recipe file (with or without bbappends) and return a datastore object representing the environment @@ -635,7 +635,10 @@ class Tinfoil: try: if appends and appendlist == []: appends = False - dscon = self.run_command('parseRecipeFile', fn, appends, appendlist) + if config_data: + dscon = self.run_command('parseRecipeFile', fn, appends, appendlist, config_data.dsindex) + else: + dscon = self.run_command('parseRecipeFile', fn, appends, appendlist) if dscon: return self._reconvert_type(dscon, 'DataStoreConnectionHandle') else: -- cgit v1.2.3-54-g00ecf