Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 09 Jul 2018 16:54:59
Message-Id: 1531155285.f9f016032cbd8f804c9144629b595008e966cdaa.mgorny@gentoo
1 commit: f9f016032cbd8f804c9144629b595008e966cdaa
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 8 16:04:52 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 9 16:54:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9f01603
7
8 linux-info.eclass: linux-info_get_any_version, die on failure
9
10 Make linux-info_get_any_version die if it can't determine any version
11 of the Linux kernel. This indicates a problem with the eclass code
12 (as it should not happen on Linux) and the missing KV_* variables
13 are going to cause random misbehavior and failures.
14
15 eclass/linux-info.eclass | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
19 index d5eb0e73fcf..5adecb3a269 100644
20 --- a/eclass/linux-info.eclass
21 +++ b/eclass/linux-info.eclass
22 @@ -630,7 +630,9 @@ get_running_version() {
23 linux-info_get_any_version() {
24 if ! get_version; then
25 ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
26 - get_running_version
27 + if ! get_running_version; then
28 + die "Unable to determine any Linux Kernel version, please report a bug"
29 + fi
30 fi
31 }