On 07/09/2012 05:04 PM, Eric Blake wrote:

>> -warn()
>> +# warnf_ FORMAT-STRING ARG1...
>> +warnf_ ()
>>  {
>> -  for i
>> -  do
>> -    echo "$i"
>> -  done | sed -e "s/^/$me: /" >&2
> 
> This is broken if you invoke './bootstrap', since then $me contains /
> and bootstrap complains:
> 
> autoreconf: Leaving directory `.'
> sed: -e expression #1, char 7: unknown option to `s'

More precisely, this is broken only if bootstrap encounters a failure,
as the real failure message is lost by the sed failure message, but a
useless error message is indeed pretty lousy for debugging purposes.  I
traced my particular problem to a case of libvirt not being prepared for
the fact that the 'missing' script is no longer shipped in gnulib.

+ for file in '$gnulib_extra_files'
+ case $file in
+ dst=build-aux/missing
+ symlink_to_dir .gnulib build-aux/missing build-aux/missing
+ src=.gnulib/build-aux/missing
+ dst=build-aux/missing
+ test -f .gnulib/build-aux/missing
+ die 'failed to symlink build-aux/missing'
+ warn 'failed to symlink build-aux/missing'
+ for i in '"$@"'
+ echo 'failed to symlink build-aux/missing'
+ sed -e 's/^/./bootstrap: /'
sed: -e expression #1, char 7: unknown option to `s'

> Can we at least push something that unbreaks bootstrap while deciding on
> the best final approach to use?

Since the problem is limited to poor error message quality, and I
figured out how to fix libvirt without a bootstrap upgrade, I'm now okay
waiting for the proper review of a fix rather than throwing a quick fix
in now that only needs reversion later.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to