提交 27c3bffd 编写于 作者: J Jiri Kosina 提交者: Michal Marek

kbuild/mkspec: support 'update-bootloader'-based systems

When uninstalling kernel RPM, we're unconditionally calling
"new-kernel-pkg --remove". This is useless on systems which are based on
'update-bootloader' script instead.

Support update-bootloader removal method as well in case the script is
present; contrary to new-kernel-pkg, this needs to be done in %postun,
otherwise update-bootloader will refuse to remove entry for kernel for
which the binary still exists.
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Signed-off-by: NMichal Marek <mmarek@suse.com>
上级 f931362b
......@@ -143,6 +143,11 @@ echo "if [ -x /sbin/new-kernel-pkg ]; then"
echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
echo "fi"
echo ""
echo "%postun"
echo "if [ -x /sbin/update-bootloader ]; then"
echo "/sbin/update-bootloader --remove $KERNELRELEASE"
echo "fi"
echo ""
echo "%files"
echo '%defattr (-, root, root)'
echo "/lib/modules/$KERNELRELEASE"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册