summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:30:45 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:04 +0100
commit8f716abaa48a61a264a854ce081ee551e6a8fbbc (patch)
treea849e544bef99692f175868b376715eb1539e3db
parenta3971620dc00d459dbc0ce25082feb7099fb967f (diff)
downloadpoky-8f716abaa48a61a264a854ce081ee551e6a8fbbc.tar.gz
bitbake: tinfoil: ensure variable history tracking works when parsing a recipe
If you set tracking=True when creating the tinfoil object, that ensures history is collected for the main datastore, but at the end of parsing the configuration, history tracking gets turned off to save time with the result that we don't collect history for any recipes we parse. Enable tracking when we parse a recipe (and disable it afterwards if we enabled it) in order to fix this. This fixes functionality in OE's devtool that relies upon variable history (such as devtool upgrade updating PV when it's set within a recipe). (Bitbake rev: cc8b4c81bb589fb70774a0151f87a8d277f40f06) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/tinfoil.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index b50ed0553f..fb2ee4ad9c 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -635,17 +635,24 @@ class Tinfoil:
635 specify config_data then you cannot use a virtual 635 specify config_data then you cannot use a virtual
636 specification for fn. 636 specification for fn.
637 """ 637 """
638 if appends and appendlist == []: 638 if self.tracking:
639 appends = False 639 # Enable history tracking just for the parse operation
640 if config_data: 640 self.run_command('enableDataTracking')
641 dctr = bb.remotedata.RemoteDatastores.transmit_datastore(config_data) 641 try:
642 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist, dctr) 642 if appends and appendlist == []:
643 else: 643 appends = False
644 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist) 644 if config_data:
645 if dscon: 645 dctr = bb.remotedata.RemoteDatastores.transmit_datastore(config_data)
646 return self._reconvert_type(dscon, 'DataStoreConnectionHandle') 646 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist, dctr)
647 else: 647 else:
648 return None 648 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist)
649 if dscon:
650 return self._reconvert_type(dscon, 'DataStoreConnectionHandle')
651 else:
652 return None
653 finally:
654 if self.tracking:
655 self.run_command('disableDataTracking')
649 656
650 def build_file(self, buildfile, task, internal=True): 657 def build_file(self, buildfile, task, internal=True):
651 """ 658 """