public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] bitbake.conf,lib/configfragments: Use a new dedicated toolcfg.conf file
@ 2025-10-06 13:21 Richard Purdie
  2025-10-06 13:48 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2025-10-06 13:21 UTC (permalink / raw)
  To: openembedded-core

Rather than using auto.conf which already has established use in CI, or
local.conf which users expect to own/control, start writing "tooling"
controlled settings to a toolcfg.conf.

This frees CI to handle auto.conf as it wants, but avoids the tooling
breaking users local.conf files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/bitbake.conf                    | 1 +
 meta/lib/bbconfigbuild/configfragments.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index eebefc48406..8d1ea5491de 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -813,6 +813,7 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
 require conf/abi_version.conf
 include conf/site.conf
 include conf/auto.conf
+include conf/toolcfg.conf
 include conf/local.conf
 
 OE_FRAGMENTS_PREFIX ?= "conf/fragments"
diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py
index 34c6a3b4bcc..21baedc9a42 100644
--- a/meta/lib/bbconfigbuild/configfragments.py
+++ b/meta/lib/bbconfigbuild/configfragments.py
@@ -115,7 +115,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
     def create_conf(self, confpath):
         if not os.path.exists(confpath):
             with open(confpath, 'w') as f:
-                f.write('')
+                f.write('# Automated config file controlled by tools\n')
         with open(confpath, 'r') as f:
             lines = f.read()
         if "OE_FRAGMENTS += " not in lines:
@@ -184,7 +184,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
             print("All fragments removed from {}.".format(args.confpath))
 
     def register_commands(self, sp):
-        default_confpath = os.path.join(os.environ["BBPATH"], "conf/auto.conf")
+        default_confpath = os.path.join(os.environ["BBPATH"], "conf/toolcfg.conf")
 
         parser_list_fragments = self.add_command(sp, 'list-fragments', self.do_list_fragments, parserecipes=False)
         parser_list_fragments.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath))


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] bitbake.conf,lib/configfragments: Use a new dedicated toolcfg.conf file
  2025-10-06 13:21 [PATCH] bitbake.conf,lib/configfragments: Use a new dedicated toolcfg.conf file Richard Purdie
@ 2025-10-06 13:48 ` Alexander Kanavin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2025-10-06 13:48 UTC (permalink / raw)
  To: richard.purdie, Antonin Godard; +Cc: openembedded-core

I sent a ref-manual update to docs@ list that reflects this change.

Alex

On Mon, 6 Oct 2025 at 15:21, Richard Purdie via lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>
> Rather than using auto.conf which already has established use in CI, or
> local.conf which users expect to own/control, start writing "tooling"
> controlled settings to a toolcfg.conf.
>
> This frees CI to handle auto.conf as it wants, but avoids the tooling
> breaking users local.conf files.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/conf/bitbake.conf                    | 1 +
>  meta/lib/bbconfigbuild/configfragments.py | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index eebefc48406..8d1ea5491de 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -813,6 +813,7 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
>  require conf/abi_version.conf
>  include conf/site.conf
>  include conf/auto.conf
> +include conf/toolcfg.conf
>  include conf/local.conf
>
>  OE_FRAGMENTS_PREFIX ?= "conf/fragments"
> diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py
> index 34c6a3b4bcc..21baedc9a42 100644
> --- a/meta/lib/bbconfigbuild/configfragments.py
> +++ b/meta/lib/bbconfigbuild/configfragments.py
> @@ -115,7 +115,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
>      def create_conf(self, confpath):
>          if not os.path.exists(confpath):
>              with open(confpath, 'w') as f:
> -                f.write('')
> +                f.write('# Automated config file controlled by tools\n')
>          with open(confpath, 'r') as f:
>              lines = f.read()
>          if "OE_FRAGMENTS += " not in lines:
> @@ -184,7 +184,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
>              print("All fragments removed from {}.".format(args.confpath))
>
>      def register_commands(self, sp):
> -        default_confpath = os.path.join(os.environ["BBPATH"], "conf/auto.conf")
> +        default_confpath = os.path.join(os.environ["BBPATH"], "conf/toolcfg.conf")
>
>          parser_list_fragments = self.add_command(sp, 'list-fragments', self.do_list_fragments, parserecipes=False)
>          parser_list_fragments.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath))
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#224485): https://lists.openembedded.org/g/openembedded-core/message/224485
> Mute This Topic: https://lists.openembedded.org/mt/115616756/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-06 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 13:21 [PATCH] bitbake.conf,lib/configfragments: Use a new dedicated toolcfg.conf file Richard Purdie
2025-10-06 13:48 ` [OE-core] " Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox