Skip to contentSkip to conversation

kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg

PATCH In review Javier Martinez Canillas 2 participants 2 messages Apr 11, 2018 – Apr 13, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg

The new-kernel-pkg script is only present when grubby is installed, but it may not always be the case. So if the script isn't present, attempt to use the kernel-install script as a fallback instead.

---

 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +2 -0
index 61427c6f2209..e05646dc24dc 100755
@@ -118,6 +118,8 @@ $S$M	ln -sf /usr/src/kernels/$KERNELRELEASE source
 	%preun
 	if [ -x /sbin/new-kernel-pkg ]; then
 	new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
+	elif [ -x /usr/bin/kernel-install ]; then
+	kernel-install remove $KERNELRELEASE
 	fi
 
 	%postun
Signature · 1 line
2.14.3
#1 lore raw

2018-04-12 3:15 GMT+09:00 Javier Martinez Canillas <[email protected]>:

Quoted 8 lines

The new-kernel-pkg script is only present when grubby is installed, but it may not always be the case. So if the script isn't present, attempt to use the kernel-install script as a fallback instead.

---

Applied to linux-kbuild. Thanks!

Quoted 23 lines
 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +2 -1
index 61427c6f2209..e05646dc24dc 100755
@@ -118,6 +118,8 @@ $S$M        ln -sf /usr/src/kernels/$KERNELRELEASE source
        %preun
        if [ -x /sbin/new-kernel-pkg ]; then
        new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
+       elif [ -x /usr/bin/kernel-install ]; then
+       kernel-install remove $KERNELRELEASE
        fi
 
        %postun
--

2.14.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Best Regards
Masahiro Yamada