eclass/linux-mod-r1: Sync with Gentoo

It's from Gentoo commit 54e6dfe511a93656092b9672755b857136daab79.
This commit is contained in:
Flatcar Buildbot 2025-01-13 07:07:47 +00:00 committed by Krzesimir Nowak
parent d2cdf693ca
commit 02c582efaf

View File

@ -1,4 +1,4 @@
# Copyright 2023-2024 Gentoo Authors
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-mod-r1.eclass
@ -333,7 +333,7 @@ linux-mod-r1_pkg_setup() {
_MODULES_GLOBAL[ran:pkg_setup]=1
_modules_check_function ${#} 0 0 || return 0
if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
if [[ ${MODULES_INITRAMFS_IUSE} ]] &&
use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
then
# Check, but don't die because we can fix the problem and then
@ -508,7 +508,7 @@ linux-mod-r1_pkg_postinst() {
dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
_modules_update_depmod
if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
if [[ ${MODULES_INITRAMFS_IUSE} ]] &&
use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
then
dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
@ -1263,7 +1263,8 @@ _modules_set_makeargs() {
# these are only needed if using these arguments for installing, lets
# eclass handle strip, sign, compress, and depmod (CONFIG_ should
# have no impact on building, only used by Makefile.modinst)
CONFIG_MODULE_{SIG_ALL,COMPRESS_{GZIP,XZ,ZSTD}}=
# note: COMPRESS_ALL is enough for kernel >=6.12, rest is for compat
CONFIG_MODULE_{SIG_ALL,COMPRESS_{ALL,GZIP,XZ,ZSTD}}=
DEPMOD=true #916587
STRIP=true
)