Re: [Partial patch] IFS and read builtin

2010-11-07 Thread Jonathan Nieder
Hi Herbert et al, Herbert Xu wrote: commit f42e443bb511ed3224f09b4fcf0772438ebdbbfa Author: Herbert Xu herb...@gondor.apana.org.au Date: Wed Sep 8 20:07:26 2010 +0800 [EXPAND] Fix ifsfirst/ifslastp leak Another puzzle bisecting to f42e443bb. This one comes from the grub-mkconfig

Re: [Partial patch] IFS and read builtin

2010-10-17 Thread Herbert Xu
On Sat, Oct 16, 2010 at 02:15:48PM -0500, Jonathan Nieder wrote: Bisects to f42e443bb. Reverting it avoids the problem. Any ideas before I investigate further? Does this patch help? diff --git a/ChangeLog b/ChangeLog index 2faaedd..5ace9ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3

Re: [Partial patch] IFS and read builtin

2010-10-17 Thread Jonathan Nieder
Herbert Xu wrote: On Sat, Oct 16, 2010 at 02:15:48PM -0500, Jonathan Nieder wrote: Bisects to f42e443bb. Reverting it avoids the problem. Any ideas before I investigate further? Does this patch help? Yes, thanks! -- To unsubscribe from this list: send the line unsubscribe dash in the body

Re: [Partial patch] IFS and read builtin

2010-10-16 Thread Jonathan Nieder
Hi Herbert, Herbert Xu wrote: commit f42e443bb511ed3224f09b4fcf0772438ebdbbfa Author: Herbert Xu herb...@gondor.apana.org.au Date: Wed Sep 8 20:07:26 2010 +0800 [EXPAND] Fix ifsfirst/ifslastp leak As it stands expandarg may return with a non-NULL ifslastp which then

Re: [Partial patch] IFS and read builtin

2010-09-08 Thread Herbert Xu
Jilles Tjoelker jil...@stack.nl wrote: The intention is that if there are more fields than variables, the final variable receive the exact text after the already assigned fields and their delimiters (apart from trailing IFS whitespace). The POSIX.1-2008 text achieves this if used with the

Re: [Partial patch] IFS and read builtin

2010-09-08 Thread Herbert Xu
Harald van Dijk har...@gigawatt.nl wrote: [-- text/plain, encoding 7bit, charset: ISO-8859-1, 20 lines --] Hi, as has been reported already dash currently has a bug where the read builtin ignores the read environment's IFS setting. As a result, echo a:b | { IFS=: read a b; echo $a; }

Re: [Partial patch] IFS and read builtin

2010-09-08 Thread Herbert Xu
On Wed, Sep 08, 2010 at 07:53:24PM +0800, Herbert Xu wrote: commit 5c7042771753d5a968b2b7263cf9f4e02fa3820e Author: Herbert Xu herb...@gondor.apana.org.au Date: Wed Sep 8 19:51:10 2010 +0800 [EXPAND] Fix ifsfirst/ifslastp leak Slight update, should also call ifsfree instead of

Re: [Partial patch] IFS and read builtin

2010-08-24 Thread Jilles Tjoelker
On Tue, Aug 24, 2010 at 12:51:47AM +0200, Harald van Dijk wrote: On 23/08/10 21:35, Jilles Tjoelker wrote: I think you should do what you think is best for the stability of your product. Because dash releases are not extensively tested, I'd recommend a trial build of at least a minimal base

Re: [Partial patch] IFS and read builtin

2010-08-24 Thread Harald van Dijk
On 25/08/10 00:51, Jilles Tjoelker wrote: Yes, I think that's the proper way to implement LINENO. FreeBSD sh avoids extending the nodes by detecting expansions of LINENO at parse time and storing the line number at that time. However, this is only possible because it does not print a line

Re: [Partial patch] IFS and read builtin

2010-08-23 Thread Harald van Dijk
On 23/08/10 21:35, Jilles Tjoelker wrote: I think you should do what you think is best for the stability of your product. Because dash releases are not extensively tested, I'd recommend a trial build of at least a minimal base system with the new version you choose. A particular feature to be

[Partial patch] IFS and read builtin

2010-08-22 Thread Harald van Dijk
Hi, as has been reported already dash currently has a bug where the read builtin ignores the read environment's IFS setting. As a result, echo a:b | { IFS=: read a b; echo $a; } will write out a:b. I tried to see what changed between 0.5.5.1 and 0.5.6, and found that the old code used

Re: [Partial patch] IFS and read builtin

2010-08-22 Thread Jilles Tjoelker
On Mon, Aug 23, 2010 at 12:20:12AM +0200, Harald van Dijk wrote: Hi, as has been reported already dash currently has a bug where the read builtin ignores the read environment's IFS setting. As a result, echo a:b | { IFS=: read a b; echo $a; } will write out a:b. I tried to see what changed

Re: [Partial patch] IFS and read builtin

2010-08-22 Thread Harald van Dijk
On 23/08/10 01:00, Jilles Tjoelker wrote: On Mon, Aug 23, 2010 at 12:20:12AM +0200, Harald van Dijk wrote: [...] echo a:b | { IFS=: read a b; echo $a; } [...] This has already been fixed in a totally different way in master. See git commits near 95a60b2936e8835963bfb08eadc0edf9dddf0498.