aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-20 18:46:02 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-20 18:46:02 +0000
commit22c29d8651668195f72e2f6a8e059d625eb511c3 (patch)
treedd1dd43f0ec47a9964c8a766eb8b3ad75cf51a64 /bitbake/lib/bb/parse
parent1bfd6edef9db9c9175058ae801d1b601e4f15263 (diff)
downloadopenembedded-core-contrib-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.gz
bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py32
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py13
2 files changed, 30 insertions, 15 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 915db214f5..86fa18ebd2 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -94,7 +94,7 @@ def finalise(fn, d):
for f in anonfuncs:
code = code + " %s(d)\n" % f
data.setVar("__anonfunc", code, d)
- build.exec_func_python("__anonfunc", d)
+ build.exec_func("__anonfunc", d)
data.delVar('T', d)
if t:
data.setVar('T', t, d)
@@ -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):
@@ -185,18 +185,26 @@ def handle(fn, d, include = 0):
multi = data.getVar('BBCLASSEXTEND', d, 1)
if multi:
based = bb.data.createCopy(d)
+ else:
+ based = d
+ try:
finalise(fn, based)
- darray = {"": based}
- for cls in multi.split():
- pn = data.getVar('PN', d, True)
- based = bb.data.createCopy(d)
- data.setVar('PN', pn + '-' + cls, based)
- inherit([cls], based)
+ except bb.parse.SkipPackage:
+ bb.data.setVar("__SKIPPED", True, based)
+ darray = {"": based}
+
+ for cls in (multi or "").split():
+ pn = data.getVar('PN', d, True)
+ based = bb.data.createCopy(d)
+ data.setVar('PN', pn + '-' + cls, based)
+ inherit([cls], based)
+ try:
finalise(fn, based)
- darray[cls] = based
- return darray
- else:
- finalise(fn, d)
+ except bb.parse.SkipPackage:
+ bb.data.setVar("__SKIPPED", True, based)
+ darray[cls] = based
+ return darray
+
bbpath.pop(0)
if oldfile:
bb.data.setVar("FILE", oldfile, d)
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index c9f1ea13fb..23316ada58 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/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"