From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100532 Path: news.gmane.org!.POSTED!not-for-mail From: Brian Hunt Newsgroups: gmane.comp.tex.context Subject: Re: Build for Alpine Linux Date: Wed, 11 Apr 2018 12:30:28 +0000 Message-ID: References: <026e5b07-3364-2011-50bf-29a249fb41b7@xs4all.nl> <6a1d4148-1bb5-2633-d9e1-9859c05bb665@gmx.es> <1523235042.18581.29.camel@gmail.com> <20180409193518.GA2842220@phare.normalesup.org> <20180410205530.GD3878032@phare.normalesup.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9056070609703134090==" X-Trace: blaine.gmane.org 1523449736 5995 195.159.176.226 (11 Apr 2018 12:28:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2018 12:28:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 11 14:28:52 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6Ers-0001VR-Ha for gctc-ntg-context-518@m.gmane.org; Wed, 11 Apr 2018 14:28:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D3B48626017; Wed, 11 Apr 2018 14:30:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ii4uWjdq3NEE; Wed, 11 Apr 2018 14:30:52 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 0F675625FF1; Wed, 11 Apr 2018 14:30:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CEA61626009 for ; Wed, 11 Apr 2018 14:30:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bEKz8bEOH1Fc for ; Wed, 11 Apr 2018 14:30:49 +0200 (CEST) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id E570E625DA7 for ; Wed, 11 Apr 2018 14:30:39 +0200 (CEST) Original-Received: by mail-wm0-f48.google.com with SMTP id t67so3861409wmt.0 for ; Wed, 11 Apr 2018 05:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0XvitpmlF+EFdOWS+u4sU7K5Z790jU1Ixw26pg1Omg8=; b=oXTCtetSLOOGFPo/9AntEVp6Q9CiJcsgftsOpVANQ3+whbsZWv9ZBy89C6salgh+Fm vBB2AsqEtcg65aLpKB2Toa/4hOY2o754ld3dA0BqHWm7tj/ar3G1YCaByYFQ7A62wCFI Ss4BgO774eMcnJLrY7dQSYElj7GMcz4vpi/3UM4ziZ2bPFs4hCZBjJcPYsX7/roxlWh9 vQG4vOpGmkzRSD+ZW+bLsIr6a7uDbDLh1xz1QJ8IOpti1/a9LpFsHgup7PyWmNcnTrVD pSFt0i3Kt8golB9V+k5jQfxaSvyTautAXqjl6T3Q2+z+lfbW+KSsddXCbH75ET4kqUUz H3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=0XvitpmlF+EFdOWS+u4sU7K5Z790jU1Ixw26pg1Omg8=; b=Iw4eM82lrift/pcTzUrGUMuxdedwwLi+dhtbmdCz+S3gB2GDYM9yZGVJCV3UBZ0c4f zWRioUIzHBIzjowL3SL8eMqzA3Te7VyzPP7XCde9qvrwn0WPNicfKCdp3Ae1E132fff3 Vfs2Mo3MF6L3KsfX/wTx6IjaEZ7oMpuMus9Iv0JZ224HHPTPeT6e5JzCYM0NF71tON/W CgZ88I0NoGOYaqQs7q45V26PRtr3C1eqZ0ClgyBbWJShtNZfIA+93eVWffm0vK2q5MiE N5gnnru4WjS6F5jJCH5vbKFFQkxyL6xvUwGjBiqF+XfZo9DOrtZhFefn9gDI994ts9Kn 5hEA== X-Gm-Message-State: ALQs6tBG7O+7tCoM2yWXiLo/nm8Bzm7RqXaVTgyyUsO5I+r4e/pKfGiZ 07dioVsSVwboWaIn1Olxa93W3J0rGEKLCI9aJigcFw== X-Google-Smtp-Source: AIpwx48L+OcXPiKO7SnWq2zbtkuuACv8QEmVkCo3Dhr1kvBfXVcBqf2zOKT1F1Z1jAJrnkSXgwRmah5thDdfupV9b/8= X-Received: by 10.80.159.232 with SMTP id c95mr9348534edf.277.1523449839246; Wed, 11 Apr 2018 05:30:39 -0700 (PDT) In-Reply-To: <20180410205530.GD3878032@phare.normalesup.org> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:100532 Archived-At: --===============9056070609703134090== Content-Type: multipart/alternative; boundary="94eb2c1a1976806347056991ce2e" --94eb2c1a1976806347056991ce2e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > That=E2=80=99s what I was saying. But you seemed to imply that grep -F '= musl' > was preferable to grep -E '^musl' from a portability and robustness > point of view. Sorry if I was unclear; `grep -F` is preferable to `fgrep` since the latter is less portable, and `grep -F` may be preferable to `-E` because it avoids the undesirable zsh expansion. > > The -q is superfluous with the >/dev/null, and should be removed; > > incidentally though, is it not harmless in this case? > It is not. In Thomas=E2=80=99 case, using grep >/dev/null would have av= oided > a 0 exit status and thus prevented his system from being erroneously > detected as supporting musl. I may have misunderstood Thomas' case, where zsh expands ^musl to all filenames not containing `musl`. For convenience, here's the sample we were discussing, which would be a different case: if command -v ldd >/dev/null && ldd --version 2>&1 | grep -Fq 'musl' > /dev/null In this case there ought to be no expansion because there is no carat and we use `grep -F`. Generally speaking `grep -q` can have undesirable side-effects, but I cannot see how such would occur in this case since all the input to grep is from the pipe, which barring a radically improbable interrupt should never error. I would be interested to know if I have misunderstood, though. On Tue, 10 Apr 2018 at 16:56 Arthur Reutenauer < arthur.reutenauer@normalesup.org> wrote: > On Tue, Apr 10, 2018 at 11:05:12AM +0000, Brian Hunt wrote: > >> The caret in itself was not the problem, only that it was not escaped > >> for the shell. Testing a regexp, with -E of course, is just as robust= , > >> and allows us to be more specific about what we test. > > > > Either is fine I am sure > > That=E2=80=99s what I was saying. But you seemed to imply that grep -F= 'musl' > was preferable to grep -E '^musl' from a portability and robustness > point of view. > > >> grep -E '^musl' works just as well; and as I explained, -q may return= 0 > >> even if there are errors, so should be avoided. > > > > The -q is superfluous with the >/dev/null, and should be removed; > > incidentally though, is it not harmless in this case? > > It is not. In Thomas=E2=80=99 case, using grep >/dev/null would have a= voided > a 0 exit status and thus prevented his system from being erroneously > detected as supporting musl. > > Best, > > Arthur > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ --=20 *from the personal account of:* *Brian M Hunt * Direct: +1-289-684-4677 LinkedIn: https://linkedin.com/in/brianmhunt *This e-mail may contain information that is private, privileged, confidential and/or exempt from disclosure. Except as per this notice no waiver of any kind is intended by sending this e-mail, and this email is intended only for the named recipient(s) or the subscribers of a forwarding service the email is sent directly to and to which service you are an authorized recipient. Use, dissemination or copying without authorization is prohibited. Please notify the sender and destroy all copies of this e-mail if you have received this email in error.* --94eb2c1a1976806347056991ce2e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> That=E2=80=99s what I was = saying.=C2=A0 But you seemed to imply that grep -F 'musl'
> w= as preferable to grep -E '^musl' from a portability and robustness<= br>> point of view.

Sorry if I was unclear; `grep -F` is pre= ferable to `fgrep` since the latter is less portable, and `grep -F` may be = preferable to `-E` because it avoids the undesirable zsh expansion.

&= gt;=C2=A0> The -q is superfluous = with the >/dev/null, and should be removed;
> > incidentally though, is it not harmless in= this case?
>=C2=A0 It is not.=C2= =A0 In Thomas=E2=80=99 case, using grep >/dev/null would have avoided
> a 0 exit status and thus prevented his system from being errone= ously
> detected as supporting musl.

I may have misunderstood Thoma= s' case, where zsh expands ^musl to all filenames not containing `musl`= . For convenience, here's the sample we were discussing, which would be= a different case:

i= f command -v ldd >/dev/null && ldd --version 2>&1 | gr= ep -Fq 'musl' >/dev/null

In this case there o= ught to be no expansion because there is no carat and we use `grep -F`.
=

Generally speaking `grep -q` can have undesirable= side-effects, but I cannot see how such would occur in this case since all= the input to grep is from the pipe, which barring a radically improbable i= nterrupt should never error.=C2=A0 I would be interested to know if I have = misunderstood, though.

On Tue, 10 Apr 2018 at 16:56 Arthur Reutenauer <arthur.reutenauer@normalesup.org> wrote:
On Tue, Apr 10, 2018 = at 11:05:12AM +0000, Brian Hunt wrote:
>>=C2=A0 The caret in itself was not the problem, only that it was no= t escaped
>> for the shell.=C2=A0 Testing a regexp, with -E of course, is just = as robust,
>> and allows us to be more specific about what we test.
>
> Either is fine I am sure

=C2=A0 That=E2=80=99s what I was saying.=C2=A0 But you seemed to imply that= grep -F 'musl'
was preferable to grep -E '^musl' from a portability and robustness=
point of view.

>>=C2=A0 grep -E '^musl' works just as well; and as I explain= ed, -q may return 0
>> even if there are errors, so should be avoided.
>
> The -q is superfluous with the >/dev/null, and should be removed; > incidentally though, is it not harmless in this case?

=C2=A0 It is not.=C2=A0 In Thomas=E2=80=99 case, using grep >/dev/null w= ould have avoided
a 0 exit status and thus prevented his system from being erroneously
detected as supporting musl.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Best,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Arthur
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist :
ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--

from the personal account of:

Brian M Hunt <brianmhunt@gmail.com>
Direct: += 1-289-684-4677
LinkedIn:=C2=A0https://linkedin.com/in/brianmhunt

This e-mail may contain information that = is private, privileged, confidential and/or exempt from disclosure. Except = as per this notice no waiver of any kind is intended by sending this e-mail= , and this email is intended only for the named recipient(s) or the subscri= bers of a forwarding service the email is sent directly to and to which ser= vice you are an authorized recipient. Use, dissemination or copying without= authorization is prohibited. Please notify the sender and destroy all copi= es of this e-mail if you have received this email in error.
<= /p>

--94eb2c1a1976806347056991ce2e-- --===============9056070609703134090== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============9056070609703134090==--