diff options
author | 2006-11-18 20:52:25 +0000 | |
---|---|---|
committer | 2006-11-18 20:52:25 +0000 | |
commit | 1f554840eb45e8642db00c36ec9303e239575c14 (patch) | |
tree | 4b2f323fb551671172730e2ffab69267f8bc86da | |
parent | f6941af19394817f7ac7bcf58291e9dc0138df53 (diff) | |
download | bitbake-1f554840eb45e8642db00c36ec9303e239575c14.tar.gz |
ConfHandler, BBHandler: Optmise number of expand calls
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 14 | ||||
-rw-r--r-- | lib/bb/parse/parse_py/ConfHandler.py | 9 |
2 files changed, 7 insertions, 16 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index cd7462364..d2d7c49e5 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -61,8 +61,8 @@ def inherit(files, d): __inherit_cache = data.getVar('__inherit_cache', d) or [] fn = "" lineno = 0 - for f in files: - file = data.expand(f, d) + files = data.expand(files, d) + for file in files: if file[0] != "/" and file[-8:] != ".bbclass": file = os.path.join('classes', '%s.bbclass' % file) @@ -104,7 +104,6 @@ def handle(fn, d, include = 0): if not os.path.isabs(fn): f = None for p in bbpath: - p = data.expand(p, d) j = os.path.join(p, fn) if os.access(j, os.R_OK): abs_fn = j @@ -387,16 +386,11 @@ def set_additional_vars(file, d, include): bb.msg.debug(2, bb.msg.domain.Parsing, "BB %s: set_additional_vars" % file) - src_uri = data.getVar('SRC_URI', d) + src_uri = data.getVar('SRC_URI', d, 1) if not src_uri: return - src_uri = data.expand(src_uri, d) - a = data.getVar('A', d) - if a: - a = data.expand(a, d).split() - else: - a = [] + a = (data.getVar('A', d, 1) or '').split() from bb import fetch try: diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index 4bc2bbc2b..6c0a8ccea 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/lib/bb/parse/parse_py/ConfHandler.py @@ -117,14 +117,11 @@ def handle(fn, data, include = 0): oldfile = bb.data.getVar('FILE', data) fn = obtain(fn, data) - bbpath = [] if not os.path.isabs(fn): f = None - vbbpath = bb.data.getVar("BBPATH", data) - if vbbpath: - bbpath += vbbpath.split(":") - for p in bbpath: - currname = os.path.join(bb.data.expand(p, data), fn) + bbpath = bb.data.getVar("BBPATH", data, 1) or [] + for p in bbpath.split(":"): + currname = os.path.join(p, fn) if os.access(currname, os.R_OK): f = open(currname, 'r') abs_fn = currname |