* ':' noop results in ':: not found'
@ 2016-10-28 10:54 Tim Ruehsen
2016-10-28 11:22 ` Harald van Dijk
0 siblings, 1 reply; 3+ messages in thread
From: Tim Ruehsen @ 2016-10-28 10:54 UTC (permalink / raw)
To: dash
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
Hi,
maybe you can enlighten me :-)
I try to use dash (0.5.8-2.3) on Debian unstable for executing ./configure
scripts. Since Debian builds with --disable-lineno, all ./configure scripts
silently fall back to bash (I created bug report #842242 to get this fixed).
Next I rebuilt the package from the (Debian) sources without --disable-lineno
and installed it. Now I see error messages from dash when it comes to the do
nothing operator :.
$ dash -c 'test -n "a" && :'
dash: 1: :: not found
$ echo $?
127
$ bash -c 'test -n "a" && :'
$ echo $?
0
Since this : construct is wildly used and I know that dash on other systems
work with it, I wonder what is wrong here.
Is there a known bug, maybe fixed on recent dash versions ?
Or has this some simple reason my stupidity doesn't see ?
Regards, Tim
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ':' noop results in ':: not found'
2016-10-28 10:54 ':' noop results in ':: not found' Tim Ruehsen
@ 2016-10-28 11:22 ` Harald van Dijk
2016-10-28 13:08 ` Tim Ruehsen
0 siblings, 1 reply; 3+ messages in thread
From: Harald van Dijk @ 2016-10-28 11:22 UTC (permalink / raw)
To: Tim Ruehsen, dash
On 28/10/16 12:54, Tim Ruehsen wrote:
> Hi,
>
> maybe you can enlighten me :-)
>
> I try to use dash (0.5.8-2.3) on Debian unstable for executing ./configure
> scripts. Since Debian builds with --disable-lineno, all ./configure scripts
> silently fall back to bash (I created bug report #842242 to get this fixed).
As you found there, this is intentional, specifically to force configure
scripts to continue to be run with bash, which is what happened with
older dash versions. I asked at the time why they don't just call bash
explicitly (bash configure instead of ./configure) if that's the goal,
but didn't get a response.
> Next I rebuilt the package from the (Debian) sources without --disable-lineno
> and installed it. Now I see error messages from dash when it comes to the do
> nothing operator :.
>
> $ dash -c 'test -n "a" && :'
> dash: 1: :: not found
> $ echo $?
> 127
>
> $ bash -c 'test -n "a" && :'
> $ echo $?
> 0
>
> Since this : construct is wildly used and I know that dash on other systems
> work with it, I wonder what is wrong here.
>
> Is there a known bug, maybe fixed on recent dash versions ?
> Or has this some simple reason my stupidity doesn't see ?
This is likely to happen if you have the LC_ALL environment variable set
when building dash, and I can reproduce your results with 0.5.8 by
setting LC_ALL to en_GB.UTF-8. It was fixed in 0.5.9. (Specifically,
where a fixed sort order was needed, 0.5.8 only forced LC_COLLATE=C, but
that still allowed LC_ALL to override it.)
dash won't be the only program that has problems with this; if you're
building software yourself, setting LANG should generally be okay, but
LC_ALL is best avoided. Unless you're doing it specifically to find and
report/fix bugs, anyway.
Cheers,
Harald van Dijk
> Regards, Tim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ':' noop results in ':: not found'
2016-10-28 11:22 ` Harald van Dijk
@ 2016-10-28 13:08 ` Tim Ruehsen
0 siblings, 0 replies; 3+ messages in thread
From: Tim Ruehsen @ 2016-10-28 13:08 UTC (permalink / raw)
To: Harald van Dijk; +Cc: dash
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
On Friday, October 28, 2016 1:22:20 PM CEST Harald van Dijk wrote:
> On 28/10/16 12:54, Tim Ruehsen wrote:
> > Hi,
> >
> > maybe you can enlighten me :-)
> >
> > I try to use dash (0.5.8-2.3) on Debian unstable for executing ./configure
> > scripts. Since Debian builds with --disable-lineno, all ./configure
> > scripts
> > silently fall back to bash (I created bug report #842242 to get this
> > fixed).
> As you found there, this is intentional, specifically to force configure
> scripts to continue to be run with bash, which is what happened with
> older dash versions. I asked at the time why they don't just call bash
> explicitly (bash configure instead of ./configure) if that's the goal,
> but didn't get a response.
>
> > Next I rebuilt the package from the (Debian) sources without
> > --disable-lineno and installed it. Now I see error messages from dash
> > when it comes to the do nothing operator :.
> >
> > $ dash -c 'test -n "a" && :'
> > dash: 1: :: not found
> > $ echo $?
> > 127
> >
> > $ bash -c 'test -n "a" && :'
> > $ echo $?
> > 0
> >
> > Since this : construct is wildly used and I know that dash on other
> > systems
> > work with it, I wonder what is wrong here.
> >
> > Is there a known bug, maybe fixed on recent dash versions ?
> > Or has this some simple reason my stupidity doesn't see ?
>
> This is likely to happen if you have the LC_ALL environment variable set
> when building dash, and I can reproduce your results with 0.5.8 by
> setting LC_ALL to en_GB.UTF-8. It was fixed in 0.5.9. (Specifically,
> where a fixed sort order was needed, 0.5.8 only forced LC_COLLATE=C, but
> that still allowed LC_ALL to override it.)
Harald !!!
That's it !
I wish you could see me grinning from ear to ear !
> dash won't be the only program that has problems with this; if you're
> building software yourself, setting LANG should generally be okay, but
> LC_ALL is best avoided. Unless you're doing it specifically to find and
> report/fix bugs, anyway.
In fact, I use LC_ALL to find bugs. Especially turkish and greek have some
nifty casing pitfalls ;-)
Thank you so much, Harald !
Tim
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-28 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 10:54 ':' noop results in ':: not found' Tim Ruehsen
2016-10-28 11:22 ` Harald van Dijk
2016-10-28 13:08 ` Tim Ruehsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).