diff options
-rw-r--r-- | meta/classes/image_types.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index a5f09fef42..5b48a09da4 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -11,11 +11,12 @@ def get_imagecmds(d): | |||
11 | for type in types: | 11 | for type in types: |
12 | for ctype in ctypes: | 12 | for ctype in ctypes: |
13 | if type.endswith("." + ctype): | 13 | if type.endswith("." + ctype): |
14 | basetype = type.rsplit(".", 1)[0] | 14 | basetype = type[:-len("." + ctype)] |
15 | types[types.index(type)] = basetype | 15 | types[types.index(type)] = basetype |
16 | if type not in cimages: | 16 | if basetype not in cimages: |
17 | cimages[basetype] = [] | 17 | cimages[basetype] = [] |
18 | cimages[basetype].append(ctype) | 18 | cimages[basetype].append(ctype) |
19 | break | ||
19 | 20 | ||
20 | # Live images will be processed via inheriting bbclass and | 21 | # Live images will be processed via inheriting bbclass and |
21 | # does not get processed here. | 22 | # does not get processed here. |
@@ -28,7 +29,7 @@ def get_imagecmds(d): | |||
28 | if d.getVar('IMAGE_LINK_NAME', True): | 29 | if d.getVar('IMAGE_LINK_NAME', True): |
29 | cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" | 30 | cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" |
30 | 31 | ||
31 | for type in types: | 32 | for type in set(types): |
32 | ccmd = [] | 33 | ccmd = [] |
33 | subimages = [] | 34 | subimages = [] |
34 | localdata = bb.data.createCopy(d) | 35 | localdata = bb.data.createCopy(d) |
@@ -47,7 +48,7 @@ def get_imagecmds(d): | |||
47 | localdata.setVar('subimages', " ".join(subimages)) | 48 | localdata.setVar('subimages', " ".join(subimages)) |
48 | cmd = localdata.getVar("IMAGE_CMD", True) | 49 | cmd = localdata.getVar("IMAGE_CMD", True) |
49 | localdata.setVar('cmd', cmd) | 50 | localdata.setVar('cmd', cmd) |
50 | cmds += localdata.getVar("runimagecmd", True) | 51 | cmds += "\n" + localdata.getVar("runimagecmd", True) |
51 | return cmds | 52 | return cmds |
52 | 53 | ||
53 | runimagecmd () { | 54 | runimagecmd () { |