Skip to contentSkip to conversation

gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF instead of +=

PATCH In review Khem Raj 2 participants 2 messages May 5, 2011 – May 9, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF instead of +=

Some recipes do not defined EXTRA_OECONF in such cases += drops the --enable|--disable-nls options. In another case where recipe defines EXTRA_OECONF instead of adding/appending to it then --enable|--disable-nls options are lost from EXTRA_OECONF

We define EXTRA_OECONF = "" in bitbake.conf so the variable exists always.

We use _append instead of += so the option is added at very end and not lost.

We only return empty gettext dependencies if its a target recipe
in case when USE_NLS is not set because the native/cross/nativesdk recipes still need the gettext dependencies

---
 meta/classes/gettext.bbclass |    6 +++---
 meta/conf/bitbake.conf       |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/gettext.bbclass +3 -3
index 6f79e5e..86b505b 100644
@@ -1,7 +1,7 @@
 def gettext_dependencies(d):
-    if d.getVar('USE_NLS', True) == 'no':
+    if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross'):
         return ""
-    if bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, True) and not oe.utils.inherits(d, 'cross-canadian'):
+    if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
         return ""
     return d.getVar('DEPENDS_GETTEXT', False)
 
@@ -14,4 +14,4 @@ def gettext_oeconf(d):
 DEPENDS_GETTEXT = "virtual/gettext gettext-native"
 
 BASEDEPENDS =+ "${@gettext_dependencies(d)}"
-EXTRA_OECONF += "${@gettext_oeconf(d)}"
+EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
meta/conf/bitbake.conf +1 -1
index a2b36bd..4a1bfa1 100644
@@ -395,7 +395,7 @@ export BUILD_NM = "${BUILD_PREFIX}nm"
 
 export MAKE = "make"
 EXTRA_OEMAKE = "-e MAKEFLAGS="
-
+EXTRA_OECONF = ""
 export LC_ALL = "C"
 
 ##################################################################
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 46 lines · Khem Raj

Some recipes do not defined EXTRA_OECONF in such cases += drops the --enable|--disable-nls options. In another case where recipe defines EXTRA_OECONF instead of adding/appending to it then --enable|--disable-nls options are lost from EXTRA_OECONF

We define EXTRA_OECONF = "" in bitbake.conf so the variable exists always.

We use _append instead of += so the option is added at very end and not lost.

We only return empty gettext dependencies if its a target recipe
in case when USE_NLS is not set because the native/cross/nativesdk recipes still need the gettext dependencies

---
  meta/classes/gettext.bbclass |    6 +++---
  meta/conf/bitbake.conf       |    2 +-
  2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/gettext.bbclass +3 -3
index 6f79e5e..86b505b 100644
@@ -1,7 +1,7 @@
  def gettext_dependencies(d):
-    if d.getVar('USE_NLS', True) == 'no':
+    if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross'):
          return ""
-    if bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, True) and not oe.utils.inherits(d, 'cross-canadian'):
+    if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
          return ""
      return d.getVar('DEPENDS_GETTEXT', False)
 
@@ -14,4 +14,4 @@ def gettext_oeconf(d):
  DEPENDS_GETTEXT = "virtual/gettext gettext-native"
 
  BASEDEPENDS =+ "${@gettext_dependencies(d)}"
-EXTRA_OECONF += "${@gettext_oeconf(d)}"
+EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
meta/conf/bitbake.conf +0 -0
index a2b36bd..4a1bfa1 100644

meta/conf/bitbake.conf export BUILD_NM = "${BUILD_PREFIX}nm" · line 401

Quoted 8 lines
meta/conf/bitbake.conf +1 -1
@@ -395,7 +395,7 @@ export BUILD_NM = "${BUILD_PREFIX}nm"
 
  export MAKE = "make"
  EXTRA_OEMAKE = "-e MAKEFLAGS="
-
+EXTRA_OECONF = ""
  export LC_ALL = "C"
 
  ##################################################################

Pulled into oe-core

Thanks
Sau!