summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-15 02:26:52 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-15 02:26:52 +0100
commit152a6bc119e05c6c6da85b2fce57feb8c31d80b1 (patch)
tree92ba9f0b4c56acd5bbe6a9bcab07ca09fb62feb1 /eclass
parentd4be17a40855a064f44debc16c4ec9b501547a26 (diff)
gentoo auto-resync : 15:08:2022 - 02:26:52
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36993 -> 36992 bytes
-rw-r--r--eclass/linux-info.eclass18
2 files changed, 18 insertions, 0 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index d64233181998..4372d5f9385f 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 8925f83b6695..82bc7fe53950 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -140,6 +140,16 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
# A read-only variable. It's a string containing the kernel object directory, will be KV_DIR unless
# KBUILD_OUTPUT is used. This should be used for referencing .config.
+
+# @ECLASS_VARIABLE: SKIP_KERNEL_CHECK
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Do not check for kernel sources or a running kernel version
+# Main use-case is for chroots
+# This is a user flag and should under _no circumstances_ be set in the ebuild.
+: ${SKIP_KERNEL_CHECK:=""}
+
# And to ensure all the weirdness with crosscompile
inherit toolchain-funcs
[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
@@ -339,6 +349,9 @@ linux_config_path() {
# This function verifies that the current kernel is configured (it checks against the existence of .config)
# otherwise it dies.
require_configured_kernel() {
+
+ [[ -n ${SKIP_KERNEL_CHECK} ]] && return
+
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
@@ -489,6 +502,8 @@ get_version() {
local tmplocal
+ [[ -n ${SKIP_KERNEL_CHECK} ]] && return
+
# no need to execute this twice assuming KV_FULL is populated.
# we can force by unsetting KV_FULL
[ -n "${KV_FULL}" ] && return 0
@@ -697,6 +712,9 @@ check_kernel_built() {
fi
# if we haven't determined the version yet, we need to
+
+ [[ -n ${SKIP_KERNEL_CHECK} ]] && return
+
require_configured_kernel
local versionh_path