Control: clone -1 -2
Control: reassign -2 apt
Control: retitle -2 apt: Suppress dselect method "replacing available" message
Control: tag -2 patch

[ Leaving enough context for the apt cloned bug. ]

Hi!

On Sun, 2025-11-09 at 09:17:44 +0200, Martin-Éric Racine wrote:
> la 8.11.2025 klo 19.34 Guillem Jover ([email protected]) kirjoitti:
> > On Sun, 2025-11-02 at 11:41:15 +0200, Martin-Éric Racine wrote:
> > > Package: dselect
> > > Version: 1.22.21
> > > Severity: normal
> > > X-Debbugs-Cc: [email protected]
> >
> > > dselect displays the above on a system that has either an empty or
> > > non-existent /etc/apt/sources.list file. Meanwhile dselects' APT
> > > method obviously can use /etc/apt/sources.list.d/*.[list|sources]
> > > as normal. However, the above prompt is misleading.
> >
> > > Perhaps dselect should be updated to list all files found in
> > > /etc/apt/sources.list[.d/*] and omit empty files?
> >
> > This is not related to the apt source.list files or their format. This
> > is a recent change that switched the «dpkg --update-avail» invocation
> > to get its input from a «apt-cache dumpavail» pipe instead of having
> > to use a temporary file, which nowadays can be large.
> >
> >   
> > https://salsa.debian.org/apt-team/apt/-/commit/4d6fcb1dddd5654e7ba8bfa2705bbb4f2c4a6884
> >
> > I've updated the information message in dpkg to print in this case the
> > following text instead:
> >
> >   ,---
> >   Replacing available packages information from <standard input>.
> >   `---
> >
> > Which should be more clear, but I'm not sure whether it would help
> > with the confusion reported here? Otherwise, except for completely
> > suppressing the message from the apt's dselect method (in which case
> > this would need to be reassigned into apt), there's not much I think
> > can be done.
> 
> TBH, if /var/cache/apt/available simply is no longer used, keeping the
> message doesn't accomplish much.

Ok, let's do that as well then. I'm keeping this report in dpkg, for
the message update, and cloning it to apt to suppress the message,
which the attached patch should do.

Thanks,
Guillem
From 6ce30e87dd4ae4f1becc7be96e6e43c84f57a932 Mon Sep 17 00:00:00 2001
From: Guillem Jover <[email protected]>
Date: Thu, 13 Nov 2025 09:11:11 +0100
Subject: [PATCH] dselect: Suppress dpkg --update-avail action message

The message only mentions that it is updating from either "-" (with old
dpkg versions) or "<standard input>" (starting with dpkg 1.23.0) which
is not very descriptive, and more confusing than helpful.
---
 dselect/update | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dselect/update b/dselect/update
index 057e26e65..0992e5e9a 100755
--- a/dselect/update
+++ b/dselect/update
@@ -32,7 +32,11 @@ then
     # to dpkg, until enough time has passed that we have some guarantee it
     # is no longer left over in the cache directory (since apt 2.9.x).
     rm -f $CACHEDIR/available
-    $APTCACHE dumpavail | $DPKG "$DPKG_OPTS" --update-avail
+    # Suppress the dpkg action message as it only prints that it is updating
+    # from either "-" (with old dpkg versions) or "<standard input>" (starting
+    # with dpkg 1.23.0) which is not very descriptive, and more confusing than
+    # helpful.
+    $APTCACHE dumpavail | $DPKG "$DPKG_OPTS" --update-avail >/dev/null
 
     case "$CLEAN" in
 	Pre-Auto|PreAuto|pre-auto)
-- 
2.51.0

Reply via email to