[4/4] Revert "kbuild/mkspec: clean boot loader configuration on rpm removal"

Message ID 20240202133520.302738-4-masahiroy@kernel.org
State New
Headers
Series [1/4] kbuild: rpm-pkg: do not include depmod-generated files |

Commit Message

Masahiro Yamada Feb. 2, 2024, 1:35 p.m. UTC
  This reverts commit 6ef41e22a320d95a246d45b673aa7247cc1bbf7b.

If this is still needed, we can bring it back.

However, I'd like to understand why 'new-kernel-pkg --remove' is
needed for uninstallation, while 'new-kernel-pkg --install' was not
called during the installation.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/package/kernel.spec | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Patch

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index c1b745967f64..c256b73cca3e 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -101,9 +101,7 @@  if [ ! -e "/lib/modules/%{KERNELRELEASE}/modules.dep" ]; then
 fi
 
 %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
+if [ -x /usr/bin/kernel-install ]; then
 kernel-install remove %{KERNELRELEASE}
 fi