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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 53BC61382C5 for ; Wed, 24 Jan 2018 09:28:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53E12E0965; Wed, 24 Jan 2018 09:28:54 +0000 (UTC) Received: from avasout05.plus.net (avasout05.plus.net [84.93.230.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F2D67E0965 for ; Wed, 24 Jan 2018 09:28:53 +0000 (UTC) Received: from [192.168.6.147] ([212.159.46.162]) by smtp with ESMTP id eHMQekhJsrx5YeHMSeQJyO; Wed, 24 Jan 2018 09:28:52 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=DsN4Bl3+ c=1 sm=1 tr=0 a=RuViaDnnNG9rfPLW4VJocg==:117 a=RuViaDnnNG9rfPLW4VJocg==:17 a=13zjGPudsaEWiJwPRgMA:9 a=ViV2YM2XGBCzGXwxfhMA:9 a=QEXdDO2ut3YA:10 a=g4PMaQx-ajDKGjJp-HUA:9 a=ONNS8QRKHyMA:10 Subject: Re: [gentoo-catalyst] RFC: [PATCH]: Test for presence of distcc before preclean to avoid failure To: gentoo-catalyst@lists.gentoo.org References: <20180124034506.GA1731@vapier> From: "M. J. Everitt" Openpgp: id=BA266E0525CFAB101523351B4C30334F93C22371 Message-ID: <37bb9d8f-e91d-4ab1-32fc-122a0f2b803d@iee.org> Date: Wed, 24 Jan 2018 09:28:46 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <20180124034506.GA1731@vapier> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jSLSaCb3lp31sq4wIB9EHr5iwSWjGwcbe" X-CMAE-Envelope: MS4wfKMTjvxmnfcovikjBRGDKV6By5rsCiDb2CFjnuZbBZpv1mKWup7lJNU8koA77rtNGiSjKDai2cKWUrDGkKCwkLgZA+EzluugmBpXef+hXNs6yGS/kXtH ZBVF0E8H1ZYDfaKEZQQFDthwLF30mzg4brLRNzJ7MLY532uXdFPmpbII5qPnzzwwVOUOSFXvTU14lQ== X-Archives-Salt: d356a440-5a67-445d-8fe7-df838a0fc547 X-Archives-Hash: 8532e0734d6f6c50ba760920eda21723 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jSLSaCb3lp31sq4wIB9EHr5iwSWjGwcbe Content-Type: multipart/mixed; boundary="JmbR385FlBMt9H91m82SSu5H0HUAN0ttT"; protected-headers="v1" From: "M. J. Everitt" To: gentoo-catalyst@lists.gentoo.org Message-ID: <37bb9d8f-e91d-4ab1-32fc-122a0f2b803d@iee.org> Subject: Re: [gentoo-catalyst] RFC: [PATCH]: Test for presence of distcc before preclean to avoid failure References: <20180124034506.GA1731@vapier> In-Reply-To: <20180124034506.GA1731@vapier> --JmbR385FlBMt9H91m82SSu5H0HUAN0ttT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 24/01/18 03:45, Mike Frysinger wrote: > On 24 Jan 2018 00:13, M. J. Everitt wrote: >> --- a/targets/stage3/stage3-preclean-chroot.sh >> +++ b/targets/stage3/stage3-preclean-chroot.sh >> @@ -11,7 +11,10 @@ cleanup_stages >> =20 >> if [ -n "${clst_DISTCC}" ] >> then >> - run_merge -C sys-devel/distcc || exit 1 >> + portageq match / sys-devel/distcc 2>&1 | grep -s -q distcc > just do a -n test on the output instead > > although seems like portageq should be better with its exit status Thanks Mike - I did take a look at the portageq source code, but after consulting with Zac, we decided against changing exit codes at this time, to preserve the [minimal] existing return code behaviour. I agree, for this purpose, it would seem much more sensible, though, to simply have a grep-like exit code to test straight-off ... Added to FEATUREREQ ;= ) >> + if [ $? =3D=3D 0 ]; then > use `[[` instead of `[` when writing bash, especially when using > bash code like "=3D=3D". > -mike Ooops, I usually do double-brackets - the curse of late-night coding .. := D Michael. --JmbR385FlBMt9H91m82SSu5H0HUAN0ttT-- --jSLSaCb3lp31sq4wIB9EHr5iwSWjGwcbe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJaaFHSAAoJEGPnxnn01DHd6GUP/3IcxA+V0CGWKEY8re9jZTdB PYAiibLVP5EW2D2nHQU+fAiGrJE4zBAmvoeoh62I2wtbaE22ID1SuZ1IsA445gdJ oqbSmFICQSrwUE83X004IjQWSQEPv+YemoGyf/JoxcJ1kBZZO+Bqx83QsiXzNdkK zEg9HjXbRQxP15hMhBfsMsMxh73HIHVvvtZQqCIY5R9R4kd2I3YG4tKWeIMNUM8W RfBwxEtWeezXfzFqJIx7UAI5VBdzVLDa7hotswBt272BC/HLTPIarZzD0HkffGFO aCBCpSLoVIEEsrWDFWrRKzbJdbXpDlN92NmnXHe9XZL1BiUFLfJ2C4ZeaNwHpJEv 5xMw8olQVWlWb0d0fVtE47Cnbm4M0sZfUidWFZlVQB6SeKbxu6SsW9v7uxFAH3Yb DPZkeJjEAaz7aU7Uf4tsNYSJs+ZrHzp8AVn+UorTQ0DfcKM12j/+VPYaf3ydoSB1 VwXcF50Y+Bdeo20eaTBjjLxs8ziVUb99R/qgEayBsjNXD0lkv2n0K2KtDdMZGpnn 0QjOzcRtM7dr+qQ28XIWKbkhqIDUwOeWraAZx7/d5au8viQTARJRCgEI6RN/Bal2 LTS3tU5sKdAlBwZnTtKL9QW/p9WjVYxdzlszbAGieX9XP+cb7+l2ywRYq9cYDcY+ xNlSIQwtOuPc2lXkM4/G =luox -----END PGP SIGNATURE----- --jSLSaCb3lp31sq4wIB9EHr5iwSWjGwcbe--