Debian Bug report logs - #1032797
aptitude: apt's message threshold level should be configurable in aptitude (especially for the TUI), maybe via --log-level?

version graph

Package: aptitude; Maintainer for aptitude is Aptitude Development Team <[email protected]>; Source for aptitude is src:aptitude (PTS, buildd, popcon).

Reported by: Axel Beckert <[email protected]>

Date: Fri, 10 Mar 2023 14:33:01 UTC

Severity: wishlist

Found in version aptitude/0.8.13-5

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Aptitude Development Team <[email protected]>:
Bug#1032654; Package aptitude. (Fri, 10 Mar 2023 14:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent Lefevre <[email protected]>:
New Bug report received and forwarded. Copy sent to Aptitude Development Team <[email protected]>. (Fri, 10 Mar 2023 14:33:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Vincent Lefevre <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: aptitude: missing message about the Debian bookworm change concerning non-free-firmware
Date: Fri, 10 Mar 2023 15:27:58 +0100
Package: aptitude
Version: 0.8.13-5
Severity: important

I'm using testing+unstable, and Debian changed the non-free component
to "non-free non-free-firmware" some time ago, and nothing has been
announced. I've recently learnt that with apt 2.6, a message is output
about that with "apt update", but I got nothing with updates from the
aptitude UI.

I have just tried "apt update" and got:

15 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'Debian bookworm' changed its 'non-free component' value from 'non-free' to 'non-free non-free-firmware'
N: More information about this can be found online in the Release notes at: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split

This message should have been displayed by aptitude. Without it, the
user who uses aptitude only may never be aware of this change and will
miss future updates of the concerned packages (which are important for
security reasons).

-- Package-specific info:
Terminal: xterm-256color
$DISPLAY is set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.8.13
Compiler: g++ 12.1.0
Compiled against:
  apt version 6.0.0
  NCurses version 6.3
  libsigc++ version: 2.10.8
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 6.4.20221231
  cwidget version: 0.5.18
  Apt version: 6.0.0

aptitude linkage:
	linux-vdso.so.1 (0x00007ffdc6f9e000)
	libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f381c337000)
	libapt-pkg.so.6.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0 (0x00007f381bc05000)
	libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f381c2fd000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f381c2cb000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007f381c2c2000)
	libcwidget.so.4 => /usr/lib/x86_64-linux-gnu/libcwidget.so.4 (0x00007f381bb13000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f381b9b4000)
	libboost_iostreams.so.1.74.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 (0x00007f381c2a8000)
	libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007f381b600000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f381c2a3000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f381b200000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f381b8d5000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f381c281000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f381b41f000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f381c27c000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f381c25d000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f381c24a000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f381c219000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f381b8af000)
	libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f381b144000)
	libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x00007f381b882000)
	libsystemd.so.0 => /usr/lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f381b075000)
	libgcrypt.so.20 => /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f381af2e000)
	libxxhash.so.0 => /usr/lib/x86_64-linux-gnu/libxxhash.so.0 (0x00007f381b86b000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f381c364000)
	libuuid.so.1 => /usr/lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f381b861000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f381b855000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f381af06000)

-- System Information:
Debian Release: 12.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-6-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages aptitude depends on:
ii  aptitude-common           0.8.13-5
ii  libapt-pkg6.0             2.6.0
ii  libboost-iostreams1.74.0  1.74.0+ds1-20
ii  libc6                     2.36-8
ii  libcwidget4               0.5.18-6
ii  libgcc-s1                 12.2.0-14
ii  libncursesw6              6.4-2
ii  libsigc++-2.0-0v5         2.12.0-1
ii  libsqlite3-0              3.40.1-1
ii  libstdc++6                12.2.0-14
ii  libtinfo6                 6.4-2
ii  libxapian30               1.4.22-1

Versions of packages aptitude recommends:
ii  libdpkg-perl    1.21.21
ii  sensible-utils  0.0.17+nmu1

Versions of packages aptitude suggests:
pn  apt-xapian-index                <none>
ii  aptitude-doc-en [aptitude-doc]  0.8.13-5
pn  debtags                         <none>
ii  tasksel                         3.72

