* [PATCH] scripts/prune-kernel: Use kernel-install if available
@ 2022-05-04 21:27 Reza Arbab
2022-05-07 18:23 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Reza Arbab @ 2022-05-04 21:27 UTC (permalink / raw)
To: Masahiro Yamada, Michal Marek, Nick Desaulniers, linux-kbuild
Cc: J . Bruce Fields, linux-kernel
If the new-kernel-pkg utility isn't present, try using kernel-install.
This is what the %preun scriptlet in scripts/package/mkspec does too.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
Hope I've sent this to the right people. get_maintainer.pl came up
blank, but kbuild seems like the nearest match in MAINTAINERS.
scripts/prune-kernel | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/prune-kernel b/scripts/prune-kernel
index e8aa940bc0a9..dadfd0e47f89 100755
--- a/scripts/prune-kernel
+++ b/scripts/prune-kernel
@@ -16,6 +16,10 @@ do
rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
rm -rf "/lib/modules/$f"
- new-kernel-pkg --remove $f
+ if [ -x "$(command -v new-kernel-pkg)" ]; then
+ new-kernel-pkg --remove $f
+ elif [ -x "$(command -v kernel-install)" ]; then
+ kernel-install remove $f
+ fi
fi
done
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts/prune-kernel: Use kernel-install if available
2022-05-04 21:27 [PATCH] scripts/prune-kernel: Use kernel-install if available Reza Arbab
@ 2022-05-07 18:23 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2022-05-07 18:23 UTC (permalink / raw)
To: Reza Arbab
Cc: Michal Marek, Nick Desaulniers, Linux Kbuild mailing list,
J . Bruce Fields, Linux Kernel Mailing List
On Thu, May 5, 2022 at 6:27 AM Reza Arbab <arbab@linux.ibm.com> wrote:
>
> If the new-kernel-pkg utility isn't present, try using kernel-install.
> This is what the %preun scriptlet in scripts/package/mkspec does too.
>
> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
> ---
> Hope I've sent this to the right people. get_maintainer.pl came up
> blank, but kbuild seems like the nearest match in MAINTAINERS.
>
Applied to linux-kbuild. Thanks.
> scripts/prune-kernel | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
> index e8aa940bc0a9..dadfd0e47f89 100755
> --- a/scripts/prune-kernel
> +++ b/scripts/prune-kernel
> @@ -16,6 +16,10 @@ do
> rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
> rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
> rm -rf "/lib/modules/$f"
> - new-kernel-pkg --remove $f
> + if [ -x "$(command -v new-kernel-pkg)" ]; then
> + new-kernel-pkg --remove $f
> + elif [ -x "$(command -v kernel-install)" ]; then
> + kernel-install remove $f
> + fi
> fi
> done
> --
> 2.27.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-07 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04 21:27 [PATCH] scripts/prune-kernel: Use kernel-install if available Reza Arbab
2022-05-07 18:23 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox