[OE-core] [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Apr 7 10:40:06 UTC 2015
On Tue, Apr 07, 2015 at 12:21:58PM +0200, Alexandre Belloni wrote:
> The size comparison may fail because it is done on strings rather than
> integers.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
> ---
> scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
> index cf6236a04f91..ba7fda787ed7 100644
> --- a/scripts/lib/wic/plugins/source/rawcopy.py
> +++ b/scripts/lib/wic/plugins/source/rawcopy.py
> @@ -77,7 +77,7 @@ class RawCopyPlugin(SourcePlugin):
> out = exec_cmd(du_cmd)
> filesize = out.split()[0]
>
> - if filesize > part.size:
> + if int(filesize) > int(part.size):
> part.size = filesize
>
> part.source_file = dst
Acked-by: Ed Bartosh <ed.bartosh at linux.intel.com>
--
Regards,
Ed
More information about the Openembedded-core
mailing list