Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1348093

Re: [PATCH] kbuild/mkspec: clean boot loader configuration on rpm removal

From Hannes Frederic Sowa <hannes@stressinduktion.org>
Newsgroups linux.kernel
Subject Re: [PATCH] kbuild/mkspec: clean boot loader configuration on rpm removal
Date 2016-03-02 15:40 +0100
Message-ID <r8g6u-uK-21@gated-at.bofh.it> (permalink)
References <r8fWO-pB-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02.03.2016 15:28, Paolo Abeni wrote:
> This patch add a rpm preuninstall scriptlet to cleanup the
> boot loader configuration on kernel package uninstall.
> The initrd for the to-be-removed kernel is deleted, too.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>   scripts/package/mkspec | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index fe44d68..b6de63c 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -138,6 +138,11 @@ echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot
>   echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
>   echo "fi"
>   echo ""
> +echo "%preun"
> +echo "if [ -x /sbin/new-kernel-pkg ]; then"
> +echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
> +echo "fi"
> +echo ""
>   echo "%files"
>   echo '%defattr (-, root, root)'
>   echo "/lib/modules/$KERNELRELEASE"
>

Maybe we should also switch to new-kernel-pkg for the postinstall call? 
How about switching to kernel-install?

Thanks,
Hannes

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] kbuild/mkspec: clean boot loader configuration on rpm removal Paolo Abeni <pabeni@redhat.com> - 2016-03-02 15:30 +0100
  Re: [PATCH] kbuild/mkspec: clean boot loader configuration on rpm  removal Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-03-02 15:40 +0100
    Re: [PATCH] kbuild/mkspec: clean boot loader configuration on rpm removal Josh Boyer <jwboyer@fedoraproject.org> - 2016-03-02 16:10 +0100
      Re: [PATCH] kbuild/mkspec: clean boot loader configuration on rpm  removal Paolo Abeni <pabeni@redhat.com> - 2016-03-03 10:20 +0100

csiph-web