Re: Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations)

Chris Hofstaedtler <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <sse3v4kouvltpyo6psj33b2ljlfqwr5ww6me7vk5fvrqn7wghq@h3d4hs3ni6q3>
Hi Thomas,

* Thomas Weißschuh <[email protected]> [250203 21:53]:
> On 2025-01-26 23:19:31+0100, Chris Hofstaedtler wrote:
> > it appears commit 4bdf22803f9a41329694e0c3c82189635dccdcd0 breaks
> > disabling colors using the documented mechanism of touching
> > /etc/terminal-colors.d/dmesg.disable. See below for a user report.
> 
> Thanks for the report.
> 
> > On Sun, Jan 26, 2025 at 07:19:09PM +0100, Axel wrote:
> > > Package: util-linux
> > > Version: 2.40.4-1
> > > 
> > > Running dmesg after upgrading to trixie started showing color. The manpage
> > > mentions creating /etc/terminal-colors.d/disable which should disable colors
> > > for all. Creating the also mentioned /etc/terminal-colors.d/dmesg.disable
> > > doesn't disable color output also. I had /etc/terminal-colors.d/disable
> > > configured which did disable colors on -stable.
> > 
> > From what I can tell, the new rc = -ENOENT in colors_readdir
> > introduced in 4bdf22803f9a41329694e0c3c82189635dccdcd0 bubbles up to
> > colors_init:
> > 
> > 	int rc = colors_read_configuration(cc);  // calls colors_readdir, now returns -2
> > 	if (rc)
> > 		cc->mode = UL_COLORMODE_DEFAULT;
> >     else {
> > Evaluating color scores is skipped, effectively ignoring the
> > "disable" file.
> > 
> > Could you please take a look?
> 
> Could you test https://github.com/util-linux/util-linux/pull/3397 ?

Works for me.

Tested-by: Chris Hofstaedtler <[email protected]>

You may want:
Reported-by: Axel <[email protected]>


Thanks!
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.