Mail archive
alpine-devel

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

From: Michael Fox <415fox_at_gmail.com>
Date: Sat, 4 Jul 2015 07:49:09 -0700

Looks like it's fixed in busybox/master; I confirmed that it is broken as
of 1.23.2 which is the latest release alpine uses.


On Sat, Jul 4, 2015 at 4:16 AM, Michael Fox <415fox_at_gmail.com> wrote:

> It's easy to get confused on a system with multiple shells and utilities
> installed so I'm trying it on a fresh minimal alpline livecd. It is exactly
> as you say.
>
> I think busybox has a bug. I hope someone from their list can comment.
>
>
>
>
>
>
> On Sat, Jul 4, 2015 at 2:21 AM, Lasse Collin <lasse.collin_at_tukaani.org>
> wrote:
>
>> On 2015-07-03 Michael Fox 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.
>>
>> There is just one stdin which often (but not always) is a pipe.
>>
>> Both POSIX.1-2001 (your link) and the latest version (POSIX.1-2008)
>>
>> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html
>>
>> say that diff should work with pipes:
>>
>> Many early implementations of diff require seekable files. Since
>> the System Interfaces volume of POSIX.1-2008 supports named pipes,
>> the standard developers decided that such a restriction was
>> unreasonable. Note also that the allowed filename - almost always
>> refers to a pipe.
>>
>> > 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:
>>
>> Seems that I confused you with the bash-specific syntax. Sorry about
>> that. The syntax used with the shell has nothing to do with diff. Here
>> is a test case using POSIX sh:
>>
>> sh$ mkfifo fifo
>> sh$ echo foo > fifo &
>> sh$ echo bar | diff fifo -
>> 1c1
>> < foo
>> ---
>> > bar
>> sh$ echo $?
>> 1
>>
>> Switching to BusyBox diff:
>>
>> sh$ mkfifo fifo
>> sh$ echo foo > fifo &
>> sh$ echo bar | busybox diff fifo -
>> sh$ echo $?
>> 0
>>
>> Or:
>>
>> sh$ mkfifo fifo fifo2
>> sh$ echo foo > fifo &
>> sh$ echo bar > fifo2 &
>> sh$ busybox diff fifo fifo2
>> sh$ echo $?
>> 0
>>
>> diff from BusyBox 1.23.2 doesn't work if both arguments are pipes.
>>
>> --
>> 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 Sat Jul 04 2015 - 07:49:09 GMT