`apt changelog foo` picks newer release than installed when custom
version is installed but the manual page states that the default is
meant to be the installed version.
$ man apt-get | grep '^ *changelog' -A3
changelog
changelog tries to download the changelog of a package and displays
it through sensible-pager. By default it displays the changelog for
the version that is installed. However, you can specify the same
options as for the install command.
I've recompiled restic locally to add a couple of patches that are not
yet merged upstream and the command `apt changelog restic` shows me the
version from unstable instead of my custom changelog. As far as I can
tell all the options that `apt install` provides to select non-default
versions also work for `apt changelog` though.
$ apt policy restic
restic:
Installed: 0.9.3+ds-1+pabs1
Candidate: 0.9.4+ds-1
Version table:
0.9.4+ds-1 800
800 https://deb.debian.org/debian unstable/main amd64 Packages
*** 0.9.3+ds-1+pabs1 100
100 /var/lib/dpkg/status
0.9.3+ds-1 900
900 https://deb.debian.org/debian testing/main amd64 Packages
$ apt changelog restic
Get:1 http://metadata.ftp-master.debian.org restic 0.9.4+ds-1 Changelog [7,041 B]
Fetched 7,041 B in 2s (3,036 B/s)
$ apt changelog restic/now
Get:1 store: restic 0.9.3+ds-1+pabs1 Changelog
Fetched 6,754 B in 0s (0 B/s)
$ apt changelog restic=0.9.3+ds-1+pabs1
Get:1 store: restic 0.9.3+ds-1+pabs1 Changelog
Fetched 6,754 B in 0s (0 B/s)