From 1ffccd123f180f1aa01725fdc387564966d490e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 29 Apr 2020 08:48:52 +0200 Subject: [PATCH] kernel-install.eclass: Print elog about symlink update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug: https://bugs.gentoo.org/719910 Signed-off-by: Michał Górny --- eclass/kernel-install.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 1fdeb1bf4dc7..c26af5c2e88b 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -139,6 +139,7 @@ kernel-install_update_symlink() { else local symlink_target=$(readlink "${target}") local symlink_ver=${symlink_target#${target##*/}-} + local updated= if [[ ${symlink_target} == ${target##*/}-* && \ -z ${symlink_ver//[0-9.]/} ]] then @@ -151,8 +152,14 @@ kernel-install_update_symlink() { ebegin "Updating ${target} symlink" ln -f -n -s "${target##*/}-${version}" "${target}" eend ${?} + updated=1 fi fi + + if [[ ! ${updated} ]]; then + elog "${target} points at another kernel, leaving it as-is." + elog "Please use 'eselect kernel' to update it when desired." + fi fi } -- 2.26.2