Mail archive
alpine-devel

[alpine-devel] Re: xzdiff in xz package is broken on alpine linux

From: Michael Fox <415fox_at_gmail.com>
Date: Fri, 3 Jul 2015 15:26:31 -0700

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
> standard
>
> http://pubs.opengroup.org/onlinepubs/009695399/utilities/diff.html
>
> 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>
> wrote:
>
>> 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 $?
>> 1c1
>> < bar
>> ---
>> > foo
>> 1
>>
>> Switching to BusyBox diff:
>>
>> bash$ echo foo | busybox diff <(echo bar) - ; echo $?
>> 0
>>
>> 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
>>
>
>
>
> --
>
> -
> Michael
>



-- 
-
Michael
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Jul 03 2015 - 15:26:31 GMT