summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-05-28 12:49:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 10:20:32 +0100
commite6a1b33bc87ea205b5d4ea8cf29159fc6ddd8853 (patch)
treef05d56f8b41b1c36fcea581cc2adcbfd5da0e49b /bitbake/lib
parente09a15927714362866297c3a7a2992506ccf4f75 (diff)
downloadpoky-e6a1b33bc87ea205b5d4ea8cf29159fc6ddd8853.tar.gz
bitbake: bitbake: move extra cache collection out of cooker
The collection of the extra caching data should not be performed by the cooker, but supplied to it. This patch will also streamline the code for launching servers without a UI attached. Based on a patch by Bogdan Marinescu <bogdan.a.marinescu@intel.com> (Bitbake rev: f0b54280a6bce522508e4741e5f507bc284113a8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py24
-rw-r--r--bitbake/lib/bb/cookerdata.py1
2 files changed, 2 insertions, 23 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2ae3e9d239..2edfa9faeb 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -94,28 +94,8 @@ class BBCooker:
94 self.configuration = configuration 94 self.configuration = configuration
95 95
96 self.caches_array = [] 96 self.caches_array = []
97 # Currently, only Image Creator hob ui needs extra cache. 97
98 # So, we save Extra Cache class name and container file 98 caches_name_array = ['bb.cache:CoreRecipeInfo'] + configuration.extra_caches
99 # information into a extraCaches field in hob UI.
100 # TODO: In future, bin/bitbake should pass information into cooker,
101 # instead of getting information from configuration.ui. Also, some
102 # UI start up issues need to be addressed at the same time.
103 caches_name_array = ['bb.cache:CoreRecipeInfo']
104 if configuration.ui:
105 try:
106 module = __import__('bb.ui', fromlist=[configuration.ui])
107 name_array = (getattr(module, configuration.ui)).extraCaches
108 for recipeInfoName in name_array:
109 caches_name_array.append(recipeInfoName)
110 except ImportError as exc:
111 # bb.ui.XXX is not defined and imported. It's an error!
112 logger.critical("Unable to import '%s' interface from bb.ui: %s" % (configuration.ui, exc))
113 sys.exit("FATAL: Failed to import '%s' interface." % configuration.ui)
114 except AttributeError:
115 # This is not an error. If the field is not defined in the ui,
116 # this interface might need no extra cache fields, so
117 # just skip this error!
118 logger.debug(2, "UI '%s' does not require extra cache!" % (configuration.ui))
119 99
120 # At least CoreRecipeInfo will be loaded, so caches_array will never be empty! 100 # At least CoreRecipeInfo will be loaded, so caches_array will never be empty!
121 # This is the entry point, no further check needed! 101 # This is the entry point, no further check needed!
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 11063b4af2..cbaa0bed47 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -119,7 +119,6 @@ class CookerConfiguration(object):
119 self.cmd = None 119 self.cmd = None
120 self.abort = True 120 self.abort = True
121 self.force = False 121 self.force = False
122 self.ui = None
123 self.profile = False 122 self.profile = False
124 self.nosetscene = False 123 self.nosetscene = False
125 self.invalidate_stamp = False 124 self.invalidate_stamp = False