Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions python/funtoo/boot/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def resolvedev(self, dev):
else:
return dev

def GetMatchingKernels(self, scanpath, globlist, skip=None):
def GetMatchingKernels(self, scanpath, globlist, skip=None, bare=False):
# find kernels in scanpath that match globs in globlist, and return them
found = []
if skip is None:
Expand All @@ -86,7 +86,10 @@ def GetMatchingKernels(self, scanpath, globlist, skip=None):
continue
# append the matching kernel, and "" representing that no
# [-v] extension was used
found.append([match, "", os.path.getmtime(match)])
if bare:
found.append(match)
else:
found.append([match, "", os.path.getmtime(match)])
if base_glob != wild_glob:
for match in glob.glob(wild_glob):
if match not in skip and match not in found:
Expand All @@ -95,7 +98,10 @@ def GetMatchingKernels(self, scanpath, globlist, skip=None):
continue
# append the matching kernel, and the literal [-v]
# extension that was found on this kernel
found.append([match, match[len(scanpath) + 1 + pattern.find("["):], os.path.getmtime(match)])
if bare:
found.append(match)
else:
found.append([match, match[len(scanpath) + 1 + pattern.find("["):], os.path.getmtime(match)])
return found

def microcode_initialize(self):
Expand Down Expand Up @@ -361,7 +367,7 @@ def _GenerateLinuxSection(self,
self.mount_if_necessary(scanpath)
if len(skiplist):
# find kernels to skip...
matches = self.GetMatchingKernels(scanpath, skiplist)
matches = self.GetMatchingKernels(scanpath, skiplist, bare=True)
skipmatch += matches
if len(findlist):
# find kernels to match (skipping any kernels we should skip...)
Expand Down