TLDR this will be fixed in 4.1 and it's a significant enough fix that I should probably release 4.1 to experimental

So, this was one of the edge cases mentioned in the design documentation for the revamped changelog filtering logic: when the persistent database is not being used in a particular invocation of the program or there is no data for a particular package in the database (this is what you ran into), and the changelog data for a package is being fetched over the network because it is not present in the package, we can't use historical changelog data to determine which entries to display and which to filter out.

I was going to treat this as a transitional issue arising from the switch to the new filtering logic, but I think it's going to happen more often than expected and not just because of that transition (e.g., it will happen whenever anybody installs a new package that doesn't have local changelogs and then later it gets upgraded), so I went ahead and implemented the additional logic I had suggested in bug#1052697: in this one particular edge case, fall back on version-number filtering like the program used to do.

However, the logic I've added back is not exactly like the old logic; it is more robust and careful not to exclude changelog entries it shouldn't. As a result, there will still be cases in which it decides it can't reliably filter the network changelog and display all of it. Fortunately, however, the case you cited in this bug is not one of those cases. ;-)

I added a unit test for this and it failed before this change and passes now.

jik

On 10/8/23 18:02, Russ Allbery wrote:
Package: apt-listchanges
Version: 4.0
Severity: normal
X-Debbugs-Cc:r...@debian.org

An apt run that included the following upgrades:

Unpacking python3.11-dev (3.11.6-3) over (3.11.6-2) ...
Unpacking libpython3.11-dev:amd64 (3.11.6-3) over (3.11.6-2) ...
Unpacking libpython3.11:amd64 (3.11.6-3) over (3.11.6-2) ...
Unpacking python3.11-venv (3.11.6-3) over (3.11.6-2) ...
Unpacking python3.11 (3.11.6-3) over (3.11.6-2) ...
Unpacking libpython3.11-stdlib:amd64 (3.11.6-3) over (3.11.6-2) ...
Unpacking python3.11-minimal (3.11.6-3) over (3.11.6-2) ...
Unpacking libpython3.11-minimal:amd64 (3.11.6-3) over (3.11.6-2) ...
Unpacking python3.11-doc (3.11.6-3) over (3.11.6-2) ...

appears to have gotten confused about what entries I would have seen before
and showed me what appeared to be the entire python3.11 changelog. I thought
it may have only been because the package name in that changelog changes
over time, but it also showed me the entries for 3.11.6-2 and 3.11.6-1,
which have the same source and binary package names and were already
installed. That makes me think something more fundamental may have gone
wrong.

I'm not completely sure which package the changelog entries were pulled from.
I spot-checked a few of them on disk and they all seemed to be truncated at
python3.8, but apt-listchanges found and displayed changelog entries going
back to python2.* versions.

-- Package-specific info:
==> /etc/apt/listchanges.conf <==
[apt]
frontend=pager
email_address=none
confirm=0
save_seen=/var/lib/apt/listchanges
which=both
no_network=false
headers=false
reverse=false


-- System Information:
Debian Release: trixie/sid
   APT prefers unstable
   APT policy: (990, 'unstable'), (500, 'unstable-debug'), (500, 'testing'), 
(1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt-listchanges depends on:
ii  apt                    2.7.6
ii  debconf [debconf-2.0]  1.5.82
ii  python3                3.11.4-5+b1
ii  python3-apt            2.6.0
ii  python3-debconf        1.5.82
ii  sensible-utils         0.0.20
ii  ucf                    3.0043+nmu1

apt-listchanges recommends no packages.

Versions of packages apt-listchanges suggests:
ii  chromium [www-browser]              117.0.5938.149-1
ii  firefox [www-browser]               118.0-1+b1
ii  google-chrome-stable [www-browser]  117.0.5938.149-1
ii  links [www-browser]                 2.29-1+b1
ii  lynx [www-browser]                  2.9.0dev.12-1
ii  postfix [mail-transport-agent]      3.8.2-1
ii  python3-gi                          3.46.0-1
ii  w3m [www-browser]                   0.5.3+git20230121-2
ii  xterm [x-terminal-emulator]         385-1

-- debconf information:
* apt-listchanges/headers: false
   apt-listchanges/email-format: text
* apt-listchanges/frontend: pager
* apt-listchanges/email-address:
* apt-listchanges/reverse: false
* apt-listchanges/confirm: false
* apt-listchanges/which: both
* apt-listchanges/save-seen: true
* apt-listchanges/no-network: false

Reply via email to