diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-17 22:25:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-19 17:24:53 +0000 |
commit | 2e9f092c9750250b5dd7e4c1be6b71947aba6429 (patch) | |
tree | dae43d18d272af35069338cfdf7a5ed35f1ebde7 /meta/classes/image.bbclass | |
parent | 0612ca4d0f67770391c8c66ee067ddb6a8759a61 (diff) | |
download | poky-2e9f092c9750250b5dd7e4c1be6b71947aba6429.tar.gz |
image: Handle image types containing '-' correctly
Shell function names can't contain '-' characters, which means our image
task names also can't. Add some mapping to use '_' instead of the '-' so
images like "rpi-sdimg" work again.
(From OE-Core rev: e609a4dea2f6d9744e7d2a6650bebf2c02398907)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 83ba5c35f0..387051654e 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -393,6 +393,12 @@ python () { | |||
393 | else: | 393 | else: |
394 | subimages.append(realt) | 394 | subimages.append(realt) |
395 | 395 | ||
396 | after = 'do_image' | ||
397 | for dep in typedeps[t]: | ||
398 | after += ' do_image_%s' % dep.replace("-", "_") | ||
399 | |||
400 | t = t.replace("-", "_") | ||
401 | |||
396 | d.setVar('do_image_%s' % t, '\n'.join(cmds)) | 402 | d.setVar('do_image_%s' % t, '\n'.join(cmds)) |
397 | d.setVarFlag('do_image_%s' % t, 'func', '1') | 403 | d.setVarFlag('do_image_%s' % t, 'func', '1') |
398 | d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') | 404 | d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') |
@@ -402,10 +408,6 @@ python () { | |||
402 | d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) | 408 | d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) |
403 | d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') | 409 | d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') |
404 | 410 | ||
405 | after = 'do_image' | ||
406 | for dep in typedeps[t]: | ||
407 | after += ' do_image_%s' % dep | ||
408 | |||
409 | bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) | 411 | bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) |
410 | bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d) | 412 | bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d) |
411 | } | 413 | } |