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:51:19 +0000 |
commit | c8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch) | |
tree | 5f1b86954646a0f3bb914407994388a6a4346769 /meta/classes/sourcepkg.bbclass | |
parent | 5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff) | |
download | poky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz |
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 *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
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" | |||
6 | 6 | ||
7 | def get_src_tree(d): | 7 | def get_src_tree(d): |
8 | 8 | ||
9 | workdir = bb.data.getVar('WORKDIR', d, 1) | 9 | workdir = d.getVar('WORKDIR', 1) |
10 | if not workdir: | 10 | if not workdir: |
11 | bb.error("WORKDIR not defined, unable to find source tree.") | 11 | bb.error("WORKDIR not defined, unable to find source tree.") |
12 | return | 12 | return |
13 | 13 | ||
14 | s = bb.data.getVar('S', d, 0) | 14 | s = d.getVar('S', 0) |
15 | if not s: | 15 | if not s: |
16 | bb.error("S not defined, unable to find source tree.") | 16 | bb.error("S not defined, unable to find source tree.") |
17 | return | 17 | return |
@@ -55,8 +55,8 @@ sourcepkg_do_archive_bb() { | |||
55 | 55 | ||
56 | python sourcepkg_do_dumpdata() { | 56 | python sourcepkg_do_dumpdata() { |
57 | 57 | ||
58 | workdir = bb.data.getVar('WORKDIR', d, 1) | 58 | workdir = d.getVar('WORKDIR', 1) |
59 | distro = bb.data.getVar('DISTRO', d, 1) | 59 | distro = d.getVar('DISTRO', 1) |
60 | s_tree = get_src_tree(d) | 60 | s_tree = get_src_tree(d) |
61 | openembeddeddir = os.path.join(workdir, s_tree, distro) | 61 | openembeddeddir = os.path.join(workdir, s_tree, distro) |
62 | dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d)) | 62 | dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d)) |
@@ -73,8 +73,8 @@ python sourcepkg_do_dumpdata() { | |||
73 | bb.data.emit_env(f, d, True) | 73 | bb.data.emit_env(f, d, True) |
74 | # emit the metadata which isnt valid shell | 74 | # emit the metadata which isnt valid shell |
75 | for e in d.keys(): | 75 | for e in d.keys(): |
76 | if bb.data.getVarFlag(e, 'python', d): | 76 | if d.getVarFlag(e, 'python'): |
77 | f.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1))) | 77 | f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1))) |
78 | f.close() | 78 | f.close() |
79 | } | 79 | } |
80 | 80 | ||