diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-06-14 12:07:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-14 14:53:57 +0100 |
commit | daaed7b28ade1dfb9ba96aa73f8bac23f32e1cb5 (patch) | |
tree | a500ea894162d1b38562dbaaf720ee3b6eca8e20 /meta | |
parent | 2b85c9223485a054baa87ef72c15843feb099318 (diff) | |
download | poky-daaed7b28ade1dfb9ba96aa73f8bac23f32e1cb5.tar.gz |
image.bbclass: cleanup: add new variable "task"
Replaced repeated expression "do_image_%s" % t with
a variable 'task' to simplify the code and increase
readability.
(From OE-Core rev: d24dd95f2c1c7f773875454bee3f2016c4e7553c)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image.bbclass | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 85f6b9a87b..ff4eda19e9 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -491,19 +491,19 @@ python () { | |||
491 | for dep in typedeps[t]: | 491 | for dep in typedeps[t]: |
492 | after += ' do_image_%s' % dep.replace("-", "_").replace(".", "_") | 492 | after += ' do_image_%s' % dep.replace("-", "_").replace(".", "_") |
493 | 493 | ||
494 | t = t.replace("-", "_").replace(".", "_") | 494 | task = "do_image_%s" % t.replace("-", "_").replace(".", "_") |
495 | 495 | ||
496 | d.setVar('do_image_%s' % t, '\n'.join(cmds)) | 496 | d.setVar(task, '\n'.join(cmds)) |
497 | d.setVarFlag('do_image_%s' % t, 'func', '1') | 497 | d.setVarFlag(task, 'func', '1') |
498 | d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') | 498 | d.setVarFlag(task, 'fakeroot', '1') |
499 | d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size') | 499 | d.setVarFlag(task, 'prefuncs', debug + 'set_image_size') |
500 | d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') | 500 | d.setVarFlag(task, 'postfuncs', 'create_symlinks') |
501 | d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages)) | 501 | d.setVarFlag(task, 'subimages', ' '.join(subimages)) |
502 | d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) | 502 | d.appendVarFlag(task, 'vardeps', ' '.join(vardeps)) |
503 | d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') | 503 | d.appendVarFlag(task, 'vardepsexclude', 'DATETIME') |
504 | 504 | ||
505 | bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) | 505 | bb.debug(2, "Adding task %s before %s, after %s" % (task, 'do_image_complete', after)) |
506 | bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d) | 506 | bb.build.addtask(task, 'do_image_complete', after, d) |
507 | } | 507 | } |
508 | 508 | ||
509 | # | 509 | # |