bitbake.conf: Include fragments before local.conf
PATCH 1/1 bitbake.conf: Include fragments before local.conf
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +2 -1
@@ -826,12 +826,13 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARS +include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}" != "" else ""} include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf
Signature · 1 line
2.47.1
We have discussed this before. With this change, users will no longer be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Alex
Quoted 46 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/bitbake.conf +0
-0@@ -826,12 +826,13 @@ FILESOVERRIDES ="${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
requireconf/abi_version.conf
includeconf/site.conf
includeconf/auto.conf
-includeconf/local.conf
OE_FRAGMENTS_PREFIX?= "conf/fragments"OE_FRAGMENTS_METADATA_VARS?= "BB_CONF_FRAGMENT_SUMMARYBB_CONF_FRAGMENT_DESCRIPTION"
addfragments ${OE_FRAGMENTS_PREFIX}OE_FRAGMENTSOE_FRAGMENTS_METADATA_VARSmeta/conf/bitbake.conf +2
-0+include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}"!= "" else ""}
includeconf/machine/${MACHINE}.conf
includeconf/machine-sdk/${SDKMACHINE}.conf
--
2.47.1
Quoted 2 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
Quoted 46 lines
Alex
Quoted 42 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/bitbake.conf +2
-2@@ -826,12 +826,13 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARS +include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}" != "" else ""} include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf --2.47.1
One could conceivably want to ship a local.conf.sample template with fragments already enabled in it, or hand edit local.conf to enable something via fragment. We can’t force users to use fragment tooling.
It would be equally surprising to find out that setting fragments this way doesn’t actually have any effect.
I understand your argument, it’s just that we’ve taken the least worst option. Consider fragments as extensions of distro and machine configurations - both come after local.conf and can’t be tweaked from it.
Alex
Quoted 70 lines · Joshua Watt
Quoted 2 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer be
able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
Quoted 24 lines
Alex
Quoted 20 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Quoted 5 lines
meta/conf/bitbake.conf FILESOVERRIDES =
Quoted 5 lines
meta/conf/bitbake.conf +0
-0@@ -826,12 +826,13 @@ FILESOVERRIDES ="${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 7 lines
meta/conf/bitbake.conf FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 7 lines
meta/conf/bitbake.conf +0
-1require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY
BB_CONF_FRAGMENT_DESCRIPTION"Quoted 1 line
meta/conf/bitbake.conf FILESOVERRIDES = · line 832
Quoted 1 line
meta/conf/bitbake.conf +0
-0addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS
OE_FRAGMENTS_METADATA_VARSQuoted 4 lines
meta/conf/bitbake.conf FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 4 lines
meta/conf/bitbake.conf +2
-0+include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if"${BB_CURRENT_MC}" != "" else ""}
Quoted 5 lines
Quoted 5 lines
meta/conf/bitbake.conf +0
-1include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf --2.47.1
Quoted 6 lines · Alexander Kanavin
One could conceivably want to ship a local.conf.sample template with fragments already enabled in it, or hand edit local.conf to enable something via fragment. We can’t force users to use fragment tooling.
It would be equally surprising to find out that setting fragments this way doesn’t actually have any effect.
I understand your argument, it’s just that we’ve taken the least worst option. Consider fragments as extensions of distro and machine configurations - both come after local.conf and can’t be tweaked from it.
That's an expected design choice; we already have MACHINE and DISTRO which work pretty well, so I though config fragments were intended to standardize the part that is more difficult e.g. setting configuration files from source control roundabout the time of auto.conf, since that is where all the different mechanisms that have cropped up do.
Quoted 66 lines
Alex
Quoted 62 lines · Joshua Watt
Quoted 2 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
Quoted 46 lines
Alex
Quoted 42 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/bitbake.conf +2
-2@@ -826,12 +826,13 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARS +include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}" != "" else ""} include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf --2.47.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Btw the other option for overriding fragments would be to use direct require statement with a path to them in local.conf, followed by tweaks. It’s not too horrible. And using a fragment variable can then be seen as ‘immutable’ fragment enabling which could be beneficial precisely because users can’t mess with it.
Alex
Quoted 97 lines · Alexander Kanavin via lists.openembedded.org
One could conceivably want to ship a local.conf.sample template with fragments already enabled in it, or hand edit local.conf to enable something via fragment. We can’t force users to use fragment tooling.
It would be equally surprising to find out that setting fragments this way doesn’t actually have any effect.
I understand your argument, it’s just that we’ve taken the least worst option. Consider fragments as extensions of distro and machine configurations - both come after local.conf and can’t be tweaked from it.
Alex
Quoted 56 lines · Joshua Watt
Quoted 2 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer
be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
Quoted 24 lines
Alex
Quoted 20 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Quoted 5 lines
meta/conf/bitbake.conf FILESOVERRIDES =
Quoted 5 lines
meta/conf/bitbake.conf +0
-0@@ -826,12 +826,13 @@ FILESOVERRIDES ="${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 7 lines
meta/conf/bitbake.conf FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 7 lines
meta/conf/bitbake.conf +0
-1require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARYQuoted 14 lines
BB_CONF_FRAGMENT_DESCRIPTION"Quoted 1 line
meta/conf/bitbake.conf FILESOVERRIDES = · line 832
Quoted 1 line
meta/conf/bitbake.conf +0
-0addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS
OE_FRAGMENTS_METADATA_VARSQuoted 4 lines
meta/conf/bitbake.conf FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE
Quoted 4 lines
meta/conf/bitbake.conf +2
-0+include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if"${BB_CURRENT_MC}" != "" else ""}
Quoted 5 lines
Quoted 5 lines
meta/conf/bitbake.conf +0
-1include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf --2.47.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#210881):
https://lists.openembedded.org/g/openembedded-core/message/210881
Mute This Topic: https://lists.openembedded.org/mt/111021218/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 2 lines · Alexander Kanavin
Btw the other option for overriding fragments would be to use direct require statement with a path to them in local.conf, followed by tweaks. It’s not too horrible. And using a fragment variable can then be seen as ‘immutable’ fragment enabling which could be beneficial precisely because users can’t mess with it.
Sure, and I've done that before. I assumed this was intended to replace that behavior with a nicer UI, but apparently that was not the goal?
Quoted 86 lines
Alex
Quoted 82 lines · Alexander Kanavin via lists.openembedded.org
One could conceivably want to ship a local.conf.sample template with fragments already enabled in it, or hand edit local.conf to enable something via fragment. We can’t force users to use fragment tooling.
It would be equally surprising to find out that setting fragments this way doesn’t actually have any effect.
I understand your argument, it’s just that we’ve taken the least worst option. Consider fragments as extensions of distro and machine configurations - both come after local.conf and can’t be tweaked from it.
Alex
Quoted 54 lines · Joshua Watt
Quoted 2 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
Quoted 38 lines
Alex
Quoted 34 lines · Joshua Watt
Per some usability assessment and offline discussion, one of the useful use cases of config fragments is that they allow the "default" configuration for some device to be committed to source control and easily selected and used by the end users. However, when doing this, there is still the desire that the user can "override" the provided fragments for their local builds in local.conf
As a practical example, the configuration for a product can be capture as a config fragment, and an empty local.conf will reproduce the standard build for the product. If the user wants to make "tweaks" to the standard build, they can do so in local.conf
As such, move the config fragments to be loaded before local.conf
Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/bitbake.conf +0
-1@@ -826,12 +826,13 @@ FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDE require conf/abi_version.conf include conf/site.conf include conf/auto.conf -include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARSQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/conf/bitbake.conf +2
-1+include conf/local.conf + require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}" != "" else ""} include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf --2.47.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210881): https://lists.openembedded.org/g/openembedded-core/message/210881
Mute This Topic: https://lists.openembedded.org/mt/111021218/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 16 lines · Joshua Watt via lists.openembedded.org
Quoted 5 lines · Alexander Kanavin
We have discussed this before. With this change, users will no longer be able to set fragments from local.conf, as addfragments would be processed before that file. You need to use ?= in fragments instead for things that are meant to be overridden.
Is there need to set fragments from local.conf? IMHO, not being able to override a fragment in local.conf is "surprising" behavior, and I don't think it's going to necessarily be possible to alway use ?= in a fragment; all of the ad-hoc "fragment" management systems I've used before have allowed local.conf to be the final source of truth, so it will also make migration to use config fragments harder if they don't follow suite.
Quoted 2 lines
Anyway, maybe some other users of "fragment" like systems can chime in if they have an opinion.
FWIW, setting fragments in local.conf is exactly how I first tried to use them and I can see users doing that :/
Cheers,
Richard