ALT Linux Bugzilla
– Attachment 8474 Details for
Bug 34314
Удаляет все подряд ядра одного FLAVOR
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
protect latest kernel from removing
0001-remove-old-kernels-check-for-latest-kernel.patch (text/plain), 1.06 KB, created by
Олег Соловьев
on 2019-12-19 11:47:13 MSK
(
hide
)
Description:
protect latest kernel from removing
Filename:
MIME Type:
Creator:
Олег Соловьев
Created:
2019-12-19 11:47:13 MSK
Size:
1.06 KB
patch
obsolete
>From 5e37d67ac18de3815e589b59837865bf65478a53 Mon Sep 17 00:00:00 2001 >From: Oleg Solovyov <mcpain@altlinux.org> >Date: Thu, 19 Dec 2019 11:38:46 +0300 >Subject: [PATCH] remove-old-kernels: check for latest kernel > >ALTBUG: #34314 >When flavor specified, find out which kernel is latest and protect it >from removing. >--- > remove-old-kernels | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/remove-old-kernels b/remove-old-kernels >index 735373b..2188357 100755 >--- a/remove-old-kernels >+++ b/remove-old-kernels >@@ -83,6 +83,15 @@ do > if [ "$current_kernel_flavour" = "$kernel_flavour" ] ; then > comparever="$(rpmevrcmp "$current_kernel_package" "$kernel")" > [ "$comparever" -lt 0 ] && continue >+ else >+ # check if kernel is latest with given flavour >+ latest=1 >+ for kernel2 in $old_kernels >+ do >+ comparever="$(rpmevrcmp "$kernel" "$kernel2")" >+ [ "$comparever" -lt 0 ] && latest=0 >+ done >+ [ "$latest" -eq 1 ] && continue > fi > echo " $kernel" > apt_args_list="$apt_args_list $(rpm -q --queryformat '%{NAME}=%{EPOCH}:%{VERSION}-%{RELEASE}\n' $kernel \ >-- >2.24.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34314
: 8474