summaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-04-07 15:00:54 +0200
committerMichal Marek <mmarek@suse.com>2016-04-20 10:01:30 +0200
commit27c3bffd230abd0a598586aed0fe0ba7b61e0e2e (patch)
treef1f2c3b14d6de2dd5aa8971494245b35d30ef5ff /scripts/package
parentf931362b38191016b7a6dc31d90a515b37658e02 (diff)
downloadop-kernel-dev-27c3bffd230abd0a598586aed0fe0ba7b61e0e2e.zip
op-kernel-dev-27c3bffd230abd0a598586aed0fe0ba7b61e0e2e.tar.gz
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: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/mkspec5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index b6de63c..57673ba 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"
OpenPOWER on IntegriCloud