Fix detect current version if not has install images.

master
Mike Hiretsky 13 years ago
parent 64a85e0caa
commit 51424b5812

@ -838,6 +838,8 @@ class fillVars(object, glob_attr):
def get_os_install_linux_ver(self):
"""Linux version of installation os"""
if self.Get('cl_action') != "system":
return self.Get('os_linux_ver')
imagename = self.getImage(self.Get('os_install_scratch'),
self.Get('os_install_root_type'),
self.Get('cl_image_path'),
@ -845,8 +847,6 @@ class fillVars(object, glob_attr):
self.Get('os_install_linux_shortname'))
if not imagename and self.Get('cl_action') != 'merge':
return ""
if self.Get('cl_action') != "system":
return self.Get('os_linux_ver')
d = DistributiveRepository()._getfromcontent(imagename)
if "linuxver" in d and d['linuxver'] != "0":
return d['linuxver']

Loading…
Cancel
Save