projg2/eclean-kernel

eclean-kernel removes icon file installed by installkernel[refind]

Closed this issue · 5 comments

sys-kernel/installkernel-28 with USE=refind set, app-admin/eclean-kernel-2.99.7
Running eclean-kernel -n 2 results in

Legend:
[-] file being removed
[x] file does not exist (anymore)
[+] file being kept (used by other kernels)

* Removing kernel other 6.8.0-gentoo.png (vmlinuz does not exist)
 [-] /boot/vmlinuz-6.8.0-gentoo.png
* Removing kernel other 6.7.9-gentoo.png (vmlinuz does not exist)
 [-] /boot/vmlinuz-6.7.9-gentoo.png
* Removing kernel other 6.7.8-gentoo (not referenced by bootloader (symlinks))
 [-] /boot/vmlinuz-6.7.8-gentoo
 [-] /usr/src/linux-6.7.8-gentoo
 [-] /lib/modules/6.7.8-gentoo
 [-] /boot/config-6.7.8-gentoo
 [-] /boot/System.map-6.7.8-gentoo
* Removing kernel other 6.7.7-gentoo (not referenced by bootloader (symlinks))
 [-] /boot/vmlinuz-6.7.7-gentoo
 [-] /usr/src/linux-6.7.7-gentoo
 [-] /lib/modules/6.7.7-gentoo
 [-] /boot/System.map-6.7.7-gentoo
 [-] /boot/config-6.7.7-gentoo
Removed 4 kernels

End content of /boot is

config-6.7.9-gentoo  config-6.8.0-gentoo  EFI  lost+found  refind_linux.conf  System.map-6.7.9-gentoo  System.map-6.8.0-gentoo  vmlinuz-6.7.9-gentoo  vmlinuz-6.8.0-gentoo

As png files have same names as accompanying kernel images, their removal should be done only when vmlinux file is deleted.

Can we see the output of eclean-kernel with the --debug argument added?

eclean-kernel --debug
DEBUG:root:Sorter: <ecleankernel.sort.VersionSort object at 0x7f244e0b33e0>
DEBUG:root:Layout failed: <class 'ecleankernel.layout.blspec.BlSpecLayout'>; exception: /boot/[EFI/]loader not found
DEBUG:root:Layout: <ecleankernel.layout.std.StdLayout object at 0x7f244e4e4560>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.lilo.LILO'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.grub2.GRUB2'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.grub.GRUB'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.yaboot.Yaboot'>
DEBUG:root:Bootloader: <ecleankernel.bootloader.symlinks.Symlinks object at 0x7f244e6e33b0>
DEBUG:root:in get_removal_list()
Legend:
[-] file being removed
[x] file does not exist (anymore)
[+] file being kept (used by other kernels)

* Removing kernel other 6.8.4-gentoo.png (vmlinuz does not exist)
 [-] /boot/vmlinuz-6.8.4-gentoo.png
Removed 1 kernels<

My bootloader lives in /boot/EFI/EFI/refind

Thanks, I think I understand the problem. I'll work on a fix after my currently open PRs have been merged.

When this hits gentoo repo?

After this has been merged: #51