1 |
Make the check_extra_config and pkg_setup calls no-op on non-Linux |
2 |
systems. Those systems don't have a Linux kernel, so they obviously |
3 |
can't satisfy the requirements. This currently results in a lot of |
4 |
useless warnings about missing Linux kernel sources on FreeBSD. We could |
5 |
make it conditional per-package but there is really no point in adding |
6 |
a lot of conditionals everywhere if this eclass can't ever work |
7 |
on non-Linux. |
8 |
--- |
9 |
eclass/linux-info.eclass | 8 +++++++- |
10 |
1 file changed, 7 insertions(+), 1 deletion(-) |
11 |
|
12 |
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass |
13 |
index 5ffaf3f3b898..0ba7ff7755c7 100644 |
14 |
--- a/eclass/linux-info.eclass |
15 |
+++ b/eclass/linux-info.eclass |
16 |
@@ -110,6 +110,8 @@ inherit toolchain-funcs versionator |
17 |
|
18 |
EXPORT_FUNCTIONS pkg_setup |
19 |
|
20 |
+IUSE="kernel_linux" |
21 |
+ |
22 |
# Overwritable environment Var's |
23 |
# --------------------------------------- |
24 |
KERNEL_DIR="${KERNEL_DIR:-${ROOT}usr/src/linux}" |
25 |
@@ -688,8 +690,10 @@ check_modules_supported() { |
26 |
# @FUNCTION: check_extra_config |
27 |
# @DESCRIPTION: |
28 |
# It checks the kernel config options specified by CONFIG_CHECK. It dies only when a required config option (i.e. |
29 |
-# the prefix ~ is not used) doesn't satisfy the directive. |
30 |
+# the prefix ~ is not used) doesn't satisfy the directive. Ignored on non-Linux systems. |
31 |
check_extra_config() { |
32 |
+ use kernel_linux || return |
33 |
+ |
34 |
local config negate die error reworkmodulenames |
35 |
local soft_errors_count=0 hard_errors_count=0 config_required=0 |
36 |
# store the value of the QA check, because otherwise we won't catch usages |
37 |
@@ -902,6 +906,8 @@ check_zlibinflate() { |
38 |
# Force a get_version() call when inherited from linux-mod.eclass and then check if the kernel is configured |
39 |
# to support the options specified in CONFIG_CHECK (if not null) |
40 |
linux-info_pkg_setup() { |
41 |
+ use kernel_linux || return |
42 |
+ |
43 |
linux-info_get_any_version |
44 |
|
45 |
if kernel_is 2 4; then |
46 |
-- |
47 |
2.16.2 |