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 37a60b430646..177cb7fafcde 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! -- 2.16.2