Replace bb.data.* with d.*

Used sed expression given here:

http://lists.linuxtogo.org/pipermail/openembedded-core/2011-November/012373.html

Plus an additional expression for .expand. Full expression is:

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' \
-e 's:bb.data.\(expand([^,]*\), \([^ )]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

Some minor correction in systemd.bbclass was needed for some expressions
that didn't quite match the regex in the desired way; additionally a few
instances were manually changed.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton
2012-10-28 13:49:59 +00:00
parent d66c9a8b62
commit 3a30c56238
41 changed files with 89 additions and 89 deletions
+2 -2
View File
@@ -51,14 +51,14 @@ def get_git_pkgv(d, use_tags):
import os
import bb
src_uri = bb.data.getVar('SRC_URI', d, 1).split()
src_uri = d.getVar('SRC_URI', 1).split()
fetcher = bb.fetch2.Fetch(src_uri, d)
ud = fetcher.ud
#
# If SRCREV_FORMAT is set respect it for tags
#
format = bb.data.getVar('SRCREV_FORMAT', d, True)
format = d.getVar('SRCREV_FORMAT', True)
if not format:
format = 'default'