summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-08 17:04:52 +0100
committerMichał Górny <mgorny@gentoo.org>2018-07-09 18:54:45 +0200
commitf9f016032cbd8f804c9144629b595008e966cdaa (patch)
tree42885b85f31f66fb026c7385a3ca31d50774c161 /eclass
parentlinux-info.eclass: Replace unnecessary $? checks (diff)
downloadgentoo-f9f016032cbd8f804c9144629b595008e966cdaa.tar.gz
gentoo-f9f016032cbd8f804c9144629b595008e966cdaa.tar.bz2
gentoo-f9f016032cbd8f804c9144629b595008e966cdaa.zip
linux-info.eclass: linux-info_get_any_version, die on failure
Make linux-info_get_any_version die if it can't determine any version of the Linux kernel. This indicates a problem with the eclass code (as it should not happen on Linux) and the missing KV_* variables are going to cause random misbehavior and failures.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-info.eclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index d5eb0e73fcfa..5adecb3a2696 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -630,7 +630,9 @@ get_running_version() {
linux-info_get_any_version() {
if ! get_version; then
ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
- get_running_version
+ if ! get_running_version; then
+ die "Unable to determine any Linux Kernel version, please report a bug"
+ fi
fi
}