-- no debconf information

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Information forwarded to [email protected], Aptitude Development Team <[email protected]>:
Bug#1032654; Package aptitude. (Sat, 11 Mar 2023 18:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <[email protected]>:
Extra info received and forwarded to list. Copy sent to Aptitude Development Team <[email protected]>. (Sat, 11 Mar 2023 18:21:04 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Axel Beckert <[email protected]>
To: Vincent Lefevre <[email protected]>, [email protected]
Subject: Re: [Aptitude-devel] Bug#1032654: aptitude: missing message about the Debian bookworm change concerning non-free-firmware
Date: Sat, 11 Mar 2023 19:16:52 +0100
Control: clone -1 -2
Control: retitle -2 aptitude: "aptitude -u" does not show download warnings emitted by "aptitude update" after the successful download of package lists.
Control: clone -1 -3
Control: retitle -3 aptitude: "aptitude update" does not show all NOTICE level messages if apt would change the default messages threshold to NOTICE
Control: severity -3 minor
Control: submitter -3 !
Control: clone -1 -4
Control: retitle -4 aptitude: apt's message threshold level should be configurable in aptitude (especially for the TUI), maybe via --log-level?
Control: severity -4 wishlist
Control: submitter -4 !
Control: severity -1 minor
Control: tag -1 + wontfix

Hi Vincent,

thanks for making us aware of the subtle difference between apt and
aptitude with regards to warnings and notices.

> This message should have been displayed by aptitude.

Did you test "aptitude update" or "aptitude -u" or both? It's not
clear from your bug report so far. (They behave differently in this
hindsight as I found out while digging into this topic, see below.)

> Without it, the user who uses aptitude only may never be aware of
> this change […]

This is wrong. Without doubt this type of information will be part of
the release notes — which is usually the _primary_ source for these
type of changes. I'm actually surprised that apt added such a message.

Besides that, the apt developers decided to output this only as LOW
severity message on the "notice" level (prefix by "N:" and in normal
font face; AFAIK the lowest level).

Aptitude shows "error" messages from apt to the user, but only those
at the "WARNING" level or above (or at least only from somewhere above
the "NOTICE" level). It is currently unclear to me if this is
historically grown as apt (not aptitude) defines the _default_ message
threshold by apt in /usr/include/apt-pkg/error.h as "WARNING" in at
least three places. I at least currently assume that this is what
aptitude uses when it calls DumpErrors. According the apt's changelog,
"WARNING" was for quite some time also the lowest possible message
level. ("NOTICE" and "DEBUG" levels got added in 0.7.26~exp8.)

I also do see some sense to suppress some less important messages in
aptitude: All those messages would cause popup window in the TUI mode
which the user has to acknowledge (aka "to click away"). That can get
very annoying if there are too many low severity messages. So IMHO
it's not so bad that aptitude only shows more important messages.
Besides, it's the default threshold from apt.

Then again, "aptitude -u" does not show any of the warnings (or
notices) I currently get with "aptitude update", so "aptitude -u" only
seems to cause popups of warnings which are caused directly during the
download and not after a successful download. Cloning this as a
separate bug report.

Anyway, back to the original topic. So I edited
/usr/include/apt-pkg/error.h temporarily and replaced all but the
first occurence (which is the definition) of WARNING with NOTICE and
then compiled aptitude against it. aptitude update indeed
showed notices now. But to my surprise not all of them, just this one:

  N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:/var/cache/apt-build/repository apt-build InRelease' doesn't support architecture 'i386'

Not yet sure if this is a bug in the way how the missing notices are
generated in apt or if it is a bug in aptitude not coping with the
changed default message threshold. Likely needs deeper investigation
(or better overview of the code), probably by Manuel. (I already put
hours in investigating this IMHO rather minor issue, just to
understand a bit how the innards of messages inside apt and aptitude
are working.) Filing as yet another separate bug report against
aptitude (for now at least), but with severity minor, as it currently
does only show up after a hypothetical modification in apt.

I'm also surprised that, despite the default threshold in
/usr/include/apt-pkg/error.h is WARNING, both, "apt update" and
"apt-get update" show notices. So the apt developers changed the
thresholds for both CLI frontends individually? Weird.

And JFTR: "aptitude update" does show the WARNING level messages from
apt about "Key is stored in legacy trusted.gpg keyring
(/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for
details." which apt also shows in a bold font face compared to
seemingly not important messages like these about the
non-free-firmware repo. (Not "aptitude -u", though.)

Admittedly the message level threshold of aptitude should be user
configurable so that every user/admin can adjust their own TUI popup
annoyance level.

Actually I would have expected to see those notices on
--log-level=info, but I didn't and from the code it also seems that
this option has no influence on how aptitude uses apt's DumpErrors().

Anyway, despite I uncovered some more severe issues while trying to
understand how apt's and aptitude's message handling works internally,
I strongly disagree about the severity of the initial bug report (at
least those parts which were clear enough) and agree with the apt
developers that the message about the Debian bookworm change
concerning non-free-firmware is only a notice, not a warning.

And I don't expect that Manuel (and surely not me myself) will change
something in the way aptitude handles messages from apt for bookworm
as it likely will be way more invasive than is good at this stage of
the freeze. Hence tagging it as wontfix, too.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug 1032654 cloned as bug 1032795 Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:04 GMT) (full text, mbox, link).


Bug 1032654 cloned as bug 1032796 Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:05 GMT) (full text, mbox, link).


Bug 1032654 cloned as bug 1032797 Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:08 GMT) (full text, mbox, link).


Changed Bug title to 'aptitude: apt's message threshold level should be configurable in aptitude (especially for the TUI), maybe via --log-level?' from 'aptitude: missing message about the Debian bookworm change concerning non-free-firmware'. Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:08 GMT) (full text, mbox, link).


Severity set to 'wishlist' from 'important' Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:09 GMT) (full text, mbox, link).


Changed Bug submitter to 'Axel Beckert <[email protected]>' from 'Vincent Lefevre <[email protected]>'. Request was from Axel Beckert <[email protected]> to [email protected]. (Sat, 11 Mar 2023 18:21:09 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 09:16:52 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.