summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-03 13:37:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-06 16:45:34 +0100
commit70ee928f8f4152f198f4db61517c958d54f1c0a7 (patch)
tree00848366dd472e37402091c1fb940080412c0247 /bitbake/lib/bb
parent9435b6cf10efb11c4ad206e06665321b058d943e (diff)
downloadpoky-70ee928f8f4152f198f4db61517c958d54f1c0a7.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/command.py3
-rw-r--r--bitbake/lib/bb/tinfoil.py7
2 files changed, 6 insertions, 4 deletions
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:
499 appends = params[1] 499 appends = params[1]
500 appendlist = params[2] 500 appendlist = params[2]
501 if len(params) > 3: 501 if len(params) > 3:
502 config_data_dict = params[3] 502 config_data = command.remotedatastores[params[3]]
503 config_data = command.remotedatastores.receive_datastore(config_data_dict)
504 else: 503 else:
505 config_data = None 504 config_data = None
506 505
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:
617 fn = self.get_recipe_file(pn) 617 fn = self.get_recipe_file(pn)
618 return self.parse_recipe_file(fn) 618 return self.parse_recipe_file(fn)
619 619
620 def parse_recipe_file(self, fn, appends=True, appendlist=None): 620 def parse_recipe_file(self, fn, appends=True, appendlist=None, config_data=None):
621 """ 621 """
622 Parse the specified recipe file (with or without bbappends) 622 Parse the specified recipe file (with or without bbappends)
623 and return a datastore object representing the environment 623 and return a datastore object representing the environment
@@ -635,7 +635,10 @@ class Tinfoil:
635 try: 635 try:
636 if appends and appendlist == []: 636 if appends and appendlist == []:
637 appends = False 637 appends = False
638 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist) 638 if config_data:
639 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist, config_data.dsindex)
640 else:
641 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist)
639 if dscon: 642 if dscon:
640 return self._reconvert_type(dscon, 'DataStoreConnectionHandle') 643 return self._reconvert_type(dscon, 'DataStoreConnectionHandle')
641 else: 644 else: