lefty.crupps' GNUski bacon

GNU/Linux News and HowTos... and some rants.

03 February 2009

Package Management Basics on Debian GNU/Linux

One of the 'hardest' parts of Linux for new users is often the installation of new software, or the understanding of how this all works. Generally a modern distribution has software 'repositories' and overall they function something like this:
  1. You have a text file with a list of internet addresses (URLs) and some additional information about that URL; these are the Repositories and act somewhat like a 'catalog of software'. You can shop from the distribution's usual 'catalogs', or you can add new 'catalogs' from which to obtain new software.
  2. Your system's Package Manager uses this information to contact the Repository to get the most up-to-date list of that available software
  3. A user can search for software by name, function, or other criteria; if the software looks interesting, the user selects that software to install and the Package Manager may alert the user that some additional software will be needed. This is like ordering a kitchen knife for example, and the catalog also makes sure that you get the sharpener and the cutting board. Or something like that, basically its additional software that the first piece relies upon to work.
Seems simple enough to me. I run Debian, so my list of software repositories is located in a single file at /etc/apt/sources.list and there can be additional repositories (well, text files with repositories written in them) in the folder at /etc/apt/sources.list.d/ The file's format is simple enough once you understand it:

  • type / location / branch / sections
  • deb http://debian.uchicago.edu/debian/ testing main contrib non-free
  • deb-src http://debian.uchicago.edu/debian/ unstable main contrib non-free

In the above two repositories, the Types are 'deb' for programs and 'deb-src' for source code

The location for each is the URL ' http://debian.uchicago.edu/debian/'

The Branch part, for Debian systems at least, is 'stable' or 'testing' or 'unstable' or 'experimental'. Note that these can also be referred to by their release names, which do not change — currently 'stable' is Etch but in a few weeks it is expected to be 'Lenny'. Software starts in Experimental and works its way to Unstable and then as more bugs are cleaned up, it works its way to Testing, and then every couple of years the software in Testing is released as a new version of Stable.

The Sections for a repository depend on what that repo has available; the general Debian repositories usually have three: main, contrib, and non-free. Depending on the licensing and distribution terms, an official package will go into one of these three Sections. Other repositories may only have one section.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home