diff options
| author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
| commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
| tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/patch.bbclass | |
| parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
| download | poky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz | |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/patch.bbclass')
| -rw-r--r-- | meta/classes/patch.bbclass | 20 |
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" | |||
| 11 | inherit terminal | 11 | inherit terminal |
| 12 | 12 | ||
| 13 | python () { | 13 | python () { |
| 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 | ||
| 45 | python patch_task_patch_prefunc() { | 45 | python 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. |
