summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-03 22:01:45 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-03 22:01:45 +0000
commitab191d21e2e5e1609206146d238af6ec0b3f0554 (patch)
tree728fa74dbf00f6b11964aa53b8427a0d221d6e91 /bitbake/lib/bb/parse
parente88b4753781d54dc2625c3260c611d30ad76dbed (diff)
downloadopenembedded-core-ab191d21e2e5e1609206146d238af6ec0b3f0554.tar.gz
openembedded-core-ab191d21e2e5e1609206146d238af6ec0b3f0554.tar.bz2
openembedded-core-ab191d21e2e5e1609206146d238af6ec0b3f0554.tar.xz
openembedded-core-ab191d21e2e5e1609206146d238af6ec0b3f0554.zip
bitbake: Update to bitbake 1.8 branch head
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3892 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py51
1 files changed, 19 insertions, 32 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 2a30e5895..d7bf6d4f3 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -95,6 +95,10 @@ def handle(fn, d, include = 0):
if ext == ".bbclass":
__classname__ = root
classes.append(__classname__)
+ __inherit_cache = data.getVar('__inherit_cache', d) or []
+ if not fn in __inherit_cache:
+ __inherit_cache.append(fn)
+ data.setVar('__inherit_cache', __inherit_cache, d)
if include != 0:
oldfile = data.getVar('FILE', d)
@@ -126,10 +130,6 @@ def handle(fn, d, include = 0):
if ext != ".bbclass":
data.setVar('FILE', fn, d)
- i = (data.getVar("INHERIT", d, 1) or "").split()
- if not "base" in i and __classname__ != "base":
- i[0:0] = ["base"]
- inherit(i, d)
lineno = 0
while 1:
@@ -171,33 +171,12 @@ def handle(fn, d, include = 0):
all_handlers = {}
for var in data.getVar('__BBHANDLERS', d) or []:
# try to add the handler
- # if we added it remember the choiche
handler = data.getVar(var,d)
- if bb.event.register(var,handler) == bb.event.Registered:
- all_handlers[var] = handler
-
- tasklist = {}
- for var in data.getVar('__BBTASKS', d) or []:
- if var not in tasklist:
- tasklist[var] = []
- deps = data.getVarFlag(var, 'deps', d) or []
- for p in deps:
- if p not in tasklist[var]:
- tasklist[var].append(p)
-
- postdeps = data.getVarFlag(var, 'postdeps', d) or []
- for p in postdeps:
- if p not in tasklist:
- tasklist[p] = []
- if var not in tasklist[p]:
- tasklist[p].append(var)
+ bb.event.register(var, handler)
+ tasklist = data.getVar('__BBTASKS', d) or []
bb.build.add_tasks(tasklist, d)
- # now add the handlers
- if not len(all_handlers) == 0:
- data.setVar('__all_handlers__', all_handlers, d)
-
bbpath.pop(0)
if oldfile:
bb.data.setVar("FILE", oldfile, d)
@@ -342,15 +321,23 @@ def feeder(lineno, s, fn, root, d):
data.setVarFlag(var, "task", 1, d)
bbtasks = data.getVar('__BBTASKS', d) or []
- bbtasks.append(var)
+ if not var in bbtasks:
+ bbtasks.append(var)
data.setVar('__BBTASKS', bbtasks, d)
+ existing = data.getVarFlag(var, "deps", d) or []
if after is not None:
-# set up deps for function
- data.setVarFlag(var, "deps", after.split(), d)
+ # set up deps for function
+ for entry in after.split():
+ if entry not in existing:
+ existing.append(entry)
+ data.setVarFlag(var, "deps", existing, d)
if before is not None:
-# set up things that depend on this func
- data.setVarFlag(var, "postdeps", before.split(), d)
+ # set up things that depend on this func
+ for entry in before.split():
+ existing = data.getVarFlag(entry, "deps", d) or []
+ if var not in existing:
+ data.setVarFlag(entry, "deps", [var] + existing, d)
return
m = __addhandler_regexp__.match(s)