1 |
commit: 9f8e8c912516f1f1beab088bf85cdd0ec4e80acf |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 8 16:10:08 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 9 16:54:46 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f8e8c91 |
7 |
|
8 |
linux-info.eclass: Move get_version to require_configured_kernel |
9 |
|
10 |
All require_configured_kernel calls in this eclass are followed |
11 |
by a get_version call. Since even calling it proactively wouldn't hurt, |
12 |
move it to require_configured_kernel. This saves us from having |
13 |
to manually implement error handling for it everywhere. |
14 |
|
15 |
eclass/linux-info.eclass | 4 +--- |
16 |
1 file changed, 1 insertion(+), 3 deletions(-) |
17 |
|
18 |
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass |
19 |
index 5adecb3a269..caeb9ec0705 100644 |
20 |
--- a/eclass/linux-info.eclass |
21 |
+++ b/eclass/linux-info.eclass |
22 |
@@ -295,6 +295,7 @@ require_configured_kernel() { |
23 |
qeerror "it points to the necessary object directory so that it might find .config." |
24 |
die "Kernel not configured; no .config found in ${KV_OUT_DIR}" |
25 |
fi |
26 |
+ get_version |
27 |
} |
28 |
|
29 |
# @FUNCTION: linux_chkconfig_present |
30 |
@@ -646,7 +647,6 @@ linux-info_get_any_version() { |
31 |
check_kernel_built() { |
32 |
# if we haven't determined the version yet, we need to |
33 |
require_configured_kernel |
34 |
- get_version |
35 |
|
36 |
local versionh_path |
37 |
if kernel_is -ge 3 7; then |
38 |
@@ -676,7 +676,6 @@ check_kernel_built() { |
39 |
check_modules_supported() { |
40 |
# if we haven't determined the version yet, we need too. |
41 |
require_configured_kernel |
42 |
- get_version |
43 |
|
44 |
if ! linux_chkconfig_builtin "MODULES"; then |
45 |
eerror "These sources do not support loading external modules." |
46 |
@@ -831,7 +830,6 @@ check_extra_config() { |
47 |
check_zlibinflate() { |
48 |
# if we haven't determined the version yet, we need to |
49 |
require_configured_kernel |
50 |
- get_version |
51 |
|
52 |
# although I restructured this code - I really really really dont support it! |