From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C592B15800A for ; Thu, 20 Jul 2023 16:58:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 484CDE0878; Thu, 20 Jul 2023 16:58:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72DBEE0874 for ; Thu, 20 Jul 2023 16:58:15 +0000 (UTC) From: Ulrich Mueller To: Mike Gilbert Cc: gentoo-dev@lists.gentoo.org, Matt Turner Subject: Re: [gentoo-dev] [PATCH v2] meson.eclass: allow disabling verbose compilation In-Reply-To: (Mike Gilbert's message of "Thu, 20 Jul 2023 11:45:37 -0400") References: <20230717145104.1404135-1-mattst88@gentoo.org> <20230718164433.1940514-1-mattst88@gentoo.org> <5abedff6-f348-d5fd-2ee4-552488491f4a@gentoo.org> <61b16cf8-9a1c-09c1-ab42-279fae0e0a4a@gentoo.org> Date: Thu, 20 Jul 2023 18:58:04 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: 7b6f57fc-1d06-43a9-a532-2ccd8d18ed34 X-Archives-Hash: 4dd006bfab33ef79e262019c7fb903a9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Thu, 20 Jul 2023, Mike Gilbert wrote: > On Thu, Jul 20, 2023 at 11:06=E2=80=AFAM Florian Schmaus wrote: >> While the bash language has no boolean datatype, you can exploit the >> fact that 'true' and 'false' are usually shell builtins: >>=20 >> : "${MESON_VERBOSE:=3Dtrue}" >>=20 >> and then later >>=20 >> if $MESON_VERBOSE; then >> mesoncompileargs+=3D( --verbose ) >> fi > I think we generally try to avoid exploiting that behavior in ebuilds. > It's usually much more obvious to check for a non-empty string, or for > a specific value. Testing for a non-empty variable is also faster than executing "true" or "false" builtins from variable values. (Which doesn't play any role here, but readability of the code does.) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmS5Z50PHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uZBsH/17od8RhRXZAAfxJzWCrtYIngHRNSEHUhMHH FM1qF6pEsnZOhKlJV/deobCKulPgJUUA37enSz0i4aqaO+57/gALTHq6+TCd7nNH iYtWCXvjDKJoiIc0JCKhSA3VXdCe6vuuLyKCiWxhqos+nJb9OEl97wOAp4Pmyt4I KB8kn/Kl4DujBao+KTyBsI4hAO0GAtdasM9B2PGmnCa6NwtLweir8e9A2+sJRBq6 zSDuTHFoAf6VHKaNSwkRakA+LqmTG1vRSOVDcQ/Ia2EarD2ciXmDvD9pYYeYcWsF H1f0kd5yPe5PG4+E+DoC63sgvjNNWSY5eixjTxPlo5+2dvwijq0= =2NwN -----END PGP SIGNATURE----- --=-=-=--