summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/build.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 271cda62c9..c6104a475e 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -862,3 +862,19 @@ def deltask(task, d):
862 if task in deps: 862 if task in deps:
863 deps.remove(task) 863 deps.remove(task)
864 d.setVarFlag(bbtask, 'deps', deps) 864 d.setVarFlag(bbtask, 'deps', deps)
865
866def preceedtask(task, with_recrdeptasks, d):
867 """
868 Returns a set of tasks in the current recipe which were specified as
869 precondition by the task itself ("after") or which listed themselves
870 as precondition ("before"). Preceeding tasks specified via the
871 "recrdeptask" are included in the result only if requested. Beware
872 that this may lead to the task itself being listed.
873 """
874 preceed = set()
875 preceed.update(d.getVarFlag(task, 'deps') or [])
876 if with_recrdeptasks:
877 recrdeptask = d.getVarFlag(task, 'recrdeptask')
878 if recrdeptask:
879 preceed.update(recrdeptask.split())
880 return preceed