diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-09-03 17:06:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-05 10:14:25 +0100 |
commit | 1894522f357fdf0b6adb2dcc14f12817628596bd (patch) | |
tree | f2de3f15d83d36d2423cef72cded8a222093bff5 /bitbake | |
parent | dfbb54649276cf621e383a9939e7286e876c0ac8 (diff) | |
download | poky-1894522f357fdf0b6adb2dcc14f12817628596bd.tar.gz |
bitbake: tinfoil: add a means of enabling variable history tracking
Unfortunately it seems like the external use of the cooker
enableDataTracking() function broke at some point since the code that
reads it now runs within BBCooker's constructor. Since this now has to
be done early, add a parameter to Tinfoil's constructor to allow
enabling variable history tracking.
Fixes [YOCTO #6676].
(Bitbake rev: a9439b136f55f3f0e80ff053cd3b159da69ba362)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 751a2d7a23..6bcbd47ab3 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -25,12 +25,12 @@ import bb.cache | |||
25 | import bb.cooker | 25 | import bb.cooker |
26 | import bb.providers | 26 | import bb.providers |
27 | import bb.utils | 27 | import bb.utils |
28 | from bb.cooker import state, BBCooker | 28 | from bb.cooker import state, BBCooker, CookerFeatures |
29 | from bb.cookerdata import CookerConfiguration, ConfigParameters | 29 | from bb.cookerdata import CookerConfiguration, ConfigParameters |
30 | import bb.fetch2 | 30 | import bb.fetch2 |
31 | 31 | ||
32 | class Tinfoil: | 32 | class Tinfoil: |
33 | def __init__(self, output=sys.stdout): | 33 | def __init__(self, output=sys.stdout, tracking=False): |
34 | # Needed to avoid deprecation warnings with python 2.6 | 34 | # Needed to avoid deprecation warnings with python 2.6 |
35 | warnings.filterwarnings("ignore", category=DeprecationWarning) | 35 | warnings.filterwarnings("ignore", category=DeprecationWarning) |
36 | 36 | ||
@@ -48,7 +48,10 @@ class Tinfoil: | |||
48 | configparams = TinfoilConfigParameters(parse_only=True) | 48 | configparams = TinfoilConfigParameters(parse_only=True) |
49 | self.config.setConfigParameters(configparams) | 49 | self.config.setConfigParameters(configparams) |
50 | self.config.setServerRegIdleCallback(self.register_idle_function) | 50 | self.config.setServerRegIdleCallback(self.register_idle_function) |
51 | self.cooker = BBCooker(self.config) | 51 | features = [] |
52 | if tracking: | ||
53 | features.append(CookerFeatures.BASEDATASTORE_TRACKING) | ||
54 | self.cooker = BBCooker(self.config, features) | ||
52 | self.config_data = self.cooker.data | 55 | self.config_data = self.cooker.data |
53 | bb.providers.logger.setLevel(logging.ERROR) | 56 | bb.providers.logger.setLevel(logging.ERROR) |
54 | self.cooker_data = None | 57 | self.cooker_data = None |