]> code.ossystems Code Review - openembedded-core.git/commit
direct.py: fix getting image name
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 10 Jan 2017 17:46:08 +0000 (19:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jan 2017 18:01:55 +0000 (18:01 +0000)
commit2e05d9709f1308fc95d3406b8a409ea982c5b474
tree35e3c283b4d67eae5fbb8b09313257ff52a68af3
parent4868bc94b8c4ebcf427ea6d321332d8b8fe6ce4a
direct.py: fix getting image name

part.rootfs_dir was used as an image name in the code.
However, when multi-rootfs feature is used this attribute
points to the name of the rootfs, e.g. if --rootfs command line
is rootfs1=core-image-minimal partf.rootfs_dir is 'rootfs1'.

The code also fails when image name is not provided in wic
commandline. For example, when wic is called with
--rootfs-dir=<path> part.rootfs_dir will contain path and
wic will crash trying to call bitbake -e <path> to get
value of ROOTFS_SIZE variable.

Fixed the code by getting image name properly and checking
if it's not a path.

[YOCTO #10815]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/imager/direct.py