summaryrefslogtreecommitdiff
path: root/bitbake-dev/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-19 14:48:19 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-19 14:48:19 +0000
commit22a271aaa99daeb6b29c42c2c1dc670bf204310e (patch)
treed2690b66e7a613820f34ceaecbce65809cbd22a3 /bitbake-dev/lib/bb/parse
parentcefe87fc3c4202e942f34666813bc094df2ffb4b (diff)
downloadopenembedded-core-22a271aaa99daeb6b29c42c2c1dc670bf204310e.tar.gz
openembedded-core-22a271aaa99daeb6b29c42c2c1dc670bf204310e.tar.bz2
openembedded-core-22a271aaa99daeb6b29c42c2c1dc670bf204310e.tar.xz
openembedded-core-22a271aaa99daeb6b29c42c2c1dc670bf204310e.zip
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.py2
-rw-r--r--bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py13
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 f0c340956..f34599136 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):
tasklist = data.getVar('__BBTASKS', d) or []
bb.build.add_tasks(tasklist, d)
- bb.event.fire(bb.event.RecipeParsed(fn, d))
+ bb.event.fire(bb.event.RecipeParsed(fn), d)
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 c9f1ea13f..23316ada5 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+(.+)" )
__export_regexp__ = re.compile( r"export\s+(.+)" )
def init(data):
- if not bb.data.getVar('TOPDIR', data):
- bb.data.setVar('TOPDIR', os.getcwd(), data)
+ topdir = bb.data.getVar('TOPDIR', data)
+ if not topdir:
+ topdir = os.getcwd()
+ bb.data.setVar('TOPDIR', topdir, data)
if not bb.data.getVar('BBPATH', data):
- bb.data.setVar('BBPATH', os.path.join(sys.prefix, 'share', 'bitbake'), data)
+ from pkg_resources import Requirement, resource_filename
+ bitbake = Requirement.parse("bitbake")
+ datadir = resource_filename(bitbake, "../share/bitbake")
+ basedir = resource_filename(bitbake, "..")
+ bb.data.setVar('BBPATH', '%s:%s:%s' % (topdir, datadir, basedir), data)
+
def supports(fn, d):
return localpath(fn, d)[-5:] == ".conf"