[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-3.8.35-c860 on Alpine Linux
From: |
Bruno Haible |
Subject: |
Re: grep-3.8.35-c860 on Alpine Linux |
Date: |
Fri, 03 Mar 2023 15:15:52 +0100 |
Jim Meyering wrote:
> it appears to be due to a bug in their version of tr.
> Here's a snippet from your log:
>
> + tr -cs 0-9 '[ *]'
> + LC_ALL=C env -- tr -cs 0-9 '[ *]'
> + LC_ALL=cs_CZ.UTF-8 grep -F -f cspatfile csinput
> + echo ]11]12]13]14]15]16]17]18]
> + test1=]11]12]13]14]15]16]17]18]
> + test ]11]12]13]14]15]16]17]18] '!=' '11 12 13 14 15 16 17 18'
> + echo 'Test #1 F failed: ]11]12]13]14]15]16]17]18]'
> Test #1 F failed: ]11]12]13]14]15]16]17]18]
>
> That corresponds to this code:
>
> test1=$(echo $(LC_ALL=$cz grep -${mode} -f cspatfile csinput |
> tr -cs '0-9' '[ *]'))
> if test "$test1" != "11 12 13 14 15 16 17 18"; then
> echo "Test #1 ${mode} failed: $test1"
> failures=1
> fi
>
> and the value of $test1 somehow has a "]" in each position where
> normally we'd expect a space.
> That suggests the tr filter malfunctioned.
Indeed. I could narrow it down, eliminating the '-c' and '-s' options.
$ echo abc | tr 'abcd' '[A*4]'
[A*
$ echo xyz | tr 'a-z' '[A*]'
]]]
I've submitted a doc update for the Autoconf documentation:
https://lists.gnu.org/archive/html/autoconf-patches/2023-03/msg00000.html
> This failure does not block the release.
But it can be easily fixed nevertheless.
Proposed patch is attached. I verified that it works fine with coreutils and
Alpine Linux.
0001-Avoid-test-failure-on-Alpine-Linux-3.17-due-to-non-P.patch
Description: Text Data