[libvirt] [PATCH 2/4] virt-result.m4: Align string more generously

Cole Robinson crobinso at redhat.com
Wed Sep 11 22:30:37 UTC 2019


On 9/9/19 3:49 AM, Michal Privoznik wrote:
> The times, when we had small CRTs are long gone. Now, in the era
> of wide screens we can be more generous when it comes to aligning
> the output of configure. The longest string before the colon is
> 'wireshark_dissector' which counts 19 characters.  Therefore,
> align the strings at 20.
> 
> At the same time, drop the useless result alignment. It behaves
> oddly - it puts a space at the end of each "no" because of the
> %-3s format we use.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  m4/virt-result.m4 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/m4/virt-result.m4 b/m4/virt-result.m4
> index cc622fe35b..36973ba0b5 100644
> --- a/m4/virt-result.m4
> +++ b/m4/virt-result.m4
> @@ -33,9 +33,9 @@ dnl  LIBVIRT_RESULT([yajl], [yes], [-I/opt/yajl/include -lyajl])
>  dnl
>  AC_DEFUN([LIBVIRT_RESULT], [
>    if test "$2" = "no" || test -z "$3" ; then
> -    STR=`printf "%10s: %-3s" "$1" "$2"`
> +    STR=`printf "%20s: %s" "$1" "$2"`
>    else
> -    STR=`printf "%10s: %-3s (%s)" "$1" "$2" "$3"`
> +    STR=`printf "%20s: %s (%s)" "$1" "$2" "$3"`
>    fi
>  
>    AC_MSG_NOTICE([$STR])
> 

For the first 2:

Reviewed-by: Cole Robinson <crobinso at redhat.com>

I like the look of the colors and I agree it speeds up visually scanning
the configure output. But I'm neutral on whether adding more m4 to the
build system to facilitate it is worth it. So I'll abstain from giving
ack or nack on those.

If you push the first two independently you may want to strip mention of
colour from their commit messages

- Cole




More information about the libvir-list mailing list