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.0480976bc6397ce0c807f5a7e9603a65990d0042.mgorny@gentoo
1 commit: 0480976bc6397ce0c807f5a7e9603a65990d0042
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 8 16:02:43 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=0480976b
7
8 linux-info.eclass: Replace unnecessary $? checks
9
10 eclass/linux-info.eclass | 9 +++------
11 1 file changed, 3 insertions(+), 6 deletions(-)
12
13 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
14 index 0eca5572587..d5eb0e73fcf 100644
15 --- a/eclass/linux-info.eclass
16 +++ b/eclass/linux-info.eclass
17 @@ -628,8 +628,7 @@ get_running_version() {
18 # This attempts to find the version of the sources, and otherwise falls back to
19 # the version of the running kernel.
20 linux-info_get_any_version() {
21 - get_version
22 - if [[ $? -ne 0 ]]; then
23 + if ! get_version; then
24 ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
25 get_running_version
26 fi
27 @@ -848,13 +847,11 @@ check_zlibinflate() {
28
29 ebegin "checking ZLIB_INFLATE"
30 linux_chkconfig_builtin CONFIG_ZLIB_INFLATE
31 - eend $?
32 - [ "$?" != 0 ] && die
33 + eend $? || die
34
35 ebegin "checking ZLIB_DEFLATE"
36 linux_chkconfig_builtin CONFIG_ZLIB_DEFLATE
37 - eend $?
38 - [ "$?" != 0 ] && die
39 + eend $? || die
40
41 local LINENO_START
42 local LINENO_END