• [gentoo-dev] [PATCH 3/5] linux-mod-r1.eclass: move modlist processing i

    From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 14:00:02 2025
    Does not really change anything but avoids duplication in dkms.eclass

    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 78 +++++++++++++++++++++++++-------------
    1 file changed, 51 insertions(+), 27 deletions(-)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index 16c280219ef8..fd83324fa35d 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -412,46 +412,20 @@ linux-mod-r1_src_compile() {
    debug-print-function ${FUNCNAME} "$@"
    _modules_check_function ${#} 0 0 || return 0

    - [[ ${modlist@a} == *a* && ${#modlist[@]} -gt 0 ]] ||
    - die "${FUNCNAME[0]} was called without a 'modlist' array"
    -
    # run this again to verify built files access with src_compile's user
    _modules_sanity_kernelbuilt

    - local -a emakeargs=( "${MODULES_MAKEARGS[@]}" )
    - [[ ${modargs@a} == *a* ]] && emakeargs+=( "${modargs[@]}" )
    + modules_process_modlist

    local -A built=()
    local build mod name target
    for mod in "${modlist[@]}"; do
    - # note modlist was not made an associative array ([name]=) to preserve
    - # ordering, but is still using = to