Skip to contentSkip to conversation

bbconfigbuild/configfragments.py: set BBPATH in standalone datastore

PATCH New Alexander Kanavin 1 participant 1 message Jan 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bbconfigbuild/configfragments.py: set BBPATH in standalone datastore

From: Alexander Kanavin <[email protected]>

Otherwise fragments with 'require' statements will not parse, as the parser will not be able to find files referred to by those statements.

Add such a statement to the test fragment so that the scenario is tested.

[YOCTO #15707]

---
 meta-selftest/conf/fragments/test-fragment.conf | 2 ++
 meta/lib/bbconfigbuild/configfragments.py       | 1 +
 2 files changed, 3 insertions(+)
meta-selftest/conf/fragments/test-fragment.conf +2 -0
index 4c1d2409453..82dd3537676 100644
@@ -1,3 +1,5 @@
 BB_CONF_FRAGMENT_SUMMARY = "This is a configuration fragment intended for testing in oe-selftest context"
 BB_CONF_FRAGMENT_DESCRIPTION = "It defines a variable that can be checked inside the test."
+
 SELFTEST_FRAGMENT_VARIABLE = "somevalue"
+require conf/multilib.conf
meta/lib/bbconfigbuild/configfragments.py +1 -0
index 30cc5ece079..c515a0151a4 100644
@@ -23,6 +23,7 @@ def plugin_init(plugins):
 class ConfigFragmentsPlugin(LayerPlugin):
     def get_fragment_info(self, path, name):
         d = bb.data.init()
+        d.setVar('BBPATH', self.tinfoil.config_data.getVar('BBPATH'))
         bb.parse.handle(path, d, True)
         summary = d.getVar('BB_CONF_FRAGMENT_SUMMARY')
         description = d.getVar('BB_CONF_FRAGMENT_DESCRIPTION')
Signature · 1 line
2.39.5