@@ -23,6 +23,7 @@ topdir = os.path.dirname(bindir)
sys.path[0:0] = [os.path.join(topdir, 'lib')]
import bb.tinfoil
+import bb.cooker
import bb.msg
logger = bb.msg.logger_create(toolname, sys.stdout)
@@ -64,7 +65,11 @@ def main():
if global_args.force > 1:
bbpaths = []
else:
- tinfoil.prepare(True)
+ if toolname == "bitbake-config-build":
+ extra_features = [bb.cooker.CookerFeatures.SKIP_FRAGMENTS]
+ else:
+ extra_features = None
+ tinfoil.prepare(True, extra_features=extra_features)
bbpaths = tinfoil.config_data.getVar('BBPATH').split(':')
for path in ([topdir] + bbpaths):
@@ -79,7 +79,7 @@ class SkippedPackage:
class CookerFeatures(object):
- _feature_list = [HOB_EXTRA_CACHES, BASEDATASTORE_TRACKING, SEND_SANITYEVENTS, RECIPE_SIGGEN_INFO] = list(range(4))
+ _feature_list = [HOB_EXTRA_CACHES, BASEDATASTORE_TRACKING, SEND_SANITYEVENTS, RECIPE_SIGGEN_INFO, SKIP_FRAGMENTS] = list(range(5))
def __init__(self):
self._features=set()
@@ -278,6 +278,9 @@ class BBCooker:
logger.critical("Unable to import extra RecipeInfo '%s' from '%s': %s" % (cache_name, module_name, exc))
raise bb.BBHandledException()
+ if CookerFeatures.SKIP_FRAGMENTS in self.featureset:
+ self.skipFragments()
+
self.databuilder = bb.cookerdata.CookerDataBuilder(self.configuration, False)
self.databuilder.parseBaseConfiguration()
self.data = self.databuilder.data
@@ -355,6 +358,9 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si
if hasattr(self, "data"):
self.data.disableTracking()
+ def skipFragments(self):
+ self.configuration.skip_fragments = True
+
def revalidateCaches(self):
bb.parse.clear_cache()
@@ -137,6 +137,7 @@ class CookerConfiguration(object):
self.build_verbose_stdout = False
self.dry_run = False
self.tracking = False
+ self.skip_fragments = False
self.writeeventlog = False
self.limited_deps = False
self.runall = []
@@ -226,12 +227,15 @@ class CookerDataBuilder(object):
self.prefiles = cookercfg.prefile
self.postfiles = cookercfg.postfile
self.tracking = cookercfg.tracking
+ self.skip_fragments = cookercfg.skip_fragments
bb.utils.set_context(bb.utils.clean_context())
bb.event.set_class_handlers(bb.event.clean_class_handlers())
self.basedata = bb.data.init()
if self.tracking:
self.basedata.enableTracking()
+ if self.skip_fragments:
+ self.basedata.setVar("_BB_SKIP_FRAGMENTS", "1")
# Keep a datastore of the initial environment variables and their
# values from when BitBake was launched to enable child processes
@@ -351,6 +351,9 @@ class AddFragmentsNode(AstNode):
self.builtin_fragments_variable = builtin_fragments_variable
def eval(self, data):
+ if data.getVar('_BB_SKIP_FRAGMENTS') == '1':
+ return
+
# No need to use mark_dependency since we would only match a fragment
# from a specific layer and there can only be a single layer with a
# given namespace.