bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libvirt] boostrap: gzip version check problem on FreeBSD


From: Eric Blake
Subject: Re: [libvirt] boostrap: gzip version check problem on FreeBSD
Date: Sat, 13 Nov 2010 14:08:08 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 11/12/2010 11:58 PM, Ralf Wildenhues wrote:
> Hello,
> 
> * Eric Blake wrote on Fri, Nov 12, 2010 at 10:40:25PM CET:
>> On 11/12/2010 02:35 PM, Paul Eggert wrote:
>>> On 11/12/2010 12:50 PM, Eric Blake wrote:
>>>> +          s/^\([0-9]\{1,\}\(\.[.a-z0-9-]*\)\)*.*/\1/
>>>
>>> Surely that is a typo.  The "*\)\)*" should be a "*\)*\)".
>>
>> Aargh - I tested on one machine, but committed on another.  Typo is now
>> fixed.
> 
> But the following limitations from autoconf.info still apply:
> 
>      Nested parentheses in patterns (e.g., `\(\(a*\)b*)\)') are quite
>      portable to current hosts, but was not supported by some ancient
>      `sed' implementations like SVR3.
> 
>      Some `sed' implementations, e.g., Solaris, restrict the special
>      role of the asterisk `*' to one-character regular expressions and
>      back-references, and the special role of interval expressions
>      `\{M\}', `\{M,\}', or `\{M,N\}' to one-character regular
>      expressions.  This may lead to unexpected behavior:
> 
> You can probably ignore the first, but not the second.

Thanks for the reminder :(

$ echo 'abc' | /bin/sed -n '/b\{1\}/ p'
abc
$ echo 'abc' | /bin/sed -n '/[bc]\{1\}/ p'
abc
$ echo 'abc' | /bin/sed -n '/\(b\)\{1\}/ p'
$

But for bootstrap's point of view, it seems like it would be easier to
find a working sed than to try and rewrite get_version to work around
that Solaris brain-damage.

$ echo 'abc' | /usr/xpg4/bin/sed -n '/\(b\)\{1,\}/ p'
abc

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]