summaryrefslogtreecommitdiffstats
path: root/meta/classes/patch.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/patch.bbclass')
-rw-r--r--meta/classes/patch.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 0e5b602462..23ba5df48b 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -11,7 +11,7 @@ PATCH_GIT_USER_EMAIL ?= "oe.patch@oe"
11inherit terminal 11inherit terminal
12 12
13python () { 13python () {
14 if d.getVar('PATCHTOOL', True) == 'git' and d.getVar('PATCH_COMMIT_FUNCTIONS', True) == '1': 14 if d.getVar('PATCHTOOL') == 'git' and d.getVar('PATCH_COMMIT_FUNCTIONS') == '1':
15 tasks = list(filter(lambda k: d.getVarFlag(k, "task", True), d.keys())) 15 tasks = list(filter(lambda k: d.getVarFlag(k, "task", True), d.keys()))
16 extratasks = [] 16 extratasks = []
17 def follow_chain(task, endtask, chain=None): 17 def follow_chain(task, endtask, chain=None):
@@ -44,8 +44,8 @@ python () {
44 44
45python patch_task_patch_prefunc() { 45python patch_task_patch_prefunc() {
46 # Prefunc for do_patch 46 # Prefunc for do_patch
47 func = d.getVar('BB_RUNTASK', True) 47 func = d.getVar('BB_RUNTASK')
48 srcsubdir = d.getVar('S', True) 48 srcsubdir = d.getVar('S')
49 49
50 patchdir = os.path.join(srcsubdir, 'patches') 50 patchdir = os.path.join(srcsubdir, 'patches')
51 if os.path.exists(patchdir): 51 if os.path.exists(patchdir):
@@ -59,12 +59,12 @@ python patch_task_postfunc() {
59 # Prefunc for task functions between do_unpack and do_patch 59 # Prefunc for task functions between do_unpack and do_patch
60 import oe.patch 60 import oe.patch
61 import shutil 61 import shutil
62 func = d.getVar('BB_RUNTASK', True) 62 func = d.getVar('BB_RUNTASK')
63 srcsubdir = d.getVar('S', True) 63 srcsubdir = d.getVar('S')
64 64
65 if os.path.exists(srcsubdir): 65 if os.path.exists(srcsubdir):
66 if func == 'do_patch': 66 if func == 'do_patch':
67 haspatches = (d.getVar('PATCH_HAS_PATCHES_DIR', True) == '1') 67 haspatches = (d.getVar('PATCH_HAS_PATCHES_DIR') == '1')
68 patchdir = os.path.join(srcsubdir, 'patches') 68 patchdir = os.path.join(srcsubdir, 'patches')
69 if os.path.exists(patchdir): 69 if os.path.exists(patchdir):
70 shutil.rmtree(patchdir) 70 shutil.rmtree(patchdir)
@@ -99,20 +99,20 @@ python patch_do_patch() {
99 "git": oe.patch.GitApplyTree, 99 "git": oe.patch.GitApplyTree,
100 } 100 }
101 101
102 cls = patchsetmap[d.getVar('PATCHTOOL', True) or 'quilt'] 102 cls = patchsetmap[d.getVar('PATCHTOOL') or 'quilt']
103 103
104 resolvermap = { 104 resolvermap = {
105 "noop": oe.patch.NOOPResolver, 105 "noop": oe.patch.NOOPResolver,
106 "user": oe.patch.UserResolver, 106 "user": oe.patch.UserResolver,
107 } 107 }
108 108
109 rcls = resolvermap[d.getVar('PATCHRESOLVE', True) or 'user'] 109 rcls = resolvermap[d.getVar('PATCHRESOLVE') or 'user']
110 110
111 classes = {} 111 classes = {}
112 112
113 s = d.getVar('S', True) 113 s = d.getVar('S')
114 114
115 os.putenv('PATH', d.getVar('PATH', True)) 115 os.putenv('PATH', d.getVar('PATH'))
116 116
117 # We must use one TMPDIR per process so that the "patch" processes 117 # We must use one TMPDIR per process so that the "patch" processes
118 # don't generate the same temp file name. 118 # don't generate the same temp file name.