Sort by release component integer values rather than using standard string
authorJelmer Vernooij <jelmer@canonical.com>
Sat, 12 Mar 2011 00:09:31 +0000 (01:09 +0100)
committerJelmer Vernooij <jelmer@canonical.com>
Sat, 12 Mar 2011 00:09:31 +0000 (01:09 +0100)
sort.

This makes sure tevent 0.9.9 is considered to be older than 0.9.10 and 0.9.11

buildtools/wafsamba/samba_abi.py

index 396a7fc..05b5d4e 100644 (file)
@@ -162,7 +162,8 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m
 
     f = open(vscript, mode='w')
     last_key = ""
-    for k in sorted(versions):
+    versions = sorted(versions, key=lambda x: map(int, x.split(".")))
+    for k in versions:
         symver = "%s_%s" % (libname, k)
         if symver == current_version:
             break