I want to know how the update manager for linux works. For instance, how does my linux distro check to see if there are any available updates for download and which servers to download these updates? If I am dealing with 3rd party software not apart of the main distro, how do those programs interact with my update manager to notify me that those programs have available updates? Lastly what would be some good literature on the subject?
|
|
It depends. The details differ for every major linux-distribution. Part 1 of your question: How does it work for the OS (operating system)? Either there is a list of mirrors, or a distribution point where the OS gets that lists of mirrors. OR there is a hard-coded URL that points to a HA-server that provides these updates. Usually HTTP, FTP are used as transport protocol. HTTPS may be in use for non-open-source distributions. Local mirrors may include NFS. After a server for the updates has been chosen, the OS downloads a list where all package-version-numbers are contained. If the version-number is higher than the version installed, it should be upgraded. Packages contain references to other packages (dependencies) which will be checked. If the newer package needs other packages not already installed, these will be downloaded as well (usually to a temporary staging directory). Afterwards these updates get installed. Part 2 of your question: How does it work for 3rd party software? It does not, if there is no way to integrate the source-URL for the package into your local distribution. This is easy if the 3rd party is providing repositories matching your distribution. More difficult if they do not provide this. In the latter case you have to write a mechanism to:
|
|||
|
|
|
By version number , if you're refering to Ubuntu's update manager, it's merely a limited front-end of apt-get. There's basically two databases , one stored on your computer , which records what packages you installed , and the version of it ; another hold the database you downloaded from server , which contains all available packages and version number. When you downloaded the updates (meta info) from update server , the program will check if any packages you installed that has a newer version , if so , that package can be upgraded. On ubuntu , when |
|||
|
|