summaryrefslogtreecommitdiffstats
path: root/meta/classes/src_distribute.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-09 15:00:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-10 11:35:32 +0000
commitb22831fd63164c4db9c0b72934d7d734a6585251 (patch)
treeedb6581a041190290855bf86714430515c9f235a /meta/classes/src_distribute.bbclass
parent07ded02ffd37b4fe60a6210dbf56490ea306f0b6 (diff)
downloadopenembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/src_distribute.bbclass')
-rw-r--r--meta/classes/src_distribute.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/src_distribute.bbclass b/meta/classes/src_distribute.bbclass
index fbfbdf0094..2069d652a3 100644
--- a/meta/classes/src_distribute.bbclass
+++ b/meta/classes/src_distribute.bbclass
@@ -3,12 +3,12 @@ python do_distribute_sources () {
l = bb.data.createCopy(d)
bb.data.update_data(l)
- sources_dir = bb.data.getVar('SRC_DISTRIBUTEDIR', d, 1)
- src_uri = bb.data.getVar('SRC_URI', d, 1).split()
+ sources_dir = d.getVar('SRC_DISTRIBUTEDIR', 1)
+ src_uri = d.getVar('SRC_URI', 1).split()
fetcher = bb.fetch2.Fetch(src_uri, d)
ud = fetcher.ud
- licenses = bb.data.getVar('LICENSE', d, 1).replace('&', '|')
+ licenses = d.getVar('LICENSE', 1).replace('&', '|')
licenses = licenses.replace('(', '').replace(')', '')
clean_licenses = ""
for x in licenses.split():
@@ -20,20 +20,20 @@ python do_distribute_sources () {
for license in clean_licenses.split('|'):
for url in ud.values():
- cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1)
+ cmd = d.getVar('SRC_DISTRIBUTECOMMAND', 1)
if not cmd:
raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined")
url.setup_localpath(d)
- bb.data.setVar('SRC', url.localpath, d)
+ d.setVar('SRC', url.localpath)
if url.type == 'file':
if url.basename == '*':
import os.path
dest_dir = os.path.basename(os.path.dirname(os.path.abspath(url.localpath)))
- bb.data.setVar('DEST', "%s_%s/" % (bb.data.getVar('PF', d, 1), dest_dir), d)
+ bb.data.setVar('DEST', "%s_%s/" % (d.getVar('PF', 1), dest_dir), d)
else:
- bb.data.setVar('DEST', "%s_%s" % (bb.data.getVar('PF', d, 1), url.basename), d)
+ bb.data.setVar('DEST', "%s_%s" % (d.getVar('PF', 1), url.basename), d)
else:
- bb.data.setVar('DEST', '', d)
+ d.setVar('DEST', '')
bb.data.setVar('SRC_DISTRIBUTEDIR', "%s/%s" % (sources_dir, license), d)
bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)