commit: 0b7fdcf2a3714570eccc0d974265320194d50922
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 13:25:05 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 14:08:33 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b7fdcf2
kernel-install.eclass: Update symlink if target has no sources
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/kernel-install.eclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 107a526c328..860105feb8b 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -89,6 +89,9 @@ kernel-install_can_update_symlink() {
# if the symlink does not exist or is broken, update
[[ ! -e ${target} ]] && return 0
+ # if the target does not seem to contain kernel sources
+ # (i.e. is probably a leftover directory), update
+ [[ ! -e ${target}/Makefile ]] && return 0
local symlink_target=$(readlink "${target}")
# the symlink target should start with the same basename as target