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

Re: How can I see only the latest change log of packages before update ?



On Tue 24 Mar 2020 at 00:35:39 (+0200), Anastasios Lisgaras wrote:
> 
> My update/upgrade system script is about that :
> sudo apt update && sudo apt list --upgradable -a && sudo apt
> dist-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y &&
> sudo apt clean -y
> 
> But I want for *each* package that has an update available, before I
> update it to see its changes.

Then you have to split the upgrade command into a download-only part
(-d in apt-get, and I assume it's the same in apt), and the installing
part itself (with no -d).

> I found for that (maybe) two tools :
> * apt-listchanges
> * changelog
> 
> 1) The "apt-listchanges" tool I cannot understand how it is used
> ```
> apt-listchanges thunderbird
> apt-listchanges: thunderbird does not have '.deb' extension
> ```

man apt-listchanges says:

    apt-listchanges [[options...]] {[--apt] | [package.deb...]}
                                                      ↑↑↑↑

so you have to give it the actual filename (after the download part,
of course), and not just the name of the package.

> 2) With the "changelog" I got the change logs, but i think i'm not just
> getting the last ones ..
> 
> apt changelog openssh-client : https://pastebin.com/raw/15rCqULj
> apt changelog thunderbird : https://pastebin.com/raw/RdfnwtDD
> 
> I want to see *only* the *latest* change logs for *each* update
> available package.

This time, the bare package name is sufficient, and by default you get
the installed version's changelog. You have to add options (like those
for the install command) so it can download a different version to
give you the information for packages not already installed on the system.

But, in view of your upgrade script, you obviously don't need
changelog, because apt-listchanges will fit nicely between your
apt -d dist-upgrade   and   apt dist-upgrade   commands.

Cheers,
David.


Reply to: