]> code.ossystems Code Review - openembedded-core.git/commitdiff
vercmp: don't choke on empty first version components
authorChris Larson <chris_larson@mentor.com>
Fri, 26 Nov 2010 21:11:06 +0000 (14:11 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:45 +0000 (14:46 +0000)
(Bitbake rev: e75aa94e9477933c5a40021b2a8e844db54f29da)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/utils.py

index 4208c793435d7ae35303f81df32e3356da246cf0..e4c12fd1ab896d2d42b43244ed64bf049ca902a7 100644 (file)
@@ -93,7 +93,7 @@ def vercmp(ta, tb):
     (ea, va, ra) = ta
     (eb, vb, rb) = tb
 
-    r = int(ea)-int(eb)
+    r = int(ea or 0) - int(eb or 0)
     if (r == 0):
         r = vercmp_part(va, vb)
     if (r == 0):