Openembedded Core Discussions
 help / color / mirror / Atom feed
* [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
@ 2015-04-07 10:21 Alexandre Belloni
  2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
  2015-04-07 10:40 ` [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Ed Bartosh
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Belloni @ 2015-04-07 10:21 UTC (permalink / raw)
  To: openembedded-core

The size comparison may fail because it is done on strings rather than
integers.

Signed-off-by: Alexandre Belloni <alexandre.belloni@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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-07 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-07 10:21 [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Alexandre Belloni
2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
2015-04-07 10:40   ` Ed Bartosh
2015-04-07 10:40 ` [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Ed Bartosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox