linux-info.eclass: require_configured_kernel, improve error handling
authorMichał Górny <mgorny@gentoo.org>
Thu, 8 Mar 2018 16:12:09 +0000 (17:12 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 9 Jul 2018 16:54:46 +0000 (18:54 +0200)
Add error handling for failing get_version call
in require_configured_kernel. Give just a simple 'die' message since
the get_version function should verbosely explain the problem.

eclass/linux-info.eclass

index caeb9ec0705db0a852252c11ed3263269e55e690..5795219a880b4cfce786c995a73592ac7a6791bd 100644 (file)
@@ -295,7 +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
+       get_version || die "Unable to determine configured kernel version"
 }
 
 # @FUNCTION: linux_chkconfig_present