[oe-commits] Alexandre Belloni : wic: rawcopy: ensure comparison is done on int

git at git.openembedded.org git at git.openembedded.org
Wed Apr 8 10:08:40 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: aaceb9c9a5001c9a7ac0917a85b411d71e47778b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=aaceb9c9a5001c9a7ac0917a85b411d71e47778b

Author: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Date:   Tue Apr  7 12:21:58 2015 +0200

wic: rawcopy: ensure comparison is done on int

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>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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 6bdd9b2..ca6b721 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -76,7 +76,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



More information about the Openembedded-commits mailing list