1 |
From: Mike Pagano <mpagano@g.o> |
2 |
|
3 |
As the purpose of pkg_pretend is to run sanity checks during |
4 |
dependency calculation time, provide the default implementation |
5 |
and perform CONFIG_CHECK within it. |
6 |
|
7 |
See bug #759238 |
8 |
|
9 |
Signed-off-by: Mike Pagano <mpagano@g.o> |
10 |
--- |
11 |
eclass/linux-mod.eclass | 17 ++++++++++++----- |
12 |
1 file changed, 12 insertions(+), 5 deletions(-) |
13 |
|
14 |
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass |
15 |
index 11b0fd0cf..42e541ed1 100644 |
16 |
--- a/eclass/linux-mod.eclass |
17 |
+++ b/eclass/linux-mod.eclass |
18 |
@@ -135,7 +135,7 @@ |
19 |
# It's a read-only variable. It contains the extension of the kernel modules. |
20 |
|
21 |
inherit eutils linux-info multilib toolchain-funcs |
22 |
-EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm |
23 |
+EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_pretend pkg_postinst src_install src_compile pkg_postrm |
24 |
|
25 |
case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in |
26 |
[nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; |
27 |
@@ -157,7 +157,7 @@ RDEPEND=" |
28 |
) |
29 |
${MODULES_OPTIONAL_USE:+)}" |
30 |
DEPEND="${RDEPEND} |
31 |
- ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} |
32 |
+ ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} |
33 |
sys-apps/sed |
34 |
kernel_linux? ( virtual/linux-sources virtual/libelf ) |
35 |
${MODULES_OPTIONAL_USE:+)}" |
36 |
@@ -567,6 +567,16 @@ find_module_params() { |
37 |
# default ebuild functions |
38 |
# -------------------------------- |
39 |
|
40 |
+# @FUNCTION: linux-mod_pkg_pretend |
41 |
+# @DESCRIPTION: |
42 |
+# Check the CONFIG_CHECK options |
43 |
+linux-mod_pkg_pretend() { |
44 |
+ |
45 |
+ debug-print-function ${FUNCNAME} $* |
46 |
+ # External modules use kernel symbols (bug #591832, #759238) |
47 |
+ CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS" |
48 |
+} |
49 |
+ |
50 |
# @FUNCTION: linux-mod_pkg_setup |
51 |
# @DESCRIPTION: |
52 |
# It checks the CONFIG_CHECK options (see linux-info.eclass(5)), verifies that the kernel is |
53 |
@@ -589,9 +599,6 @@ linux-mod_pkg_setup() { |
54 |
return |
55 |
fi |
56 |
|
57 |
- # External modules use kernel symbols (bug #591832) |
58 |
- CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS" |
59 |
- |
60 |
linux-info_pkg_setup; |
61 |
require_configured_kernel |
62 |
check_kernel_built; |
63 |
-- |
64 |
2.31.1 |