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: signature.asc
Description: OpenPGP digital signature

Reply via email to