diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 24 |
1 files changed, 2 insertions, 22 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! |