From: Philipp Rudo on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2391#note_1348...
Uninstalling isn't a problem for type 2 entries as they are currently
explicitly removed in %postun. So at least in this case you don't need to have
an entry in %files.
Using a wildcard was also my alternative solution. Originally I refrained from
using it as you could construct situations where it doesn't work as intended.
In particular you could have a dual boot system with identical kernel versions
but different machine-ids. Using the wildcard could then lead to situations
where system A claims ownership over a UKI installed by system B and thus
breaking it. But that's more a theoretical problem.
Anyway, please see v2.