bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] bootstrap: use a more consistent error reporting scheme.


From: Eric Blake
Subject: Re: [PATCH] bootstrap: use a more consistent error reporting scheme.
Date: Mon, 09 Jul 2012 18:00:33 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

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   address@hidden    +1-919-301-3266
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]