[oe-commits] Chris Larson : bitbake.conf: Drop some unnecessary getVar usage in python snippets
git version control
git at git.openembedded.org
Thu Jun 10 18:35:15 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 4d060ecf3da4ee27547e7456df1198a450461ab0
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=4d060ecf3da4ee27547e7456df1198a450461ab0
Author: Chris Larson <chris_larson at mentor.com>
Date: Sun May 23 10:41:09 2010 -0700
bitbake.conf: Drop some unnecessary getVar usage in python snippets
Signed-off-by: Chris Larson <chris_larson at mentor.com>
---
conf/bitbake.conf | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 1980f43..397dbc2 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -128,7 +128,8 @@ EXEEXT = "${HOST_EXEEXT}"
BASE_PACKAGE_ARCH = "${HOST_ARCH}"
PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
PACKAGE_EXTRA_ARCHS ?= ""
-MACHINE_ARCH = "${@[bb.data.getVar('BASE_PACKAGE_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}"
+MACHINE_ARCH = "${@oe.utils.ifelse(bool(d.getVar('MACHINE', True)), '${MACHINE}', \
+ 'BASE_PACKAGE_ARCH')}"
PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
MULTIMACH_ARCH = "${PACKAGE_ARCH}"
@@ -174,9 +175,9 @@ ASSUME_PROVIDED = "\
##################################################################
# Package default variables.
##################################################################
-PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
-PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
-PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
+PN = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[0] or 'defaultpkgname'}"
+PV = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[1] or '1.0'}"
+PR = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[2] or 'r0'}"
PF = "${PN}-${EXTENDPE}${PV}-${PR}"
PE ?= "0"
EXTENDPE = "${@int('${PE}') and '${PE}_' or ''}"
@@ -192,7 +193,7 @@ MACHINE_KERNEL_PR = ""
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
# otherwise it is the same as PN and P
SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian -sdk"
-BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
+BPN = "${@base_prune_suffix('${PN}', '${SPECIAL_PKGSUFFIX}'.split(), d)}"
BP = "${BPN}-${PV}"
# Package info.
More information about the Openembedded-commits
mailing list