* [PATCH] kbuild/mkspec: support 'update-bootloader'-based systems
@ 2016-04-07 13:00 Jiri Kosina
2016-04-20 8:04 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Kosina @ 2016-04-07 13:00 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, linux-kernel
From: Jiri Kosina <jkosina@suse.cz>
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: Jiri Kosina <jkosina@suse.cz>
---
scripts/package/mkspec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index b6de63c..857c37d 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -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"
--
Jiri Kosina
SUSE Labs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild/mkspec: support 'update-bootloader'-based systems
2016-04-07 13:00 [PATCH] kbuild/mkspec: support 'update-bootloader'-based systems Jiri Kosina
@ 2016-04-20 8:04 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-04-20 8:04 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Michal Marek, linux-kbuild, linux-kernel
On Thu, Apr 07, 2016 at 03:00:54PM +0200, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
>
> When uninstalling kernel RPM, we're unconditionally calling
> "new-kernel-pkg --remove".
There is of course a test whether the script exists.
> This is useless on systems which are based on
> 'update-bootloader' script instead.
Right.
> 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: Jiri Kosina <jkosina@suse.cz>
Applied to kbuild.git#misc. Let's see what other rpm-based distros are
going to need.
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-20 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07 13:00 [PATCH] kbuild/mkspec: support 'update-bootloader'-based systems Jiri Kosina
2016-04-20 8:04 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).