retitle 1115854 python3-apt: creates /etc/apt/sources.list post-migration reassign 1115854 python3-apt found 1115854 3.0.0 thanks
>Considering that apt, as of a few weeks before the trixie release, >has complained *LOUDLY* about the sources.list format (this seems >to have quietened for the actual release), people are migrating to >the deb822-sources format. > >However, the command “unattended-upgrade --download-only”, as run >by /usr/lib/systemd/system/apt-daily.service, creates a sources.list >file if deleted (i.e. the transition has finished). It should not >do that. > >(I’ve not traced what precisely within it creates it, only traced >this far with “sh -x”, as u-u is Python3 and thus harder to trace.) I’ve now traced this down to just: root@trixie:~# python3 Python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import apt >>> apt.Cache(rootdir='/') <apt.cache.Cache object at 0x7f00db201160> This is sufficient to create an empty /etc/apt/sources.list which causes Ansible to perpetually change things and which will cause apt to, eventually, complain about its existence again. >It also should not do that because this is basically overriding the >local admin’s choice (recreating a conffile the admin deleted), and >it’s annoying in ansible output when the latter is deleting the same >file over and over again and people wonder what’s changed… > >Please fix this and bring the fix into a point release of trixie. Thanks in advance, //Thorsten -- Thorsten Glaser Linux / Unix Developer Tel.: +49 160 91168501 E-Mail: [email protected] B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / https://www.b1-systems.de/ GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537

