public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: "M. J. Everitt" <m.j.everitt@iee.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] RFC: [PATCH]: Test for presence of distcc before preclean to avoid failure
Date: Wed, 24 Jan 2018 09:28:46 +0000	[thread overview]
Message-ID: <37bb9d8f-e91d-4ab1-32fc-122a0f2b803d@iee.org> (raw)
In-Reply-To: <20180124034506.GA1731@vapier>


[-- Attachment #1.1: Type: text/plain, Size: 1083 bytes --]

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
>>  
>>  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 [ $? == 0 ]; then
> use `[[` instead of `[` when writing bash, especially when using
> bash code like "==".
> -mike
Ooops, I usually do double-brackets - the curse of late-night coding .. :D

Michael.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2018-01-24  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  0:13 [gentoo-catalyst] RFC: [PATCH]: Test for presence of distcc before preclean to avoid failure M. J. Everitt
2018-01-24  3:45 ` Mike Frysinger
2018-01-24  9:28   ` M. J. Everitt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37bb9d8f-e91d-4ab1-32fc-122a0f2b803d@iee.org \
    --to=m.j.everitt@iee.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox