mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-01 18:42:22 +02:00
eclass/linux-mod-r1: Sync with Gentoo
It's from Gentoo commit c8af7eb1285a2683460618b71e2e9a14ca6badcd.
This commit is contained in:
parent
85222d3221
commit
51b7480a72
@ -106,7 +106,7 @@ case ${EAPI} in
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
if [[ ! ${_LINUX_MOD_R1_ECLASS} ]]; then
|
||||
if [[ -z ${_LINUX_MOD_R1_ECLASS} ]]; then
|
||||
_LINUX_MOD_R1_ECLASS=1
|
||||
|
||||
inherit dist-kernel-utils edo linux-info multiprocessing toolchain-funcs
|
||||
@ -329,7 +329,7 @@ fi
|
||||
# (normally these should not be used directly, for custom builds)
|
||||
# 3. perform various sanity checks to fail early on issues
|
||||
linux-mod-r1_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_MODULES_GLOBAL[ran:pkg_setup]=1
|
||||
_modules_check_function ${#} 0 0 || return 0
|
||||
|
||||
@ -409,7 +409,7 @@ linux-mod-r1_pkg_setup() {
|
||||
# different make arguments per modules or intermediate steps -- albeit,
|
||||
# if atypical, may want to build manually (see eclass' example).
|
||||
linux-mod-r1_src_compile() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 0 0 || return 0
|
||||
|
||||
[[ ${modlist@a} == *a* && ${#modlist[@]} -gt 0 ]] ||
|
||||
@ -480,7 +480,7 @@ linux-mod-r1_src_compile() {
|
||||
# Installs modules built by linux-mod-r1_src_compile using
|
||||
# linux_domodule, then runs modules_post_process and einstalldocs.
|
||||
linux-mod-r1_src_install() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 0 0 || return 0
|
||||
|
||||
(( ${#_MODULES_INSTALL[@]} )) ||
|
||||
@ -502,7 +502,7 @@ linux-mod-r1_src_install() {
|
||||
# @DESCRIPTION:
|
||||
# Updates module dependencies using depmod.
|
||||
linux-mod-r1_pkg_postinst() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 0 0 || return 0
|
||||
|
||||
dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
|
||||
@ -534,7 +534,7 @@ linux-mod-r1_pkg_postinst() {
|
||||
#
|
||||
# See also linux_moduleinto.
|
||||
linux_domodule() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 1 '' "<module>..." || return 0
|
||||
(
|
||||
# linux-mod-r0 formerly supported INSTALL_MOD_PATH (bug #642240), but
|
||||
@ -559,7 +559,7 @@ linux_domodule() {
|
||||
# this is like setting INSTALL_MOD_DIR which has the same default
|
||||
# for external modules.
|
||||
linux_moduleinto() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 1 1 "<install-dir>" || return 0
|
||||
_MODULES_GLOBAL[moduleinto]=${1}
|
||||
}
|
||||
@ -582,7 +582,7 @@ linux_moduleinto() {
|
||||
# if modules were unexpectedly pre-compressed possibly due to using
|
||||
# make install without passing MODULES_MAKEARGS to disable it.
|
||||
modules_post_process() {
|
||||
debug-print-function ${FUNCNAME[0]} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_modules_check_function ${#} 0 1 '[<path>]' || return 0
|
||||
[[ ${EBUILD_PHASE} == install ]] ||
|
||||
die "${FUNCNAME[0]} can only be called in the src_install phase"
|
||||
|
Loading…
x
Reference in New Issue
Block a user