新包与新版本?

The*_*ark 4 upgrade updates package-management apt kernel

什么是“dist-upgrade”以及为什么它比“upgrade”升级更多的问题中?接受的答案解释说,linux-headers-3.0.0-13是一个新的软件包取代linux-headers-3.0.0-12

它是一个新包,而不仅仅是一个新版本,如何知道(识别)差异?

此外,如果它是新软件包而不是已安装软件包的新版本,为什么会linux-headers-3.0.0-13在命令的输出中列出sudo apt-get upgrade

在,这是因为自变量的答案提示linux-headers-3.0.0-12linux-headers-3.0.0-13连接到相同的虚拟包(“linux-headers是受两者提供的一个虚拟包linux-headers-3.0.0-12linux-headers-3.0.0-13”)。是因为这个原因linux-headers-3.0.0-13被列出吗?如果是这样,为什么我们看不到其他虚拟包提供的其他包建议作为升级?

编辑:

虽然上面的例子涉及内核包,但我的问题不是面向内核的,而是更一般的;还是仅与内核相关?

Pil*_*ot6 5

使用内核元包类似linux-image-genericlinux-headers-generic指向真实内核包的原因是允许拥有多个内核实例。

您可以同时拥有linux-headers-3.0.0-13-genericlinux-headers-3.0.0-12-generic安装。

当您升级 meta 时linux-headers-generic,它会拉取最新的真实包作为依赖项。如果我们将这些内核包作为一个具有不同版本的包,它总是会被替换。

apt-get upgrade 不安装新软件包

 upgrade
           upgrade is used to install the newest versions of all packages
           currently installed on the system from the sources enumerated in
           /etc/apt/sources.list. Packages currently installed with new
           versions available are retrieved and upgraded; under no
           circumstances are currently installed packages removed, or packages
           not already installed retrieved and installed. New versions of
           currently installed packages that cannot be upgraded without
           changing the install status of another package will be left at
           their current version. An update must be performed first so that
           apt-get knows that new versions of packages are available.
Run Code Online (Sandbox Code Playgroud)

这就是为什么它不升级依赖于新包的元包的原因。

它与内核无关。还有一些其他的例子。