Re: Bash patches format

2018-05-31 Thread Robert Elz
pkgsrc (for NetBSD and other systems) has no listed bash maintainer, so ... (and please understand that I in no way speak for pkgsrc or NetBSD here). As long as patch(1) can handle the format, which form (context, unified, ...) patches are released in makes no difference at all. pkgsrc defaults t

Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-31 Thread L A Walsh
Ilkka Virta wrote: If the 1st expression is false, it would skip directly to the '||' and would execute the 3rd clause. If the 1st expresion is true then it does the 2nd clause. If that is false, the '||' clause is done, but if true, the '||' clause would not be done. In other words, ||

Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-31 Thread PePa
On 05/31/2018 01:54 PM, Robert Elz wrote: > I am not sure what predence rule you see working as > expected, but in sh (bash, or any other Bourne syntax > or POSIX shell) there is no precedence for && and || > they (in the absense of grouping) are simply executed > left to right as written. Here is

Re: Bash patches format

2018-05-31 Thread Rainer Müller
On 2018-05-30 09:04, Marty E. Plummer wrote: > Maintainers, I'd really like to hear your thoughts on this matter. If > the diffs are produced as -p1 unified diffs, then downstreams who do > convert from -p0 context won't have to, and distros who work around it > won't either. Speaking as maintaine

Re: Bash patches format

2018-05-31 Thread Eric Blake
On 05/30/2018 02:04 AM, Marty E. Plummer wrote: Maintainers, I'd really like to hear your thoughts on this matter. If the diffs are produced as -p1 unified diffs, then downstreams who do convert from -p0 context won't have to, and distros who work around it won't either. Makes no real differen

Re: Bash patches format

2018-05-31 Thread Bartłomiej Piotrowski
On 2018-05-30 09:04, Marty E. Plummer wrote: > Maintainers, I'd really like to hear your thoughts on this matter. If > the diffs are produced as -p1 unified diffs, then downstreams who do > convert from -p0 context won't have to, and distros who work around it > won't either. > > Regards, > > Mar

Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-31 Thread Ilkka Virta
On 31.5. 02:20, L A Walsh wrote: Ilkka Virta wrote: On 22.5. 00:17, Uriel wrote: As you know, a conditional is of the type: if [[ EXPRESSION ]]; then TRUE CONDITION; else ALTERNATIVE RESULT; fi Or with logical operators and groups: [[ EXPRESSION ]] && { TRUE CONDITION; } || { ALTERNATIVE RES

Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-31 Thread Greg Wooledge
On Wed, May 30, 2018 at 05:02:58PM -0700, L A Walsh wrote: > Greg Wooledge wrote: > > On Mon, May 21, 2018 at 04:17:18PM -0500, Uriel wrote: > > > [[ EXPRESSION ]]; && { TRUE CONDITION; } || { ALTERNATIVE RESULT; } > > https://mywiki.wooledge.org/BashPitfalls#pf22 > pf22 is wrong. It's not wrong.

Re: Bash patches format

2018-05-31 Thread Natanael Copa
"Marty E. Plummer" wrote: > Maintainers, I'd really like to hear your thoughts on this matter. If > the diffs are produced as -p1 unified diffs, then downstreams who do > convert from -p0 context won't have to, and distros who work around it > won't either. Alpine Linux uses -p1 and unified d

Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-31 Thread Robert Elz
Date:Wed, 30 May 2018 17:02:58 -0700 From:L A Walsh Message-ID: <5b0f3bb2.1000...@tlinx.org> | I.e. precedence rules seem to work as expected. I am not sure what predence rule you see working as expected, but in sh (bash, or any other Bourne syntax or POSIX shell)