Patchwork [01/11] bitbake.conf: Add weak definition for USE_NLS

login
register
mail settings
Submitter Khem Raj
Date June 28, 2012, 9:36 p.m.
Message ID <638231d75b991a3be5c9aed5add4c56e66f79fe0.1340919157.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/30835/
State New
Headers show

Comments

Khem Raj - June 28, 2012, 9:36 p.m.
USE_NLS is generally defined for uclibc based system builds
and generally its defined to 'no' there. However this variable
does not exist at all for eglibc/glibc distributions. This
patch adds a weak definition to 'yes' on eglibc based system
builds. This will ease out some of the cryptic contructs we
have to define certain options based on USE_NLS and also
checking got uclibc at the same time to avoid pythong exceptions
when its not defined.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/bitbake.conf                     |    1 +
 meta/conf/distro/include/tclibc-eglibc.inc |    2 ++
 2 files changed, 3 insertions(+)
Richard Purdie - June 29, 2012, 11:43 a.m.
On Thu, 2012-06-28 at 14:36 -0700, Khem Raj wrote:
> USE_NLS is generally defined for uclibc based system builds
> and generally its defined to 'no' there. However this variable
> does not exist at all for eglibc/glibc distributions. This
> patch adds a weak definition to 'yes' on eglibc based system
> builds. This will ease out some of the cryptic contructs we
> have to define certain options based on USE_NLS and also
> checking got uclibc at the same time to avoid pythong exceptions
> when its not defined.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/conf/bitbake.conf                     |    1 +
>  meta/conf/distro/include/tclibc-eglibc.inc |    2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 9b26580..9377ee6 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -98,6 +98,7 @@ TUNE_ASARGS ??= ""
>  TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
>  LIBCEXTENSION ??= ""
>  ABIEXTENSION ??= ""
> +USE_NLS ??= "yes"
>  
>  TARGET_ARCH = "${TUNE_ARCH}"
>  TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
> diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
> index 4f5607f..e2ca4e8 100644
> --- a/meta/conf/distro/include/tclibc-eglibc.inc
> +++ b/meta/conf/distro/include/tclibc-eglibc.inc
> @@ -32,6 +32,8 @@ LIBC_LOCALE_DEPENDENCIES = "\
>  	eglibc-gconv-iso8859-1 \
>  	eglibc-gconv-iso8859-15"
>  
> +USE_NLS ?= "yes"
> +
>  def get_libc_locales_dependencies(d):
>      if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
>          return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''

This second change is just pointless noise now :)

Cheers,

Richard

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9b26580..9377ee6 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -98,6 +98,7 @@  TUNE_ASARGS ??= ""
 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
 LIBCEXTENSION ??= ""
 ABIEXTENSION ??= ""
+USE_NLS ??= "yes"
 
 TARGET_ARCH = "${TUNE_ARCH}"
 TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
index 4f5607f..e2ca4e8 100644
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ b/meta/conf/distro/include/tclibc-eglibc.inc
@@ -32,6 +32,8 @@  LIBC_LOCALE_DEPENDENCIES = "\
 	eglibc-gconv-iso8859-1 \
 	eglibc-gconv-iso8859-15"
 
+USE_NLS ?= "yes"
+
 def get_libc_locales_dependencies(d):
     if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
         return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''