[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. 72c8e53f3bf6d06b31972668eefa7747148aeefd

David Wendt dcrkid at yahoo.com
Thu Jun 18 22:03:22 UTC 2009


The following commit has been merged in the master branch:
commit 007ab102b6484ed2b9a60bf9ea66e27de93789a9
Author: David Wendt <dcrkid at yahoo.com>
Date:   Thu Jun 18 17:11:54 2009 -0400

    Fixed debian/distro.py xen_kernel_version so that it can find Xen kernels on Debian

diff --git a/VMBuilder/plugins/debian/distro.py b/VMBuilder/plugins/debian/distro.py
index 199994a..67a8a53 100644
--- a/VMBuilder/plugins/debian/distro.py
+++ b/VMBuilder/plugins/debian/distro.py
@@ -163,14 +163,24 @@ EOT''')
     def xen_kernel_version(self):
         if self.suite.xen_kernel_flavour:
             if not self.xen_kernel:
-                rmad = run_cmd('rmadison', 'linux-image-%s' % self.suite.xen_kernel_flavour)
+                rmad = run_cmd('rmadison', 'linux-image-2.6-%s-%s' % (self.suite.xen_kernel_flavour, self.vm.arch))
                 version = ['0', '0','0', '0']
 
                 for line in rmad.splitlines():
                     sline = line.split('|')
                     
-                    if sline[2].strip().startswith(self.vm.suite):
+                    #Linux XEN kernel is referred to in Debian by rmadison as:
+                    #linux-image-2.6-xen-amd64 | 2.6.18+6etch3 |     oldstable | amd64
+                    #Specifically, etch is called 'oldstable' in the 3rd field, to get the suite you need
+                    #excavate it from the 2nd field.
+
+                    if sline[1].strip().count(self.vm.suite) > 0:
+                        #Fix for Debian handling of kernel version names
+                        #It's x.y.z+w, not x.y.z.w
                         vt = sline[1].strip().split('.')
+			deb_vt = vt[2].split('+')
+			vt = [vt[0], vt[1], deb_vt[0], deb_vt[1]]
+
                         for i in range(4):
                             if int(vt[i]) > int(version[i]):
                                 version = vt

-- 
Tool for creating VM images.



More information about the Pkg-escience-soc2009 mailing list