[OE-core] [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
Alexandre Belloni
alexandre.belloni at free-electrons.com
Tue Apr 7 10:21:58 UTC 2015
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
--
2.1.0
More information about the Openembedded-core
mailing list