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

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

我想要的是一种方式来看看我即将升级的内容会发生什么变化。 例如,我想象的是:

$ 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]? 

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

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

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

你可以安装程序

 sudo apt-get install apt-listchanges 

然后用它设置

 sudo dpkg-reconfigure apt-listchanges 

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

我的设置将更改日志信息直接显示为终端(stdout)中的文本,这正是您想要的。 我发现这比寻呼机加载信息更好。 我只是在我的conf文件中选择了更改日志,因此未显示有关该包的新闻。 我还将其设置为电子邮件根目录更改日志的摘录。 如果要使用此function,则需要在此处引用我的文章来设置本地电子邮件。

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

 [apt] frontend=text email_address=root confirm=1 save_seen=/var/lib/apt/listchanges.db which=changelogs 

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

在此处输入图像描述

有关更多信息,请参阅man apt-listchanges和Ubuntu联机帮助页 。

我使用aptitude

 $ aptitude changelog package-name 

请参阅此问题: 要安装的软件包的apt changelog