From nobody Tue May 7 17:55:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568793542; cv=none; d=zoho.com; s=zohoarc; b=W4x0H4E6kejsceOj7Cu2zcCccw9HAAy2Szyzd/eaVit45OB85vwi2glSFZnUccRGPU0MUGr1SQ+5Sp+VbGO3gEuIJSsTc0IJkCfbzjnUlWADmlVbMk3+GuB3aU4Gh068Gg8Gx4MmpWNY7rC6SUb3F/ZaPvDYAfCCj34knoxtYWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568793542; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=fbMdM5/62kKPPTLk/YC3p2Xd73xrmX6lQZHIoio5zNE=; b=Vs+wKjbR/1N7a7tvLqWGhigRco01ybXEJkmDT5dLE/lBLQMqzZ9FAw5mZuDpcAsT1Bo0/xMzcQC7OFhJ/Mp5GOwR/Q+zpL2AMs0iUn8hoXAgZ0Y6Y8XCgdeBL5QjrFdCTr9YUPrJDZ54GplAZOUXTNJCFj/OHqKY+hoi34qfqwI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568793542060304.2499653890228; Wed, 18 Sep 2019 00:59:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADA964E832; Wed, 18 Sep 2019 07:58:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C751600C8; Wed, 18 Sep 2019 07:58:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 077CB4E58A; Wed, 18 Sep 2019 07:58:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8I7wuKU007119 for ; Wed, 18 Sep 2019 03:58:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3191B5D6B2; Wed, 18 Sep 2019 07:58:56 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE4D85D6A5 for ; Wed, 18 Sep 2019 07:58:55 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Sep 2019 09:58:50 +0200 Message-Id: <25890d6b3433f21f232668c52824bbf11a94425d.1568793426.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] Revert "virt-result.m4: Colourize summary printings" X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 18 Sep 2019 07:59:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The colorization based on the string itself makes little to no sense as the semantic meaning of the color (red =3D bad, green =3D good) is not extracted from the semantics of the message: 1) If there is some additional string a 'yes' is marked yellow: configure: driver_modules: yes (CFLAGS=3D'' LIBS=3D'-ldl') 2) In some cases a 'no' is actually good: configure: hal: no 3) Few good/recommended configuration options are still yellow: configure: QEMU: qemu:qemu while using 'root:root' would still be yellow. 4) fields dumping config (e.g. the warning flags line) is a giant blob of colored text which makes little sense configure: Warning Flags: -fno-common -W -Wabsolute-value -Waddress -Waddress-of-packed-member -Waggressive-loop-optimizations -Wall -Wattribute-warning -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcannot-profile -Wcast-align -Wcast-align=3Dstrict -Wcast-function-type -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-cond -Wduplicate-decl-speci ... In addition if the idea is to switch to a more usable build system it does not make sense to clutter the current one with more code. This reverts commit 4b3ab5d2135a0dccd654491ef3a4f5b71575deae. --- m4/virt-result.m4 | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/m4/virt-result.m4 b/m4/virt-result.m4 index 9115be5774..36973ba0b5 100644 --- a/m4/virt-result.m4 +++ b/m4/virt-result.m4 @@ -31,27 +31,12 @@ dnl eg dnl dnl LIBVIRT_RESULT([yajl], [yes], [-I/opt/yajl/include -lyajl]) dnl - -m4_defun_init([_AS_ECHO_LOG_N], -[AS_REQUIRE([_AS_LINENO_PREPARE])], -[_AS_ECHO_N([$as_me:${as_lineno-$LINENO}: $1], AS_MESSAGE_LOG_FD)]) - -m4_defun_init([AS_MESSAGE_N], -[AS_REQUIRE([_AS_ME_PREPARE])], -[m4_ifval(AS_MESSAGE_LOG_FD, - [{ _AS_ECHO_LOG_N([$1]) -_AS_ECHO_N([$as_me: $1], [$2]);}], - [_AS_ECHO_N([$as_me: $1], [$2])])[]]) - AC_DEFUN([LIBVIRT_RESULT], [ - STR=3D`printf "%20s: " "$1"` if test "$2" =3D "no" || test -z "$3" ; then - VAL=3D`printf "%s" "$2"` + STR=3D`printf "%20s: %s" "$1" "$2"` else - VAL=3D`printf "%s (%s)" "$2" "$3"` + STR=3D`printf "%20s: %s (%s)" "$1" "$2" "$3"` fi - AS_MESSAGE_N([$STR]) - _AS_ECHO([$VAL], AS_MESSAGE_LOG_FD) - COLORIZE_RESULT([$VAL]) + AC_MSG_NOTICE([$STR]) ]) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 17:55:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568793542; cv=none; d=zoho.com; s=zohoarc; b=T/u8Eqd6vxQUNZjs+bvMqaOKgsPuXXA0EasdZuXIRe3o5LcYlJGAsFx/wOivORUJMfpXTcpVHMqiSIZ8OmuSlS0v92spi1+oY/y2EMdTabnf4amiNvGm9l1VuzwbIFF7gCb2pLwNSRygGz6DVBVCAEEymvJlmYS0GH5EELrlREg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568793542; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/YiYUNp/w7BQ1WDQ7o4CNu8wNQVOWBrVLp18kQ7Rt9g=; b=ms7agYZBJqQbwm9HsztqQRwo13My1sR+ZFBlfgM+raauiflXIcVf1DXb0eshtJnoCfzN55I4iACAzjG0OJRa75b+vxVduyO+Y2dXvXfylWKqI8WF+AhmN4tc2bY9+1T+/ra7aKzjMGKDwUU/EOj7MAxO4e6bMJqv/rczGuL9bNk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156879354250132.926198252074414; Wed, 18 Sep 2019 00:59:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AF1F18CB8FC; Wed, 18 Sep 2019 07:59:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 594D35D6B2; Wed, 18 Sep 2019 07:59:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B9BFB180B536; Wed, 18 Sep 2019 07:58:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8I7wvuY007128 for ; Wed, 18 Sep 2019 03:58:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 00A8F5D6B2; Wed, 18 Sep 2019 07:58:57 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EA0E5D6A5 for ; Wed, 18 Sep 2019 07:58:56 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Sep 2019 09:58:51 +0200 Message-Id: <8a166d5c19527c4eb94b4064262dac4e87a2678c.1568793426.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] Revert "configure: Colorize output" X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Wed, 18 Sep 2019 07:59:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The colors are not based on the semantics of the message but rather on the message itself. This means that the default human-perceived semantics (red =3D bad, green =3D good) don't really apply and spotting a color does not mean anythting. This is amplified by the sheer amount of output which configure produces and the fact that some of the messages have negative semantics or additional output. In case of any problem the user will have to go through everything anyways as spotting a red or yellow line has 0 information value. Here are a few examples: 1) some 'no' messages are not a problem: checking minix/config.h presence... no 2) some 'no' messages are actually positive: checking for special C compiler options needed for large files... no 3) in some cases a 'yes' would mean that something is broken or needs workaround checking whether stat file-mode macros are broken... no checking whether wint_t is too small... no checking whether stdint.h predates C++11... no checking whether the inttypes.h PRIxNN macros are broken... no checking whether clang gives bogus warnings for -Wdouble-promotion... no checking whether gettimeofday clobbers localtime buffer... no 4) due to string match based colors extra text makes messages yellow checking for a traditional french locale... none checking for working nanosleep... no (mishandles large arguments) checking for library containing gethostbyname... none required checking whether mbrtowc handles incomplete characters... (cached) guessi= ng yes 5) in some cases the yes/no is very context dependant checking whether pthread_rwlock_rdlock prefers a writer to a reader... no checking whether this build is done by a static analysis tool... no 6) detected paths to binaries and libs are yellow despite being present checking for objdump... objdump checking for atomic ops implementation... gcc As of the reasons above I don't think the colorization of the configure output helps users or developers to debug the build process and thus is not worth the extra code or output clutter. This reverts commit c98174ce087fe23f567292132e961d4685faf337. --- m4/virt-colours.m4 | 62 ---------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 m4/virt-colours.m4 diff --git a/m4/virt-colours.m4 b/m4/virt-colours.m4 deleted file mode 100644 index 251778f2ff..0000000000 --- a/m4/virt-colours.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl Colourful configure -dnl -dnl Copyright (C) 2015 Nobuyoshi Nakada -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . - -AC_DEFUN([_COLORIZE_RESULT_PREPARE], [ - msg_checking=3D msg_result_yes=3D msg_result_no=3D msg_result_other=3D= msg_reset=3D - AS_IF([test -t 1], [ - msg_begin=3D"`tput smso 2>/dev/null`" - AS_CASE(["$msg_begin"], ['=1B@<:@'*m], - [msg_begin=3D"`echo "$msg_begin" | sed ['s/[0-9]*m$//']`" - msg_checking=3D"${msg_begin}33m" - AS_IF([test ${TEST_COLORS:+set}], [ - msg_result_yes=3D[`expr ":$TEST_COLORS:" : ".*:pass=3D\([^:]*\):"`] - msg_result_no=3D[`expr ":$TEST_COLORS:" : ".*:fail=3D\([^:]*\):"`] - msg_result_other=3D[`expr ":$TEST_COLORS:" : ".*:skip=3D\([^:]*\):"`] - ]) - msg_result_yes=3D"${msg_begin}${msg_result_yes:-32;1}m" - msg_result_no=3D"${msg_begin}${msg_result_no:-31;1}m" - msg_result_other=3D"${msg_begin}${msg_result_other:-33;1}m" - msg_reset=3D"${msg_begin}m" - ]) - AS_UNSET(msg_begin) - ]) - AS_REQUIRE_SHELL_FN([colorize_result], - [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])], - [AS_CASE(["$[]1"], - [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")], - [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")], - [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])]) -]) - -AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl - AS_LITERAL_IF([$1], - [m4_case([$1], - [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])], - [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])], - [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])], - [colorize_result "$1"]) dnl -]) - -AC_DEFUN([AC_CHECKING],[dnl -AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl -AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])]) - -AC_DEFUN([AC_MSG_RESULT], [dnl -{ _AS_ECHO_LOG([result: $1]) -COLORIZE_RESULT([$1]); dnl -}]) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list