[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-testers] new snapshot available: coreutils-8.23.237-eff51
From: |
Jim Meyering |
Subject: |
Re: [platform-testers] new snapshot available: coreutils-8.23.237-eff51 |
Date: |
Wed, 25 Nov 2015 07:09:17 -0800 |
On Wed, Nov 25, 2015 at 6:34 AM, Pádraig Brady <address@hidden> wrote:
> On 25/11/15 13:59, Jim Meyering wrote:
>> On Wed, Nov 25, 2015 at 5:43 AM, Pádraig Brady <address@hidden> wrote:
>>> On 25/11/15 12:53, Joachim Schiele wrote:
>>>> i've used this patch but then i hit this issue:
>>>> http://paste.ubuntu.com/13498376/
>>>>
>>>> i don't have packaged makeinfo yet and i don't really care for the
>>>> documentation at the moment. i didn't find a ./configure switch to
>>>> disable it either.
>>>
>>>> and there is a patch to make it compile without
>>>> 'makeinfo' which changes doc/local.mk but it seems already applied in
>>>> 8.24 so what should i do now?
>>>
>>> I don't know what patch you're referring to, but
>>> it would be best to avoid makeinfo unless really needed.
>>> The attached should do that (note you may want to
>>> apply it to Makefile.in rather than doc/local.mk,
>>> and note it requires cmp on the build system).
>>
>> Good idea.
>>
>> - && mv $@-t $@
>> + && { cmp -s $@-t $@ 2>/dev/null || mv $@-t $@; }
>>
>> That "-s" option works with GNU cmp, but is not portable to some
>> other-vendor cmp programs.
>
> Interesting. It is POSIX and works on NetBSD, FreeBSD, and solaris,
> but not on HPUX for example:
> http://aix.polarhome.com/service/man/?qf=cmp&af=0&sf=0&of=HP-UX&tf=2
>
> I'll redirect to /dev/null instead.
>
> I'll also add this to tests to avoid the suggestion that -s is a GNU option:
Thanks.
> commit f97df9ac0430427942310c1047e9fe9574a061f5
> Author: Pádraig Brady <address@hidden>
> Date: Wed Nov 25 14:26:59 2015 +0000
>
> tests: for compare_(), use cmp -s where available
>
> * tests/init.sh (compare_): Only fall back to cmp without
> the POSIX defined -s option, where this is not available.
>
> diff --git a/tests/init.sh b/tests/init.sh
> index d366206..ed640f3 100755
> --- a/tests/init.sh
> +++ b/tests/init.sh
> @@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" <
> /dev/null`; then
> fi
> }
> fi
> -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
> +elif cmp -s /dev/null /dev/null 2>/dev/null; then
The enclosing subshell is required to redirect the error a shell would
emit e.g.,
when there is no cmp command. E.g., /bin/sh on Solaris 5.10 does this:
$ sh -c 'if no-such > /dev/null 2>&1; then :; fi'
sh: no-such: not found
But if we're running these tests opn a system with neither diff nor cmp,
we have larger problems :-) So feel free to leave those parentheses off.
> compare_ () { cmp -s "$@"; }
> else
> compare_ () { cmp "$@"; }