1

When trying to view changelogs of apt packages, aptitude often gives the error Cannot display changelog: Origin of <package> is unknown (maybe not an official Debian package ...). The word "Debian" here is a bit misleading, because so far, it seems to me that only the packages which come from sources listed in the main file /etc/apt/sources.list can have "changelogs". In my case, those are Ubuntu packages, which, although derived from corresponding Debian packages, come from http://archive.ubuntu.com/ubuntu/ and often have ubuntu in the version of the package, suggesting that Ubuntu maintainers rebuild the distributed binaries.

man aptitude mentions changelogs in two places:

  1. in description of changelog command:

    changelog

    Downloads and displays the Debian changelog for each of the given source or binary packages.

  2. In description of environment variable $PAGER:

    PAGER

    If this environment variable is set, aptitude will use it to display changelogs when “aptitude changelog” is invoked. If not set, it defaults to more.

Is there any way to make aptitude show changelogs for non-Debian packages? Is there some magic line that could be added to /etc/apt/sources.list.d/* files to make it do so?

Do non-"Debian" package providers even have a way to provide changelogs to users?

P.S. Same thing applies to apt changelog, which fails with error message:

E: Failed to fetch changelog:/<package>.changelog  Changelog unavailable for <package>-<version>

obviously, aptitude, apt changelog, and apt-listchanges all use the same files for their output.

0

3 Answers 3

2

If they’re not available in full locally, changelogs are retrieved from metadata services, respectively https://metadata.ftp-master.debian.org/changelogs/ for Debian and https://changelogs.ubuntu.com/changelogs/pool for Ubuntu. The behaviour depends on the configured origin, and can be viewed with

apt-config dump Acquire::Changelogs

Other repositories can provide the appropriate service and configuration snippets, but I’m not aware of any that do.

On Ubuntu, packages ship truncated changelogs, so apt changelog will always try to retrieve the changelog from the server.

The URL used to retrieve a given package’s changelogs can be obtained with

apt changelog --print-uris ...

aptitude uses different configuration directives, and APT::Changelogs::Server is the key pointing to the metadata server. It also doesn’t distinguish by origin. This makes it more difficult for external repositories to provide the appropriate configuration.

apt-listchanges extracts the changelogs from the package files which have been downloaded. If they aren’t available, it will fall back to apt-get changelog (which is the same as apt changelog).

0

An apt changelog tar will read the file /usr/share/doc/tar/changelog.Debian. Then if a packet doesn’t follow the changelog.Debian convention, apt changelog will be useless with it.

3
  • This is very interesting. I've checked this on one of the packages – kate (apps.kde.org/kate). /usr/share/doc/kate/changelog.Debian.gz exists on my machine and has up-to-date information about the package. Yet, both apt changelog and aptitude refuse to show the changelog for this file.
    – andrybak
    Oct 10, 2021 at 0:20
  • 2
    The way aptitude shows a message Downloading changelog for ... and apt changelog shows [Working 0%...] just before showing the changelog, makes me think that they also have to download something from the internet to work properly, and local files /usr/share/doc/<package-name>/changelog.Debian* might not be enough.
    – andrybak
    Oct 10, 2021 at 0:22
  • To clarify about kate package: in this case it is installed from http://archive.neon.kde.org/user as opposed to Ubuntu source URL mentioned in the question. Ubuntu packages "have" changelogs.ubuntu.com to draw something from. But as far as I know, there is no such website for KDE Neon packages.
    – andrybak
    Oct 10, 2021 at 0:23
0

I found it "apt changelog curl" command always looking from Internet site for changelogs, not the local changelog.gz files, detail check found the the curl pacakge's changelog file append two special lines begin with "#", which is not a proper way(.e.g not with convention). If deleted this two lines or add a space before "#", it will then look for the local changelog.gz file.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 17, 2023 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .