|
|
@ -1040,10 +1040,17 @@ class VariableClUpdateKernelSrcPath(ReadonlyVariable):
|
|
|
|
Каталог содержащий исходный код текущего ядра
|
|
|
|
Каталог содержащий исходный код текущего ядра
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
def get(self):
|
|
|
|
def get(self):
|
|
|
|
module_build_path = (
|
|
|
|
kernel_ver = self.Get('cl_update_kernel_version')
|
|
|
|
"/lib/modules/%s/build" % self.Get('cl_update_kernel_version'))
|
|
|
|
for template_path in ("/lib/modules/%s/build",
|
|
|
|
if path.exists(module_build_path):
|
|
|
|
"/usr/src/linux-%s"):
|
|
|
|
return os.readlink(module_build_path)
|
|
|
|
src_path = template_path % kernel_ver
|
|
|
|
|
|
|
|
if path.exists(src_path):
|
|
|
|
|
|
|
|
if path.islink(src_path):
|
|
|
|
|
|
|
|
return os.readlink(src_path)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return src_path
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClUpdateKernelPkg(ReadonlyVariable):
|
|
|
|
class VariableClUpdateKernelPkg(ReadonlyVariable):
|
|
|
@ -1051,11 +1058,11 @@ class VariableClUpdateKernelPkg(ReadonlyVariable):
|
|
|
|
Пакет текущего ядра
|
|
|
|
Пакет текущего ядра
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
def get(self):
|
|
|
|
def get(self):
|
|
|
|
qfile = process('/usr/bin/qfile', '-vC',
|
|
|
|
src_path = self.Get('cl_update_kernel_src_path')
|
|
|
|
self.Get('cl_update_kernel_src_path'))
|
|
|
|
if src_path:
|
|
|
|
|
|
|
|
qfile = process('/usr/bin/qfile', '-vC', src_path)
|
|
|
|
if qfile.success():
|
|
|
|
if qfile.success():
|
|
|
|
return qfile.read().partition(" ")[0]
|
|
|
|
return qfile.read().partition(" ")[0]
|
|
|
|
else:
|
|
|
|
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|