Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 5/8] linux-info.eclass: require_configured_kernel, improve error handling
Date: Thu, 08 Mar 2018 17:08:12
Message-Id: 20180308170548.5782-6-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/8] linux-info.eclass: cleanup & better non-Linux support by "Michał Górny"
1 Add error handling for failing get_version call
2 in require_configured_kernel. Give just a simple 'die' message since
3 the get_version function should verbosely explain the problem.
4 ---
5 eclass/linux-info.eclass | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
9 index 177cb7fafcde..5ffaf3f3b898 100644
10 --- a/eclass/linux-info.eclass
11 +++ b/eclass/linux-info.eclass
12 @@ -295,7 +295,7 @@ require_configured_kernel() {
13 qeerror "it points to the necessary object directory so that it might find .config."
14 die "Kernel not configured; no .config found in ${KV_OUT_DIR}"
15 fi
16 - get_version
17 + get_version || die "Unable to determine configured kernel version"
18 }
19
20 # @FUNCTION: linux_chkconfig_present
21 --
22 2.16.2