Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, Mart Raudsepp <leio@g.o>, David Seifert <soap@g.o>
Subject: Re: [gentoo-dev] [PATCH] wxwidgets.eclass: Support EAPI 8
Date: Sun, 01 Aug 2021 14:41:14
Message-Id: ubl6h4495@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] wxwidgets.eclass: Support EAPI 8 by "Michał Górny"
1 >>>>> On Sun, 01 Aug 2021, Michał Górny wrote:
2
3 >> + 3.0) [[ ${EAPI} == 7 ]] \
4 >> + || die "GTK 2 no longer supported in EAPI ${EAPI}" ;;
5
6 > Let's make it:
7
8 > [[ ${EAPI} != 7 ]] && die ...
9
10 > to keep the logic more straightforward (and consistent with 'if ...;
11 > then').
12
13 Generally, I like the "<successful statement> || die" style more,
14 because it is more common. It is also more consistent about the return
15 status of the whole expression. With the && operator above, it would
16 return shell false in case of success.
17
18 Of course, there's no functional difference here, but if you have it at
19 the end of a function or before an explicit return statement it may play
20 a role.
21
22 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [PATCH] wxwidgets.eclass: Support EAPI 8 "Michał Górny" <mgorny@g.o>