summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-09-21 13:30:50 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-09-21 14:14:58 +0200
commit62b702e95d6ec8597aa918f8bf6e280710728eae (patch)
tree522930eee03fd16956836a1ea8b2243556fcfcdc /eclass/linux-mod.eclass
parentmedia-fonts/symbola: fix installation of documentation (diff)
downloadgentoo-62b702e95d6ec8597aa918f8bf6e280710728eae.tar.gz
gentoo-62b702e95d6ec8597aa918f8bf6e280710728eae.tar.bz2
gentoo-62b702e95d6ec8597aa918f8bf6e280710728eae.zip
linux-mod.eclass: fix use of variables for EAPI=7
Since EAPI 7, variables like "D" no longer have a trailing slash. However, linux-mod_pkg_preinst relied on a traling slash. Due to that, any EAPI=7 ebuilds using linux-mod eclass to install kernel modules didn't run DEPMOD and weren't added to MODULESDB.
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index e5b5ec782f0c..920790b8db98 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-mod.eclass
@@ -244,7 +244,7 @@ update_depmod() {
ebegin "Updating module dependencies for ${KV_FULL}"
if [ -r "${KV_OUT_DIR}"/System.map ]
then
- depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" ${KV_FULL}
+ depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT:-/}" ${KV_FULL}
eend $?
else
ewarn
@@ -263,8 +263,8 @@ update_depmod() {
move_old_moduledb() {
debug-print-function ${FUNCNAME} $*
- local OLDDIR="${ROOT}"/usr/share/module-rebuild/
- local NEWDIR="${ROOT}"/var/lib/module-rebuild/
+ local OLDDIR="${ROOT%/}"/usr/share/module-rebuild
+ local NEWDIR="${ROOT%/}"/var/lib/module-rebuild
if [[ -f "${OLDDIR}"/moduledb ]]; then
[[ ! -d "${NEWDIR}" ]] && mkdir -p "${NEWDIR}"
@@ -283,7 +283,7 @@ move_old_moduledb() {
update_moduledb() {
debug-print-function ${FUNCNAME} $*
- local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
+ local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
move_old_moduledb
if [[ ! -f "${MODULEDB_DIR}"/moduledb ]]; then
@@ -306,7 +306,7 @@ update_moduledb() {
remove_moduledb() {
debug-print-function ${FUNCNAME} $*
- local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
+ local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
move_old_moduledb
if grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
@@ -731,8 +731,8 @@ linux-mod_pkg_preinst() {
debug-print-function ${FUNCNAME} $*
[ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return
- [ -d "${D}lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
- [ -d "${D}lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
+ [ -d "${D%/}/lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
+ [ -d "${D%/}/lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
}
# @FUNCTION: linux-mod_pkg_postinst