]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass: do exact match for rootfs type
authorZhenhua Luo <zhenhua.luo@nxp.com>
Mon, 13 Jun 2016 11:47:34 +0000 (19:47 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Jun 2016 11:56:33 +0000 (12:56 +0100)
Do exact match for rootfs type, instead of pattern match, to avoid
unexpected build error due to redundant rootfs type build.

E.g. when building ext2.gz.u-boot, both .gz.u-boot and .u-boot are matched,
the following build error will appear, actually .u-boot is not needed.
| mkimage: Can't open .../core-image-minimal-<machine>-<yyyymmddhhmmss>.rootfs.ext2.gz: No such file or directory

Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass

index 65ce6bb5244920aaf3fc71ea763877dc01a8d2a6..2577cca733140feae36a9c7ecd44103b8d598298 100644 (file)
@@ -404,7 +404,7 @@ python () {
         rm_tmp_images = set()
         def gen_conversion_cmds(bt):
             for ctype in ctypes:
-                if bt.endswith("." + ctype):
+                if bt[bt.find('.') + 1:] == ctype:
                     type = bt[0:-len(ctype) - 1]
                     if type.startswith("debugfs_"):
                         type = type[8:]