Skip to content

Commit

Permalink
linux-info.eclass: linux-info_get_any_version, die on failure
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgorny committed Jul 9, 2018
1 parent 0480976 commit f9f0160
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eclass/linux-info.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f9f0160

Please sign in to comment.