Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 29 Apr 2020 06:50:30
Message-Id: 1588143019.1ffccd123f180f1aa01725fdc387564966d490e9.mgorny@gentoo
1 commit: 1ffccd123f180f1aa01725fdc387564966d490e9
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 29 06:48:52 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 29 06:50:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ffccd12
7
8 kernel-install.eclass: Print elog about symlink update
9
10 Bug: https://bugs.gentoo.org/719910
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 eclass/kernel-install.eclass | 7 +++++++
14 1 file changed, 7 insertions(+)
15
16 diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
17 index 1fdeb1bf4dc..c26af5c2e88 100644
18 --- a/eclass/kernel-install.eclass
19 +++ b/eclass/kernel-install.eclass
20 @@ -139,6 +139,7 @@ kernel-install_update_symlink() {
21 else
22 local symlink_target=$(readlink "${target}")
23 local symlink_ver=${symlink_target#${target##*/}-}
24 + local updated=
25 if [[ ${symlink_target} == ${target##*/}-* && \
26 -z ${symlink_ver//[0-9.]/} ]]
27 then
28 @@ -151,8 +152,14 @@ kernel-install_update_symlink() {
29 ebegin "Updating ${target} symlink"
30 ln -f -n -s "${target##*/}-${version}" "${target}"
31 eend ${?}
32 + updated=1
33 fi
34 fi
35 +
36 + if [[ ! ${updated} ]]; then
37 + elog "${target} points at another kernel, leaving it as-is."
38 + elog "Please use 'eselect kernel' to update it when desired."
39 + fi
40 fi
41 }