diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-25 14:57:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-27 10:35:30 +0000 |
| commit | 4cd96710785eb05abeff1f281878655118d4a7dd (patch) | |
| tree | f2e15210fa7057df398c6e20ecc51f1d747a12ab /bitbake/lib/bb/parse/parse_py | |
| parent | 0a434ac10158e2011d41a1189e65e9474b1672be (diff) | |
| download | poky-4cd96710785eb05abeff1f281878655118d4a7dd.tar.gz | |
bitbake: Update users of getVar/setVar to use the data store functions directly
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 8c1bd60abf..2d6e331a1d 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
| @@ -159,7 +159,7 @@ def handle(fn, d, include): | |||
| 159 | return ast.multi_finalize(fn, d) | 159 | return ast.multi_finalize(fn, d) |
| 160 | 160 | ||
| 161 | if oldfile: | 161 | if oldfile: |
| 162 | bb.data.setVar("FILE", oldfile, d) | 162 | d.setVar("FILE", oldfile) |
| 163 | 163 | ||
| 164 | # we have parsed the bb class now | 164 | # we have parsed the bb class now |
| 165 | if ext == ".bbclass" or ext == ".inc": | 165 | if ext == ".bbclass" or ext == ".inc": |
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index e168d24b4c..6ae9d973e7 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | # with this program; if not, write to the Free Software Foundation, Inc., | 24 | # with this program; if not, write to the Free Software Foundation, Inc., |
| 25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 26 | 26 | ||
| 27 | import re, bb.data, os | 27 | import re, os |
| 28 | import logging | 28 | import logging |
| 29 | import bb.utils | 29 | import bb.utils |
| 30 | from bb.parse import ParseError, resolve_file, ast, logger | 30 | from bb.parse import ParseError, resolve_file, ast, logger |
| @@ -36,9 +36,9 @@ __require_regexp__ = re.compile( r"require\s+(.+)" ) | |||
| 36 | __export_regexp__ = re.compile( r"export\s+(.+)" ) | 36 | __export_regexp__ = re.compile( r"export\s+(.+)" ) |
| 37 | 37 | ||
| 38 | def init(data): | 38 | def init(data): |
| 39 | topdir = bb.data.getVar('TOPDIR', data) | 39 | topdir = data.getVar('TOPDIR') |
| 40 | if not topdir: | 40 | if not topdir: |
| 41 | bb.data.setVar('TOPDIR', os.getcwd(), data) | 41 | data.setVar('TOPDIR', os.getcwd()) |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | def supports(fn, d): | 44 | def supports(fn, d): |
| @@ -53,12 +53,12 @@ def include(oldfn, fn, data, error_out): | |||
| 53 | return None | 53 | return None |
| 54 | 54 | ||
| 55 | import bb | 55 | import bb |
| 56 | fn = bb.data.expand(fn, data) | 56 | fn = data.expand(fn) |
| 57 | oldfn = bb.data.expand(oldfn, data) | 57 | oldfn = data.expand(oldfn) |
| 58 | 58 | ||
| 59 | if not os.path.isabs(fn): | 59 | if not os.path.isabs(fn): |
| 60 | dname = os.path.dirname(oldfn) | 60 | dname = os.path.dirname(oldfn) |
| 61 | bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1)) | 61 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH", 1)) |
| 62 | abs_fn = bb.utils.which(bbpath, fn) | 62 | abs_fn = bb.utils.which(bbpath, fn) |
| 63 | if abs_fn: | 63 | if abs_fn: |
| 64 | fn = abs_fn | 64 | fn = abs_fn |
| @@ -77,7 +77,7 @@ def handle(fn, data, include): | |||
| 77 | if include == 0: | 77 | if include == 0: |
| 78 | oldfile = None | 78 | oldfile = None |
| 79 | else: | 79 | else: |
| 80 | oldfile = bb.data.getVar('FILE', data) | 80 | oldfile = data.getVar('FILE') |
| 81 | 81 | ||
| 82 | abs_fn = resolve_file(fn, data) | 82 | abs_fn = resolve_file(fn, data) |
| 83 | f = open(abs_fn, 'r') | 83 | f = open(abs_fn, 'r') |
| @@ -102,10 +102,10 @@ def handle(fn, data, include): | |||
| 102 | feeder(lineno, s, fn, statements) | 102 | feeder(lineno, s, fn, statements) |
| 103 | 103 | ||
| 104 | # DONE WITH PARSING... time to evaluate | 104 | # DONE WITH PARSING... time to evaluate |
| 105 | bb.data.setVar('FILE', abs_fn, data) | 105 | data.setVar('FILE', abs_fn) |
| 106 | statements.eval(data) | 106 | statements.eval(data) |
| 107 | if oldfile: | 107 | if oldfile: |
| 108 | bb.data.setVar('FILE', oldfile, data) | 108 | data.setVar('FILE', oldfile) |
| 109 | 109 | ||
| 110 | return data | 110 | return data |
| 111 | 111 | ||
