* Re: Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations) [not found] <173791554931.11406.7776184826380347386.reportbug@teal.home> @ 2025-01-26 22:19 ` Chris Hofstaedtler 2025-02-03 20:53 ` Thomas Weißschuh 0 siblings, 1 reply; 3+ messages in thread From: Chris Hofstaedtler @ 2025-01-26 22:19 UTC (permalink / raw) To: Thomas Weißschuh; +Cc: util-linux, Axel, 1094283 Hello Thomas, 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. 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? Reverting 4bdf22803f9a41329694e0c3c82189635dccdcd0 fixes the problem for me. Debug output from TERMINAL_COLORS_DEBUG=0xffff ./dmesg | 321357: termcolors: CONF: terminal is ready (supports 256 colors) | 321357: termcolors: CONF: reading dir: '/root/.config/terminal-colors.d' | 321357: termcolors: CONF: reading dir: '/etc/terminal-colors.d' | 321357: termcolors: CONF: item 'dmesg.disable': score=21 [cur: 0, name(5): dmesg.disable, term(0): (null)] | 321357: termcolors: CONF: setting 'disable' from 0 -to-> 21 | Colors: | utilname = 'dmesg' | termname = 'xterm-256color' | scheme file = '(null)' | mode = auto | has_colors = 1 | disabled = 0 | configured = 1 | cs configured = 0 | | score disable = 21 | score enable = 0 | score scheme = 0 After reverting 4bdf22803f9a41329694e0c3c82189635dccdcd0: | 321318: termcolors: CONF: terminal is ready (supports 256 colors) | 321318: termcolors: CONF: reading dir: '/root/.config/terminal-colors.d' | 321318: termcolors: CONF: reading dir: '/etc/terminal-colors.d' | 321318: termcolors: CONF: item 'dmesg.disable': score=21 [cur: 0, name(5): dmesg.disable, term(0): (null)] | 321318: termcolors: CONF: setting 'disable' from 0 -to-> 21 | Colors: | utilname = 'dmesg' | termname = 'xterm-256color' | scheme file = '(null)' | mode = never | has_colors = 0 | disabled = 0 | configured = 1 | cs configured = 0 | | score disable = 21 | score enable = 0 | score scheme = 0 Thanks, Chris ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations) 2025-01-26 22:19 ` Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations) Chris Hofstaedtler @ 2025-02-03 20:53 ` Thomas Weißschuh 2025-02-03 21:07 ` Chris Hofstaedtler 0 siblings, 1 reply; 3+ messages in thread From: Thomas Weißschuh @ 2025-02-03 20:53 UTC (permalink / raw) To: Chris Hofstaedtler; +Cc: util-linux, Axel, 1094283 Hi Chris, 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 ? Thomas ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations) 2025-02-03 20:53 ` Thomas Weißschuh @ 2025-02-03 21:07 ` Chris Hofstaedtler 0 siblings, 0 replies; 3+ messages in thread From: Chris Hofstaedtler @ 2025-02-03 21:07 UTC (permalink / raw) To: Thomas Weißschuh; +Cc: util-linux, Axel, 1094283-quiet Hi Thomas, * Thomas Weißschuh <thomas@t-8ch.de> [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 <zeha@debian.org> You may want: Reported-by: Axel <axel.scheepers76@gmail.com> Thanks! Chris ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-03 21:08 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <173791554931.11406.7776184826380347386.reportbug@teal.home> 2025-01-26 22:19 ` Bug#1094283: util-linux: dmesg shows color when /etc/terminal-colors.d/disable is present (and no override in xdg locations) Chris Hofstaedtler 2025-02-03 20:53 ` Thomas Weißschuh 2025-02-03 21:07 ` Chris Hofstaedtler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).