Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 21 Sep 2018 12:15:10
Message-Id: 1537532098.62b702e95d6ec8597aa918f8bf6e280710728eae.whissi@gentoo
1 commit: 62b702e95d6ec8597aa918f8bf6e280710728eae
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 21 11:30:50 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 21 12:14:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62b702e9
7
8 linux-mod.eclass: fix use of variables for EAPI=7
9
10 Since EAPI 7, variables like "D" no longer have a trailing slash.
11 However, linux-mod_pkg_preinst relied on a traling slash.
12
13 Due to that, any EAPI=7 ebuilds using linux-mod eclass to install
14 kernel modules didn't run DEPMOD and weren't added to MODULESDB.
15
16 eclass/linux-mod.eclass | 16 ++++++++--------
17 1 file changed, 8 insertions(+), 8 deletions(-)
18
19 diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
20 index e5b5ec782f0..920790b8db9 100644
21 --- a/eclass/linux-mod.eclass
22 +++ b/eclass/linux-mod.eclass
23 @@ -1,4 +1,4 @@
24 -# Copyright 1999-2016 Gentoo Foundation
25 +# Copyright 1999-2018 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27
28 # @ECLASS: linux-mod.eclass
29 @@ -244,7 +244,7 @@ update_depmod() {
30 ebegin "Updating module dependencies for ${KV_FULL}"
31 if [ -r "${KV_OUT_DIR}"/System.map ]
32 then
33 - depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" ${KV_FULL}
34 + depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT:-/}" ${KV_FULL}
35 eend $?
36 else
37 ewarn
38 @@ -263,8 +263,8 @@ update_depmod() {
39 move_old_moduledb() {
40 debug-print-function ${FUNCNAME} $*
41
42 - local OLDDIR="${ROOT}"/usr/share/module-rebuild/
43 - local NEWDIR="${ROOT}"/var/lib/module-rebuild/
44 + local OLDDIR="${ROOT%/}"/usr/share/module-rebuild
45 + local NEWDIR="${ROOT%/}"/var/lib/module-rebuild
46
47 if [[ -f "${OLDDIR}"/moduledb ]]; then
48 [[ ! -d "${NEWDIR}" ]] && mkdir -p "${NEWDIR}"
49 @@ -283,7 +283,7 @@ move_old_moduledb() {
50 update_moduledb() {
51 debug-print-function ${FUNCNAME} $*
52
53 - local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
54 + local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
55 move_old_moduledb
56
57 if [[ ! -f "${MODULEDB_DIR}"/moduledb ]]; then
58 @@ -306,7 +306,7 @@ update_moduledb() {
59 remove_moduledb() {
60 debug-print-function ${FUNCNAME} $*
61
62 - local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
63 + local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
64 move_old_moduledb
65
66 if grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
67 @@ -731,8 +731,8 @@ linux-mod_pkg_preinst() {
68 debug-print-function ${FUNCNAME} $*
69 [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return
70
71 - [ -d "${D}lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
72 - [ -d "${D}lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
73 + [ -d "${D%/}/lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
74 + [ -d "${D%/}/lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
75 }
76
77 # @FUNCTION: linux-mod_pkg_postinst