From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] conf/classes: Catch up with bb.data -> direct object access conversion
Date: Sat, 03 Mar 2012 19:58:28 -0800 [thread overview]
Message-ID: <1330833508.3949.0.camel@ted> (raw)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
classes/base.bbclass | 6 +++---
conf/bitbake.conf | 10 +++++-----
lib/bb/cooker.py | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index c6693ce..444b830 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -43,8 +43,8 @@ python do_showdata() {
bb.data.emit_env(sys.__stdout__, d, True)
# emit the metadata which isnt valid shell
for e in bb.data.keys(d):
- if bb.data.getVarFlag(e, 'python', d):
- sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1)))
+ if d.getVarFlag(e, 'python'):
+ sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1)))
}
addtask listtasks
@@ -52,7 +52,7 @@ do_listtasks[nostamp] = "1"
python do_listtasks() {
import sys
for e in bb.data.keys(d):
- if bb.data.getVarFlag(e, 'task', d):
+ if d.getVarFlag(e, 'task'):
sys.__stdout__.write("%s\n" % e)
}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index b0c06a8..1ee4dc5 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -28,9 +28,9 @@ FETCHCOMMAND = ""
FETCHCOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} co ${CVSCOOPTS} ${CVSMODULE}"
FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
-FILESDIR = "${@bb.utils.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
+FILESDIR = "${@bb.utils.which(d.getVar('FILESPATH', 1), '.')}"
FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
-FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
+FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}"
GITDIR = "${DL_DIR}/git"
IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
IMAGE_ROOTFS = "${TMPDIR}/rootfs"
@@ -40,10 +40,10 @@ OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
P = "${PN}-${PV}"
PERSISTENT_DIR = "${TMPDIR}/cache"
PF = "${PN}-${PV}-${PR}"
-PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
-PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
+PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}"
+PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}"
PROVIDES = ""
-PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
+PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}"
RESUMECOMMAND = ""
RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
S = "${WORKDIR}/${P}"
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 558eadd..bf8389a 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -178,7 +178,7 @@ class BBCooker:
self.configuration.data = bb.data.init()
if not self.server_registration_cb:
- bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
+ self.configuration.data.setVar("BB_WORKERCONTEXT", "1")
filtered_keys = bb.utils.approved_variables()
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
reply other threads:[~2012-03-04 4:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1330833508.3949.0.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.