有没有办法让 apt-get upgrade 不显示更改日志?

有没有办法让 apt-get upgrade 不显示更改日志?

我希望脚本能够apt-get upgrade无缝运行而无需提示,但在我的实验中,我无法让它停止显示提示,即使使用-y--force yes。最近,当从头开始设置 RPis 时,这是一个示例违规者,我只需点击它即可q继续升级:

ca-certificates (20141019+deb8u2) stable; urgency=medium

  Update Mozilla certificate authority bundle to version 2.9.
    The following certificate authorities were added (+):
    + "Certplus Root CA G1"
    + "Certplus Root CA G2"
    + "Certum Trusted Network CA 2"
    + "Hellenic Academic and Research Institutions ECC RootCA 2015"
    + "Hellenic Academic and Research Institutions RootCA 2015"
    + "ISRG Root X1"
    + "OpenTrust Root CA G1"
    + "OpenTrust Root CA G2"
    + "OpenTrust Root CA G3"
    + "SZAFIR ROOT CA2"
    The following certificate authorities were removed (-):
    - "CA Disig"
    - "NetLock Business (Class B) Root"
    - "NetLock Express (Class C) Root"
    - "NetLock Notary (Class A) Root"
    - "NetLock Qualified (Class QA) Root"
    - "Sonera Class 1 Root CA"
    - "Staat der Nederlanden Root CA"
    - "Verisign Class 1 Public Primary Certification Authority - G2"
    - "Verisign Class 3 Public Primary Certification Authority"
    - "Verisign Class 3 Public Primary Certification Authority - G2"

 -- Michael Shuler <[email protected]>  Fri, 18 Nov 2016 09:09:47 -0600

老实说,即使我手动运行该程序,这也很烦人,因为它可能需要几分钟,然后我就会离开,希望回来完成一项任务,却发现它中途暂停了。

我看到了一些关于使它更安静的-qq东西,但我有点担心它可能会覆盖与默认值不同的配置文件(虽然很烦人,但我发现这是可以接受的)。

所以,说实话,我甚至不知道如何提出正确的问题——我只希望这个提示消失。

答案1

您看到的输出来自apt-listchanges包,它不是默认的。有多种方法可以防止更改暂停更新过程:

  1. APT_LISTCHANGES_FRONTEND=cat在环境中设置
  2. 在部分下编辑/etc/apt/listchanges.conf并设置frontend=catapt
  3. 卸载apt-listchanges

答案2

根据“apt-listchanges”手册,您可以使用不同的前端配置 apt。要将更改日志打印到标准输出,您应该使用“text”前端。您还可以使用“none”前端隐藏更改日志。

相关内容