fix(dracut-strip-trigger): support other kernels (#5798) (#5801)

also account for stuff like `kernel-cachyos` which provides `installonlypkg(kernel)`


(cherry picked from commit a6b260e24c)

Signed-off-by: madomado <madonuko@outlook.com>
Co-authored-by: madomado <madonuko@outlook.com>
This commit is contained in:
Raboneko
2025-07-09 05:40:19 -07:00
committed by GitHub
parent a096330a51
commit dba88235ad
@@ -1,6 +1,6 @@
Name: dracut-strip-trigger
Version: 0
Release: 1%?dist
Release: 2%?dist
Summary: Strip initramfs aggressively
License: GPL-3.0-only
Requires(post): dracut
@@ -29,7 +29,7 @@ dracut --force --parallel --regenerate-all --hostonly --strip --aggressive-strip
echo 'All non-rescue initramfs have been regenerated.'
echo 'If you have problems booting up, use the rescue image, then uninstall `%name`.'
%triggerin -- kernel
%triggerin -- installonlypkg(kernel)
dracut --force --hostonly --strip --aggressive-strip
%postun