diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-09 15:00:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:35:32 +0000 |
commit | b22831fd63164c4db9c0b72934d7d734a6585251 (patch) | |
tree | edb6581a041190290855bf86714430515c9f235a /meta/classes/sourcepkg.bbclass | |
parent | 07ded02ffd37b4fe60a6210dbf56490ea306f0b6 (diff) | |
download | openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.gz openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.bz2 openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.zip |
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sourcepkg.bbclass')
-rw-r--r-- | meta/classes/sourcepkg.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/sourcepkg.bbclass b/meta/classes/sourcepkg.bbclass index 64e6d7c860..38edfe4e2e 100644 --- a/meta/classes/sourcepkg.bbclass +++ b/meta/classes/sourcepkg.bbclass @@ -6,12 +6,12 @@ DISTRO ?= "openembedded" def get_src_tree(d): - workdir = bb.data.getVar('WORKDIR', d, 1) + workdir = d.getVar('WORKDIR', 1) if not workdir: bb.error("WORKDIR not defined, unable to find source tree.") return - s = bb.data.getVar('S', d, 0) + s = d.getVar('S', 0) if not s: bb.error("S not defined, unable to find source tree.") return @@ -55,8 +55,8 @@ sourcepkg_do_archive_bb() { python sourcepkg_do_dumpdata() { - workdir = bb.data.getVar('WORKDIR', d, 1) - distro = bb.data.getVar('DISTRO', d, 1) + workdir = d.getVar('WORKDIR', 1) + distro = d.getVar('DISTRO', 1) s_tree = get_src_tree(d) openembeddeddir = os.path.join(workdir, s_tree, distro) dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d)) @@ -73,8 +73,8 @@ python sourcepkg_do_dumpdata() { bb.data.emit_env(f, d, True) # emit the metadata which isnt valid shell for e in d.keys(): - if bb.data.getVarFlag(e, 'python', d): - f.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1))) + if d.getVarFlag(e, 'python'): + f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1))) f.close() } |