Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
4  
Don't crosspost: superuser.com/questions/433685/… –  Matteo Jun 7 '12 at 5:25
    
Different Linux distributions have different package managers. What distribution are you using? –  Gilles Jun 7 '12 at 22:51
    
With so many Linux Distributions (which is where package management is implemented, if at all), this is kind of a complicated, if not impossible question. –  killermist Jun 21 '12 at 23:45
    
@Matteo the crosspost has been closed as off-topic on superuser. –  Nils Jun 23 '12 at 21:28
add comment

2 Answers

up vote 3 down vote accepted

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:

  1. Check for newer versions
  2. Download them
  3. Optionally compile them
  4. Package them
  5. Build a local repository for these packages
share|improve this answer
add comment

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 apt-get update (which fetches meta info) finishes , update-manager will detect the changes , and see if any updates available , if so , it pops up.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.