commit: 62b702e95d6ec8597aa918f8bf6e280710728eae Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Fri Sep 21 11:30:50 2018 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Fri Sep 21 12:14:58 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62b702e9
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. eclass/linux-mod.eclass | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index e5b5ec782f0..920790b8db9 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