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