]> code.ossystems Code Review - openembedded-core.git/commit
wic: partition plugin wrongly assumes it is rootfs
authorPaulo Neves <ptsneves@gmail.com>
Sun, 25 Feb 2018 16:49:25 +0000 (17:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Mar 2018 17:08:29 +0000 (17:08 +0000)
commit654d72d55194ec41bc1aacfcc6b2c8c9a305b042
treeadf814af308862815190d19a432288b8c6d2347c
parent5055489b9ab3fda32a285d0d165d080d11a4d432
wic: partition plugin wrongly assumes it is rootfs

The partition plugin is used as the base for other plugins.
One of the methods the plugins use, is the prepare_rootfs
method.

The prepare_rootfs method wrongly assumes that the value
ROOTFS_SIZE from bitbake datastore is relevant to every
invocation of prepare_rootfs, which it clearly is not, for
example in the bootimg-partition case.

This commit adds an optional argument to prepare_rootfs
where a caller can tell prepare_rootfs if it is an actual
rootfs and whether related rootfs information retrieved from
bitbake is valid. The default behavior of this optional
argument is to assume that the invocation is an actual
rootfs, to maintain compatibility with previous
implementations.

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/partition.py
scripts/lib/wic/plugins/source/bootimg-partition.py