diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-19 14:48:19 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-19 14:48:19 +0000 |
commit | 22a271aaa99daeb6b29c42c2c1dc670bf204310e (patch) | |
tree | d2690b66e7a613820f34ceaecbce65809cbd22a3 /bitbake-dev/lib/bb/parse | |
parent | cefe87fc3c4202e942f34666813bc094df2ffb4b (diff) | |
download | poky-22a271aaa99daeb6b29c42c2c1dc670bf204310e.tar.gz |
bitbake-dev: Sync with upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev/lib/bb/parse')
-rw-r--r-- | bitbake-dev/lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py index f0c3409568..f34599136c 100644 --- a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -114,7 +114,7 @@ def finalise(fn, d): | |||
114 | tasklist = data.getVar('__BBTASKS', d) or [] | 114 | tasklist = data.getVar('__BBTASKS', d) or [] |
115 | bb.build.add_tasks(tasklist, d) | 115 | bb.build.add_tasks(tasklist, d) |
116 | 116 | ||
117 | bb.event.fire(bb.event.RecipeParsed(fn, d)) | 117 | bb.event.fire(bb.event.RecipeParsed(fn), d) |
118 | 118 | ||
119 | 119 | ||
120 | def handle(fn, d, include = 0): | 120 | def handle(fn, d, include = 0): |
diff --git a/bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py b/bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py index c9f1ea13fb..23316ada58 100644 --- a/bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -34,10 +34,17 @@ __require_regexp__ = re.compile( r"require\s+(.+)" ) | |||
34 | __export_regexp__ = re.compile( r"export\s+(.+)" ) | 34 | __export_regexp__ = re.compile( r"export\s+(.+)" ) |
35 | 35 | ||
36 | def init(data): | 36 | def init(data): |
37 | if not bb.data.getVar('TOPDIR', data): | 37 | topdir = bb.data.getVar('TOPDIR', data) |
38 | bb.data.setVar('TOPDIR', os.getcwd(), data) | 38 | if not topdir: |
39 | topdir = os.getcwd() | ||
40 | bb.data.setVar('TOPDIR', topdir, data) | ||
39 | if not bb.data.getVar('BBPATH', data): | 41 | if not bb.data.getVar('BBPATH', data): |
40 | bb.data.setVar('BBPATH', os.path.join(sys.prefix, 'share', 'bitbake'), data) | 42 | from pkg_resources import Requirement, resource_filename |
43 | bitbake = Requirement.parse("bitbake") | ||
44 | datadir = resource_filename(bitbake, "../share/bitbake") | ||
45 | basedir = resource_filename(bitbake, "..") | ||
46 | bb.data.setVar('BBPATH', '%s:%s:%s' % (topdir, datadir, basedir), data) | ||
47 | |||
41 | 48 | ||
42 | def supports(fn, d): | 49 | def supports(fn, d): |
43 | return localpath(fn, d)[-5:] == ".conf" | 50 | return localpath(fn, d)[-5:] == ".conf" |