Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] bitbake.conf: use := for BUILD_OS and BUILD_ARCH
@ 2010-05-27 21:16 Chris Larson
  2010-05-27 21:16 ` [PATCH 2/4] bitbake.conf: don't filter out nonexisting paths from FILESPATH Chris Larson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Larson @ 2010-05-27 21:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

These don't change, so their initial values should be just fine.  Apparently,
in a typical build, those os.uname() snippets are called around 46k times,
which seems a tad excessive :)

Signed-off-by: Chris Larson <chris_larson@mentor.com>

diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 12a5522..ee93cd4 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -90,8 +90,8 @@ target_datadir := "${datadir}"
 # Architecture-dependent build variables.
 ##################################################################
 
-BUILD_ARCH = "${@os.uname()[4]}"
-BUILD_OS = "${@os.uname()[0].lower()}"
+BUILD_ARCH := "${@os.uname()[4]}"
+BUILD_OS := "${@os.uname()[0].lower()}"
 BUILD_VENDOR = ""
 BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
 BUILD_PREFIX = ""
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] bitbake.conf: don't filter out nonexisting paths from FILESPATH
  2010-05-27 21:16 [PATCH 1/4] bitbake.conf: use := for BUILD_OS and BUILD_ARCH Chris Larson
@ 2010-05-27 21:16 ` Chris Larson
  2010-05-27 21:16 ` [PATCH 3/4] bitbake.conf: make the EXTENDPE bits slightly less disturbing Chris Larson
  2010-05-27 21:16 ` [PATCH 4/4] bitbake.conf: Drop some unnecessary getVar usage in python snippets Chris Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Larson @ 2010-05-27 21:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

It's unnecessary, and can cause problems with amend.bbclass.

Signed-off-by: Chris Larson <chris_larson@mentor.com>

diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index ee93cd4..5dc6772 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -272,7 +272,7 @@ export MANIFEST = "${FILESDIR}/manifest"
 FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
 FILESPATHBASE = "${FILE_DIRNAME}"
 FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
-FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES', 1) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}"
+FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES', 1) + ':').split(':')])}"
 FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
 
 ##################################################################
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] bitbake.conf: make the EXTENDPE bits slightly less disturbing
  2010-05-27 21:16 [PATCH 1/4] bitbake.conf: use := for BUILD_OS and BUILD_ARCH Chris Larson
  2010-05-27 21:16 ` [PATCH 2/4] bitbake.conf: don't filter out nonexisting paths from FILESPATH Chris Larson
@ 2010-05-27 21:16 ` Chris Larson
  2010-05-27 21:16 ` [PATCH 4/4] bitbake.conf: Drop some unnecessary getVar usage in python snippets Chris Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Larson @ 2010-05-27 21:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

Signed-off-by: Chris Larson <chris_larson@mentor.com>

diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 5dc6772..1980f43 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -178,8 +178,9 @@ PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'de
 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'}"
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
-EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
+PE ?= "0"
+EXTENDPE = "${@int('${PE}') and '${PE}_' or ''}"
+EXTENDPEVER = "${@int('${PE}') and '${PE}:' or ''}"
 EXTENDPV = "${EXTENDPEVER}${PV}-${PR}${DISTRO_PR}"
 P = "${PN}-${PV}"
 
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] bitbake.conf: Drop some unnecessary getVar usage in python snippets
  2010-05-27 21:16 [PATCH 1/4] bitbake.conf: use := for BUILD_OS and BUILD_ARCH Chris Larson
  2010-05-27 21:16 ` [PATCH 2/4] bitbake.conf: don't filter out nonexisting paths from FILESPATH Chris Larson
  2010-05-27 21:16 ` [PATCH 3/4] bitbake.conf: make the EXTENDPE bits slightly less disturbing Chris Larson
@ 2010-05-27 21:16 ` Chris Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Larson @ 2010-05-27 21:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

Signed-off-by: Chris Larson <chris_larson@mentor.com>

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.
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-27 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 21:16 [PATCH 1/4] bitbake.conf: use := for BUILD_OS and BUILD_ARCH Chris Larson
2010-05-27 21:16 ` [PATCH 2/4] bitbake.conf: don't filter out nonexisting paths from FILESPATH Chris Larson
2010-05-27 21:16 ` [PATCH 3/4] bitbake.conf: make the EXTENDPE bits slightly less disturbing Chris Larson
2010-05-27 21:16 ` [PATCH 4/4] bitbake.conf: Drop some unnecessary getVar usage in python snippets Chris Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox