[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1110900: apt update misleadingly says "All packages are up-to-date" when no package sources are configured



Package: apt
Version: 2.6.1
Severity: minor
X-Debbugs-Cc: T.Duehrsen@gmx.net

Dear Maintainer,

in the process of upgrading from Bookworm to Trixie, I am changing the sources format from traditional to Deb822.
There is a brief window where no sources are configured at all. If I run `apt update` during this window, apt reports
that "All packages are up-to-date" without any warning or error, even though no sources are present.

Steps to reproduce:
1. Remove all configured package sources (both classic sources.list and Deb822 `.sources` files).
2. Run `apt update`.

Observed behaviour:
The output says "All packages are up to date" with no warning or error, even though no sources were configured and nothing was actually checked.

Expected behaviour:
Apt should print an error or warning such as:
  W: No package sources are configured -- cannot check for updates.
This avoids giving a false impression that updates were checked.

Why this matters:
The current output can hide misconfiguration (e.g., during migration from sources.list to Deb822 format). A user may incorrectly believe their system is fully up-to-date when in fact no sources were consulted.

Transcript:
------------------------------------------------------------
root@kleintierlaptop:~/upgrade-bookworm-to-trixie# cd /etc/apt/
root@kleintierlaptop:/etc/apt# ls -laFht
total 72K
drwxr-xr-x 163 root root  12K Aug 10 19:04 ../
drwxr-xr-x   2 root root 4.0K May 21 11:27 trusted.gpg.d/
drwxr-xr-x   2 root root 4.0K Jun 28  2023 apt.conf.d/
drwxr-xr-x   9 root root 4.0K Jun 28  2023 ./
lrwxrwxrwx   1 root root   21 Jun 28  2023 sources.list -> sources.list.bookworm
-rw-r--r--   1 root root 2.6K Jun 28  2023 sources.list.bookworm
drwxr-xr-x   2 root root 4.0K May 25  2023 keyrings/
-rw-r--r--   1 root root 2.1K Oct 30  2021 sources.list.bullseye
drwxr-xr-x   2 root root 4.0K Mar 28  2021 listchanges.conf.d/
-rw-r--r--   1 root root  146 Dec 25  2019 listchanges.conf
-rw-r--r--   1 root root 1.9K Dec 24  2019 sources.list.buster
drwxr-xr-x   2 root root 4.0K May 28  2019 auth.conf.d/
-rw-r--r--   1 root root 1.9K Sep 30  2017 sources.list.stable
-rw-r--r--   1 root root 2.0K Sep 30  2017 sources.list.stretch
-rw-r--r--   1 root root 1.9K Sep 30  2017 sources.list.jessie
-rw-r--r--   1 root root    0 Jul 30  2015 sources.list~
drwxr-xr-x   2 root root 4.0K Apr 13  2015 preferences.d/
drwxr-xr-x   2 root root 4.0K Apr 13  2015 sources.list.d/
root@kleintierlaptop:/etc/apt# rm sources.list
root@kleintierlaptop:/etc/apt# apt update
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
------------------------------------------------------------

Please let me know if more debugging info is needed.


Reply to: