查看要升级的软件包的 apt-get 更改日志

Joh*_*lla 63 apt

这个问题描述了如何获取给定包的变更日志。但是,这是整个变更日志。

我想要的是一种查看我将要升级的内容会发生什么变化的方法。例如,我在想象这样的事情:

$ sudo apt-get upgrade --show-changelogs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  foo
    -- adds the bar feature for better snazziness
    -- removes the deprecated baz feature

1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,864 kB of archives.
After this operation, 285 kB disk space will be freed.
Do you want to continue [Y/n]? 
Run Code Online (Sandbox Code Playgroud)

不幸的是,我在 apt-get 的手册页中没有看到类似的内容。这个或类似的东西存在吗?

更新:我写了一篇简短的博客文章,更深入地讨论了 apt-listchanges 和 Debian 更新日志,其中包含了这个问题中的一些反馈。

小智 62

最接近您正在寻找的东西可以使用名为 的包apt-listchanges,它会在您升级包时为您提供更改日志摘要。您可以设置它,以便在apt-get下载升级后直接在终端中显示更改日志注释(请参阅下面的说明和屏幕截图),但在安装之前。

您可以安装该程序

sudo apt-get install apt-listchanges
Run Code Online (Sandbox Code Playgroud)

然后设置它

sudo dpkg-reconfigure apt-listchanges
Run Code Online (Sandbox Code Playgroud)

创建的安装文件是/etc/apt/listchanges.conf.

我的设置将更改日志信息直接显示为终端 (stdout) 中的文本,这正是您想要的。我发现这比让寻呼机加载信息要好。我只是在我的 conf 文件中选择了更新日志,所以没有显示关于这个包的消息。我还将其设置为通过电子邮件发送更改日志的摘录。如果你想使用这个功能,你需要通过参考我的文章来设置本地电子邮件。

这是我的/etc/apt/listchanges.conf

[apt]
frontend=text
email_address=root
confirm=1
save_seen=/var/lib/apt/listchanges.db
which=changelogs
Run Code Online (Sandbox Code Playgroud)

apt-listchanges安装时升级过程的屏幕截图。我已将其设置为在阅读更改日志摘录后要求我进行安装确认。

在此处输入图片说明

欲了解更多信息,请参阅man apt-listchangesUbuntu的联机帮助页在线


小智 15

我使用aptitude

$ aptitude changelog package-name
Run Code Online (Sandbox Code Playgroud)

看到这个问题:apt changelog for to-be installed packages

  • 这是 OP 在说他看过它但想要不同的东西时发布的相同链接吗? (2认同)
  • 这是单个包的整个更改日志——我想要的只是我将要升级的所有包的更改。执行 `aptitude changelog ...` 并直观地解析结果将非常乏味,尤其是当多个包更改时。 (2认同)

Cee*_*man 7

$ apt changelog firefox
Run Code Online (Sandbox Code Playgroud)

对我有用。对于外部 PPA,它会失败,即使这个位于http://changelogs.ubuntu.com/changelogs/binary/p/plasma-framework/5.67.0-0ubuntu2/changelog

$ apt changelog plasma-framework
E: Ophalen van changelog:/plasma-framework.changelog is mislukt  Logbestand met veranderingen niet beschikbaar voor plasma-framework=5.67.0-0ubuntu2~ubuntu19.10~ppa1
Run Code Online (Sandbox Code Playgroud)

或者更有用,通过 Synaptic:

This change is not coming from a source that supports changelogs.

Failed to fetch the changelog for plasma-framework
URI was: http://ppa.launchpad.net/pool/main/p/plasma-framework/plasma-framework_5.67.0-0ubuntu2~ubuntu19.10~ppa1_amd64.changelog
Run Code Online (Sandbox Code Playgroud)

哪个不起作用:

E: ERROR: couldn't open /root/.synaptic/synaptic.conf for writing - ofstream (5: Input/output error)
E: An error occurred while saving configurations.
Run Code Online (Sandbox Code Playgroud)