Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Cody P Schafer <dev@codyps.com>
To: openembedded-devel@lists.openembedded.org
Cc: Otavio Salvador <otavio@ossystems.com.br>,
	Mario Domenech Goulart <mario@ossystems.com.br>
Subject: [meta-java][PATCH] move from bb.data.getVar(x, d, 1) to d.getVar(x, True)
Date: Tue, 29 Nov 2016 11:48:17 -0500	[thread overview]
Message-ID: <20161129164817.16671-1-dev@codyps.com> (raw)

bb.data.getVar was removed, need to use the modern mechanism.

Signed-off-by: Cody P Schafer <dev@codyps.com>
---
 classes/java-library.bbclass              |  4 ++--
 recipes-core/icedtea/icedtea7-native.inc  |  2 +-
 recipes-core/openjdk/openjdk-7-common.inc |  2 +-
 recipes-core/openjdk/openjdk-8-common.inc | 10 +++++-----
 recipes-core/openjdk/openjdk-common.inc   |  6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
index 144cd2f..58d5a40 100644
--- a/classes/java-library.bbclass
+++ b/classes/java-library.bbclass
@@ -23,8 +23,8 @@ def java_package_name(d):
   pre=""
   post=""
 
-  bpn = bb.data.getVar('BPN', d, 1)
-  ml = bb.data.getVar('MLPREFIX', d, 1)
+  bpn = d.getVar('BPN', True)
+  ml = d.getVar('MLPREFIX', True)
   if not bpn.startswith("lib"):
     pre='lib'
 
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index 727998c..a8428dc 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -211,7 +211,7 @@ do_compile() {
 def jdk_arch(d):
         import bb
 
-        target_arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1)
+        target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
 
         if target_arch in ['i386', 'i486', 'i586', 'i686']:
             return "x86"
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc
index c491195..1ac3154 100644
--- a/recipes-core/openjdk/openjdk-7-common.inc
+++ b/recipes-core/openjdk/openjdk-7-common.inc
@@ -55,7 +55,7 @@ export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}"
 export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2"
 export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}"
 export CACAO_CONFIGURE_ARGS = " \
-    ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']}"
+    ${@['','--enable-softfloat'][d.getVar('TARGET_FPU', True) == 'soft']}"
 
 JAVA_HOME[unexport] = "1"
 
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index c339985..def779d 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -171,7 +171,7 @@ do_configure_prepend() {
 def get_llvm_configure_arch(d):
     import bb;
 
-    arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1)
+    arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686":
         arch = "x86"
     elif arch == "arm":
@@ -181,7 +181,7 @@ def get_llvm_configure_arch(d):
     elif arch == "powerpc" or arch == "powerpc64":
         arch = "powerpc"
     else:
-        bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
+        bb.warn("%s does not support %s yet" % (d.getVar('PN', True), arch) );
 
     return arch
 
@@ -193,7 +193,7 @@ export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
 def get_jdk_arch(d):
     import bb
 
-    jdk_arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1)
+    jdk_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     if jdk_arch == "x86-64":
         jdk_arch = "amd64"
     elif jdk_arch == "powerpc":
@@ -211,8 +211,8 @@ export DEBUG_BINARIES = "true"
 
 ALTERNATIVE_PRIORITY = "50"
 
-OPENJDK_UPDATE_VERSION = "${@bb.data.getVar('PV', d, 1).split('b')[0]}"
-OPENJDK_BUILD_NUMBER = "b${@bb.data.getVar('PV', d, 1).split('b')[1]}"
+OPENJDK_UPDATE_VERSION = "${@d.getVar('PV', True).split('b')[0]}"
+OPENJDK_BUILD_NUMBER = "b${@d.getVar('PV', True).split('b')[1]}"
 EXTRA_OECONF_append = "\
         --with-build-number=${OPENJDK_BUILD_NUMBER} \
         --with-update-version=${OPENJDK_UPDATE_VERSION} \
diff --git a/recipes-core/openjdk/openjdk-common.inc b/recipes-core/openjdk/openjdk-common.inc
index 6a72572..cdfdda8 100644
--- a/recipes-core/openjdk/openjdk-common.inc
+++ b/recipes-core/openjdk/openjdk-common.inc
@@ -25,7 +25,7 @@ B = "${S}/build"
 def get_jdk_arch(d):
     import bb
 
-    jdk_arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1)
+    jdk_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     if jdk_arch == "x86-64":
         jdk_arch = "amd64"
     elif jdk_arch == "powerpc":
@@ -45,7 +45,7 @@ JDK_FAKE = "${WORKDIR}/fake-jdk"
 def get_llvm_configure_arch(d):
     import bb;
 
-    arch = bb.data.getVar('TRANSLATED_TARGET_ARCH', d, 1)
+    arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686":
         arch = "x86"
     elif arch == "arm":
@@ -55,7 +55,7 @@ def get_llvm_configure_arch(d):
     elif arch == "powerpc" or arch == "powerpc64":
         arch = "powerpc"
     else:
-        bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
+        bb.warn("%s does not support %s yet" % (d.getVar('PN', True), arch) );
 
     return arch
 
-- 
2.10.2



             reply	other threads:[~2016-11-29 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 16:48 Cody P Schafer [this message]
2016-11-29 20:16 ` [meta-java][PATCH] move from bb.data.getVar(x, d, 1) to d.getVar(x, True) Christopher Larson
2016-12-05 12:13   ` Patrick Ohly
2016-12-05 12:39     ` Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161129164817.16671-1-dev@codyps.com \
    --to=dev@codyps.com \
    --cc=mario@ossystems.com.br \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox