Web lists-archives.com

Re: make compilation not so gray




On Fri, May 25, 2018 at 02:21:34PM +0200, Adam Borowski wrote:

> I heard a rumour some of us might need to read a package build log from time
> to time.  Those have grown enormously wordy during past decades: we include
> all kinds of doodads about the build environment, and the compilation itself
> has all verbosity options turned on.  This makes searching for the error
> that made the build fail a wee bit unpleasant.

Indeed.

> I propose to add a new flag: DEB_BUILD_OPTIONS=color.
> 
> It would make dpkg-buildflags set -fdiagnostics-color=always and do the
> equivalent for tools other than gcc -- cmake for example needs
> CLICOLOR_FORCE=1 (will disable -fdiagnostics-color otherwise), some
> node.php#++ might need yet another option.  By having dpkg-buildflags (gcc
> args) and debhelper (env) set the vars, we'd need to research this just once
> per tool.

That would be very helpful.

Even more helpful would be to NOT display anything irrelevant. When a
package fails to build, I am generally only interested in the error
message, not everything that led up to it, because up until the error
message everything went fine, and the likelyhood that there was any
valuable information up to that point is very small. And, since builds
should be reproducible, once I know there is an error I can probably
start a rebuild myself with all debugging output enabled if I'd think
that would help.

But, if coloring is enabled and part of the logs, one could make viewing
the logs smarter: just show only the colored lines (and any line
containing the word "error", and a few uncolored lines leading up to
them) by default, and have a way to get the full logs if desired.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <guus@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature