Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/6] kernel-install.eclass: Update symlink before installing
Date: Wed, 13 Jan 2021 14:35:54
Message-Id: 20210113143516.1766-3-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/6] kernel-install.eclass: dracut uefi=yes support + improved error handling by "Michał Górny"
1 Update symlink before actually installing the kernel. This primarily
2 ensures that module rebuilds triggered by the upgrade will work
3 correctly even if postinst fails. Besides, pkg_config() retries
4 installing the kernel but does not update the symlink.
5
6 Signed-off-by: Michał Górny <mgorny@g.o>
7 ---
8 eclass/kernel-install.eclass | 3 +--
9 1 file changed, 1 insertion(+), 2 deletions(-)
10
11 diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
12 index b1d48b6b3b5a..33ff69fc2528 100644
13 --- a/eclass/kernel-install.eclass
14 +++ b/eclass/kernel-install.eclass
15 @@ -367,12 +367,11 @@ kernel-install_pkg_postinst() {
16 debug-print-function ${FUNCNAME} "${@}"
17
18 local ver="${PV}${KV_LOCALVERSION}"
19 + kernel-install_update_symlink "${EROOT}/usr/src/linux" "${ver}"
20
21 if [[ -z ${ROOT} ]]; then
22 kernel-install_install_all "${ver}"
23 fi
24 -
25 - kernel-install_update_symlink "${EROOT}/usr/src/linux" "${ver}"
26 }
27
28 # @FUNCTION: kernel-install_pkg_prerm
29 --
30 2.30.0