Skip to contentSkip to conversation

layer.conf: Define DISTRO in layer.conf

GIT PULL In review Dongxiao Xu 3 participants 4 messages Mar 29, 2012

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 meta-yocto: Define DISTRO in layer.conf

In reply to Dongxiao Xu

Add the definition of DISTRO variable in meta-yocto/conf/layer.conf, and remove the corresponding definition in local.conf.sample.

As we know, if we source oe-init-build-env in Yocto project environment, we will have DISTRO="poky" set in local.conf by default, where the "poky" DISTRO comes from the meta-yocto layer. If user deletes meta-yocto layer from BBLAYERS in bblayers.conf, and then error will happen when bitbake parsing the local.conf, since it could not find where the "poky" DISTRO comes from.

Putting the DISTRO definition in layer.conf to avoid defining two related variables (DISTRO and BBLAYERS) in two separate configuration files (local.conf and bblayers.conf).

---
 meta-yocto/conf/distro/poky.conf  |    1 -
 meta-yocto/conf/layer.conf        |    1 +
 meta-yocto/conf/local.conf.sample |    4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)
meta-yocto/conf/distro/poky.conf +0 -1
index e4d7c1d..31c3de5 100644
@@ -1,4 +1,3 @@
-DISTRO = "poky"
 DISTRO_NAME = "Yocto (Built by Poky 6.0)"
 DISTRO_VERSION = "1.1+snapshot-${DATE}"
 SDK_VENDOR = "-pokysdk"
meta-yocto/conf/layer.conf +1 -0
index 7917962..b24d7e9 100644
@@ -9,3 +9,4 @@ BBFILE_COLLECTIONS += "yocto"
 BBFILE_PATTERN_yocto := "^${LAYERDIR}/"
 BBFILE_PRIORITY_yocto = "5"
 
+DISTRO ?= "poky"
meta-yocto/conf/local.conf.sample +2 -2
index 38507e3..eca1fbe 100644
@@ -99,12 +99,12 @@ MACHINE ??= "qemux86"
 # Ultimately when creating custom policy, people will likely end up subclassing 
 # these defaults.
 #
-DISTRO ?= "poky"
+# DISTRO = "poky"
 # As an example of a subclass there is a "bleeding" edge policy configuration
 # where many versions are set to the absolute latest code from the upstream 
 # source control systems. This is just mentioned here as an example, its not
 # useful to most new users.
-# DISTRO ?= "poky-bleeding"
+# DISTRO = "poky-bleeding"
 
 #
 # Package Management configuration
Signature · 1 line
1.7.4.1
#0 lore raw

Hi Richard,

This pull request is a change for defining DISTRO variable.

Please help to review and pull.

Thanks,
Dongxiao

The following changes since commit 331f7fa3f26322367c6e298efd282267bfdb6501:

ghostscript: Fix remaining CP_ prallel make races (2012-03-29 09:44:46 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix-yocto
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix-yocto

Dongxiao Xu (1):
meta-yocto: Define DISTRO in layer.conf

 meta-yocto/conf/distro/poky.conf  |    1 -
 meta-yocto/conf/layer.conf        |    1 +
 meta-yocto/conf/local.conf.sample |    4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH 1/1] meta-yocto: Define DISTRO in layer.conf

In reply to Dongxiao Xu
Quoted 14 lines · Dongxiao Xu

Add the definition of DISTRO variable in meta-yocto/conf/layer.conf, and remove the corresponding definition in local.conf.sample.

As we know, if we source oe-init-build-env in Yocto project environment, we will have DISTRO="poky" set in local.conf by default, where the "poky" DISTRO comes from the meta-yocto layer. If user deletes meta-yocto layer from BBLAYERS in bblayers.conf, and then error will happen when bitbake parsing the local.conf, since it could not find where the "poky" DISTRO comes from.

Putting the DISTRO definition in layer.conf to avoid defining two related variables (DISTRO and BBLAYERS) in two separate configuration files (local.conf and bblayers.conf).

Quoted 6 lines
---
 meta-yocto/conf/distro/poky.conf  |    1 -
 meta-yocto/conf/layer.conf        |    1 +
 meta-yocto/conf/local.conf.sample |    4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)

I'm afraid this is the wrong approach. The UI should simply not allow selection of a DISTRO option which is no longer available.

Setting DISTRO in local.conf is the way people expect to use the system and we can't change that.

Cheers,

Richard

#3 lore raw

Re: [PATCH 1/1] meta-yocto: Define DISTRO in layer.conf

Quoted 28 lines · Richard Purdie
Quoted 14 lines · Dongxiao Xu

Add the definition of DISTRO variable in meta-yocto/conf/layer.conf, and remove the corresponding definition in local.conf.sample.

As we know, if we source oe-init-build-env in Yocto project environment, we will have DISTRO="poky" set in local.conf by default, where the "poky" DISTRO comes from the meta-yocto layer. If user deletes meta-yocto layer from BBLAYERS in bblayers.conf, and then error will happen when bitbake parsing the local.conf, since it could not find where the "poky" DISTRO comes from.

Putting the DISTRO definition in layer.conf to avoid defining two related variables (DISTRO and BBLAYERS) in two separate configuration files (local.conf and bblayers.conf).

Quoted 6 lines

---
 meta-yocto/conf/distro/poky.conf  |    1 -
 meta-yocto/conf/layer.conf        |    1 +
 meta-yocto/conf/local.conf.sample |    4 ++--

 3 files changed, 3 insertions(+), 3 deletions(-)

I'm afraid this is the wrong approach. The UI should simply not allow selection of a DISTRO option which is no longer available.

Setting DISTRO in local.conf is the way people expect to use the system and we can't change that.

Quoted 8 lines

Cheers,

Richard

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Agreed. It's important that DISTRO remains in local.conf. Remember, also, that local.conf.sample is only a suggestion as to how to configure your build. The real configuration is in build/conf/local.conf, and that is meant to be changed freely.

Carl Simonson
[email protected]