Patchwork [1/2] tclibc-eglibc.inc: make locale packages dependency conditional

login
register
mail settings
Submitter Nitin A Kamble
Date April 9, 2012, 10:27 p.m.
Message ID <7ad20802c01b5cea250e0fc9d31f603674c4b4fa.1334010389.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/25469/
State New
Headers show

Comments

Nitin A Kamble - April 9, 2012, 10:27 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

Only add locale package dependencies if the eglibc is configured
with locale support.
  This avoids dependencies issues for distros such as poky-tiny

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/conf/distro/include/tclibc-eglibc.inc |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

Patch

diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
index 8b8a214..aed82d1 100644
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ b/meta/conf/distro/include/tclibc-eglibc.inc
@@ -23,10 +23,19 @@  LIBC_DEPENDENCIES = "libsegfault \
     		     eglibc-dev \
     		     eglibc-utils \
     		     eglibc-thread-db \
-    		     eglibc-localedata-i18n \
-    		     eglibc-gconv-ibm850 \
-    		     eglibc-gconv-cp1252 \
-    		     eglibc-gconv-iso8859-1 \
-    		     eglibc-gconv-iso8859-15 \
-    		     locale-base-en-us \
-    		     locale-base-en-gb "
+		     ${@get_libc_locales_dependencies(d)}"
+
+LIBC_LOCALE_DEPENDENCIES = "\
+	eglibc-localedata-i18n \
+	eglibc-gconv-ibm850 \
+	eglibc-gconv-cp1252 \
+	eglibc-gconv-iso8859-1 \
+	eglibc-gconv-iso8859-15 \
+	locale-base-en-us \
+	locale-base-en-gb"
+
+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 ''
+    else:
+        return ''