>>>> "LA" == Laura Abbott
<labbott(a)redhat.com> writes:
LA> The kernel uses a few scriptlets at the moment which will need to be
LA> cleaned up, most likely replaced with file triggers.
I have some experience converting things to file triggers had a quick
look. It seems we have the following:
The main kernel package messes with /etc/sysconfig/kernel to change
DEFAULTKERNEL in %post and has a %posttrans package to call
/sbin/kernel-install.
The devel packages do some magic with hardlink calls (set up by
%kernel_devel_post).
The modules and modules-extra packages have scriptlets to call depmod
(set up by %kernel_modules_post and %kernel_modules_extra_post).
These are all buried in multiple layers of macros, so getting rid of any
of this is probably a nice thing regardless of any other reasons
scriptlets are problematic.
One fun thing is that I have no idea how file triggers interact with
packages which are installed multiple times. If it works like I think
it does, each kernel package (or maybe kernel-core package) would have
something like:
%transfiletriggerin -n kernel-core -- /lib/modules/%{KVERREL}/
/sbin/depmod -a %{KVERREL}
%transfiletriggerpostun -n kernel-core -- /lib/modules/%{KVERREL}/
/sbin/depmod -a %{KVERREL}
The modules packages could then drop their scriptlets. These might need
the variant magic or whatnot.
I don't really know about the hardlink calls; it would be trivial for
something to call hardlink on /usr/src/kernels but optimizing that is
more difficult.
I would think that the bootloader package or systemd-udev would be the
proper place to put a trigger that calls kernel-install.
I don't really understand the modification of /etc/sysconfig/kernel.
In any case, it does seem that there's plenty of opportunity for useful
cleanup here.
- J<