Fix detect initrd files (initrd and initrd-install).

develop
Mike Hiretsky 14 years ago
parent f1c1b17a1f
commit 2943cbe099

@ -255,7 +255,7 @@ class varsShare:
filesWithType = map(lambda x:(x,ftype(x)), filelist)
return filter(lambda x:descr in x[1],filesWithType)
def getInitrd(self,arch,shortname,chroot,kernel,suffix=""):
def getInitrd(self,arch,shortname,chroot,kernel,suffix="",notsuffix=""):
"""Get initrd for kernel"""
reInitrdVer = re.compile("(initrd|initramfs)-(.+?)(-install)?$",re.S)
def initrd_version_by_name(filename):
@ -277,8 +277,9 @@ class varsShare:
initramfsFiles = self.getFilesByType(bootdir,"ASCII cpio archive")
initramfsWithVer = \
filter(lambda x: (kernelVersion in x[1] or
origKernelVer in x[1]) and \
x[0].endswith(suffix),
origKernelVer in x[1]) and \
x[0].endswith(suffix) and \
(not notsuffix or not x[0].endswith(notsuffix)),
map(lambda x:(x[0],initrd_version_by_name(x[0])),
initramfsFiles))
if initramfsWithVer:

Loading…
Cancel
Save