]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/patch: switch to new bb.build.tasksbetween() function
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 6 Feb 2017 20:30:49 +0000 (09:30 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Feb 2017 14:48:55 +0000 (14:48 +0000)
A generic version of the code to work out the tasks between two
tasks (based on the code here) has been added to bb.build, so use that
instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/patch.bbclass

index d0806bcda24bc288e659878de3ad1650b076b260..8f35cb4f9532b51e40e56e6ddc45105b69cabf32 100644 (file)
@@ -12,25 +12,7 @@ inherit terminal
 
 python () {
     if d.getVar('PATCHTOOL') == 'git' and d.getVar('PATCH_COMMIT_FUNCTIONS') == '1':
-        tasks = list(filter(lambda k: d.getVarFlag(k, "task"), d.keys()))
-        extratasks = []
-        def follow_chain(task, endtask, chain=None):
-            if not chain:
-                chain = []
-            chain.append(task)
-            for othertask in tasks:
-                if othertask == task:
-                    continue
-                if task == endtask:
-                    for ctask in chain:
-                        if ctask not in extratasks:
-                            extratasks.append(ctask)
-                else:
-                    deps = d.getVarFlag(othertask, 'deps', False)
-                    if task in deps:
-                        follow_chain(othertask, endtask, chain)
-            chain.pop()
-        follow_chain('do_unpack', 'do_patch')
+        extratasks = bb.build.tasksbetween('do_unpack', 'do_patch', d)
         try:
             extratasks.remove('do_unpack')
         except ValueError: