1 # parse kernel ABI version out of <linux/version.h>
2 def get_kernelversion(p):
5 fn = p + '/include/linux/utsrelease.h'
6 if not os.path.isfile(fn):
8 fn = p + '/include/generated/utsrelease.h'
9 if not os.path.isfile(fn):
10 fn = p + '/include/linux/version.h'
20 r = re.compile("#define UTS_RELEASE \"(.*)\"")
27 def get_kernelmajorversion(p):
29 r = re.compile("([0-9]+\.[0-9]+).*")
35 def linux_module_packages(s, d):
37 return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))