]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
meta/lib/bblayers/buildconf.py: add support for configuration summaries
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 16 Feb 2024 11:52:19 +0000 (12:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Feb 2024 11:47:04 +0000 (11:47 +0000)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/bblayers/buildconf.py
meta/lib/oeqa/selftest/cases/bblayers.py

index 87a5e5a55bc3583543e5c66432871757d8161767..722cf0723c1fdb0bc8186f508548e94ff9ce8ced 100644 (file)
@@ -20,7 +20,10 @@ def plugin_init(plugins):
     return BuildConfPlugin()
 
 class BuildConfPlugin(LayerPlugin):
-    notes_fixme = """FIXME: Please place here the description of this build configuration.
+    notes_fixme = """FIXME: Please place here the detailed instructions for using this build configuration.
+They will be shown to the users when they set up their builds via TEMPLATECONF.
+"""
+    summary_fixme = """FIXME: Please place here the short summary of what this build configuration is for.
 It will be shown to the users when they set up their builds via TEMPLATECONF.
 """
 
@@ -41,14 +44,17 @@ It will be shown to the users when they set up their builds via TEMPLATECONF.
                     bblayers_data = bblayers_data.replace(abspath, "##OEROOT##/" + relpath)
                 dest.write(bblayers_data)
 
+        with open(os.path.join(destdir, "conf-summary.txt"), 'w') as dest:
+            dest.write(self.summary_fixme)
         with open(os.path.join(destdir, "conf-notes.txt"), 'w') as dest:
             dest.write(self.notes_fixme)
 
         logger.info("""Configuration template placed into {}
-Please review the files in there, and particularly provide a configuration description in {}
+Please review the files in there, and particularly provide a configuration summary in {}
+and notes in {}
 You can try out the configuration with
 TEMPLATECONF={} . {}/oe-init-build-env build-try-{}"""
-.format(destdir, os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename))
+.format(destdir, os.path.join(destdir, "conf-summary.txt"), os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename))
 
     def do_save_build_conf(self, args):
         """ Save the currently active build configuration (conf/local.conf, conf/bblayers.conf) as a template into a layer.\n This template can later be used for setting up builds via TEMPLATECONF. """
index 34363cd7916330148a9367231ac8f707402ea926..f2460cb451b592a2ebf6143c0a25d333f4d548b3 100644 (file)
@@ -121,7 +121,7 @@ class BitbakeLayers(OESelftestTestCase):
         self.assertEqual(bb_vars['BBFILE_PRIORITY_%s' % layername], str(priority), 'BBFILE_PRIORITY_%s != %d' % (layername, priority))
 
         result = runCmd('bitbake-layers save-build-conf {} {}'.format(layerpath, "buildconf-1"))
-        for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-notes.txt'):
+        for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-summary.txt', 'conf-notes.txt'):
             fullpath = os.path.join(layerpath, "conf", "templates", "buildconf-1", f)
             self.assertTrue(os.path.exists(fullpath), "Template configuration file {} not found".format(fullpath))