summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-17 22:25:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 17:24:53 +0000
commit2e9f092c9750250b5dd7e4c1be6b71947aba6429 (patch)
treedae43d18d272af35069338cfdf7a5ed35f1ebde7
parent0612ca4d0f67770391c8c66ee067ddb6a8759a61 (diff)
downloadopenembedded-core-contrib-2e9f092c9750250b5dd7e4c1be6b71947aba6429.tar.gz
openembedded-core-contrib-2e9f092c9750250b5dd7e4c1be6b71947aba6429.tar.bz2
openembedded-core-contrib-2e9f092c9750250b5dd7e4c1be6b71947aba6429.zip
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>
-rw-r--r--meta/classes/image.bbclass10
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 () {
else:
subimages.append(realt)
+ after = 'do_image'
+ for dep in typedeps[t]:
+ after += ' do_image_%s' % dep.replace("-", "_")
+
+ t = t.replace("-", "_")
+
d.setVar('do_image_%s' % t, '\n'.join(cmds))
d.setVarFlag('do_image_%s' % t, 'func', '1')
d.setVarFlag('do_image_%s' % t, 'fakeroot', '1')
@@ -402,10 +408,6 @@ python () {
d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
- after = 'do_image'
- for dep in typedeps[t]:
- after += ' do_image_%s' % dep
-
bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
}