Patchwork [38/52] insane.bbclass: Checking for NLS too when checking gettext dependency

login
register
mail settings
Submitter Saul Wold
Date April 27, 2011, 7:29 a.m.
Message ID <ee54f2998bde83872fa1f48c4b1f55f7dfc5774b.1303889119.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/2965/
State New, archived
Headers show

Comments

Saul Wold - April 27, 2011, 7:29 a.m.
From: Khem Raj <raj.khem@gmail.com>

Checking for gettext is not needed when --disable-nls is used

Let user know what variant of gettext is missing e.g. gettext-native,
gettext-nativesdk etc, reveals a bit more for user

Check for virtual/gettext

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/insane.bbclass |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
Richard Purdie - April 28, 2011, 9:02 a.m.
On Wed, 2011-04-27 at 00:29 -0700, Saul Wold wrote:
> From: Khem Raj <raj.khem@gmail.com>
> 
> Checking for gettext is not needed when --disable-nls is used
> 
> Let user know what variant of gettext is missing e.g. gettext-native,
> gettext-nativesdk etc, reveals a bit more for user
> 
> Check for virtual/gettext
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/insane.bbclass |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)

This depends on the gettext.bbclass changes so I didn't take this
either.

Cheers,

Richard

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 98acf7f..742be5e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -578,20 +578,21 @@  Rerun configure task after fixing this. The path was '%s'""" % root)
         if "configure.in" in files:
             configs.append(os.path.join(root, "configure.in"))
 
-    if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True):
+    cnf = bb.data.getVar('EXTRA_OECONF', d, True) or ""
+    if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf:
        if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
           gt = "gettext-native"
        elif bb.data.inherits_class('cross-canadian', d):
           gt = "gettext-nativesdk"
        else:
-          gt = "gettext"
+          gt = "virtual/gettext"
        deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "")
        if gt not in deps:
           for config in configs:
               gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
               if os.system(gnu) == 0:
-                 bb.fatal("""Gettext required but not in DEPENDS for file %s.
-Missing inherit gettext?""" % config)
+                 bb.fatal("""%s required but not in DEPENDS for file %s.
+Missing inherit gettext?""" % (gt, config))
 
     if not package_qa_check_license(workdir, d):
         bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")