summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-08 17:10:08 +0100
committerMichał Górny <mgorny@gentoo.org>2018-07-09 18:54:46 +0200
commit9f8e8c912516f1f1beab088bf85cdd0ec4e80acf (patch)
tree61cef3ef1c8fe44f096b4d0897bc91932395fbb6 /eclass/linux-info.eclass
parentlinux-info.eclass: linux-info_get_any_version, die on failure (diff)
downloadgentoo-9f8e8c912516f1f1beab088bf85cdd0ec4e80acf.tar.gz
gentoo-9f8e8c912516f1f1beab088bf85cdd0ec4e80acf.tar.bz2
gentoo-9f8e8c912516f1f1beab088bf85cdd0ec4e80acf.zip
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.
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r--eclass/linux-info.eclass4
1 files changed, 1 insertions, 3 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 5adecb3a2696..caeb9ec0705d 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!