From: Luis Claudio R. Goncalves on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2391#note_1348...
@prudo1 you have a great point wrt the token not being known at that point. I
have the impression that even though the kernel does not point to the type 1
entry in /boot/loader/entries, the uninstall script ties that to the kernel
version. Not sure if that would happen to the type 2 entry, if that would be
removed during kernel uninstall or left there.
If the suggestion below does not solve the problem, I am OK with leaving it
out of the %files section. The suggestion is tying the %ghost file to the
kernel version, something long the lines of:
`%ghost
/%{image_install_path}/efi/EFI/Linux/*-%{KVERREL}%{?3:+%{3}}-virt.efi\`
So, if existing, a type 2 file with the same Version and Release of the kernel
would be tied to that kernel.