Saturday, September 14, 2019

apt - New package vs new version?


In the question What is “dist-upgrade” and why does it upgrade more than “upgrade”? the accepted answer explains that linux-headers-3.0.0-13 is a new package replacing linux-headers-3.0.0-12.


How is it a new package and not simply a new version, and how to know (recognize) the difference?


Further, why is linux-headers-3.0.0-13 listed in the output of the command sudo apt-get upgrade if it is a new package and not a new version of an already installed package?


The answer hints at the argument that it is because linux-headers-3.0.0-12 and linux-headers-3.0.0-13 are connected to the same virtual package ("linux-headers is a virtual package that is provided by both linux-headers-3.0.0-12 and linux-headers-3.0.0-13"). Is it for this reason that linux-headers-3.0.0-13 is listed? And if so, why don't we see other packages provided by other virtual packages suggested as upgrades?


EDIT:


Although the example above concerns kernel packages, my question is not kernel-oriented but more general; or is it of kernel-only relevance?



The reason of having kernel meta-packages like linux-image-generic and linux-headers-generic pointing to real kernel packages is to allow having more than one instance of a kernel.


You can have linux-headers-3.0.0-13-generic and linux-headers-3.0.0-12-generic installed at the same time.


When you upgrade meta linux-headers-generic, it pulls the latest real package as a dependency. If we had these kernel packages as one with different versions, it would be always replaced.


apt-get upgrade doesn't install new packages


 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.

That's why it doesn't upgrade meta packages that are dependent on new packages.


It is not kernel related. There are some other examples.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...