[alpine-devel] Re: xzdiff in xz package is broken on alpine linux
I was hoping this might work:
diff <(echo foo) <(echo bar)
But no. This part of the standard describes a subshell environment but
scrolling up it gives grammar:
io_file : '<' filename
| LESSAND filename
| '>' filename
| GREATAND filename
| DGREAT filename
| LESSGREAT filename
| CLOBBER filename
The terminal `filename` sort of implies that it doesn't describe subshell
output to an anonymous file the way bash does.
On Fri, Jul 3, 2015 at 2:41 PM, Michael Fox <415fox_at_gmail.com> wrote:
> Do you think it's a bug in busybox? I think they follow this opengroup
> It's hard to tell from the description of diff in that document whether
> and how it should deal with two stdin pipes.
> I'll CC their mailing list and see what they say.
> On Fri, Jul 3, 2015 at 11:31 AM, Lasse Collin <lasse.collin_at_tukaani.org>
>> On 2015-06-30 Michael Fox wrote:
>> > I have to admit the xzdiff script is a little beyond me but the way
>> > xzdiff fails is you compare two different files and it just returns 0
>> > as if they were the same. I think the easiest way to see it is to
>> > download an alpine linux live CD:
>> > http://alpinelinux.org/downloads/
>> > To make it run in a VM takes just a few minutes. Here is complete
>> > steps to make it simple as possible:
>> Thanks. The diffs you sent didn't help, so I tested it under Alpine
>> Linux as you suggested. The problem is BusyBox diff which doesn't work
>> correctly if both arguments are pipes. Installing GNU diffutils makes
>> the problem go away.
>> Here is a simple test case using bash and other shells that support
>> the <(foo) syntax:
>> bash$ echo foo | diff <(echo bar) - ; echo $?
>> < bar
>> > foo
>> Switching to BusyBox diff:
>> bash$ echo foo | busybox diff <(echo bar) - ; echo $?
>> For me it would be convenient if you could report the bug to the BusyBox
>> developers, but I can do it too if you prefer so. Thanks!
>> Lasse Collin | IRC: Larhzu _at_ IRCnet & Freenode
Received on Fri Jul 03 2015 - 15:26:31 GMT