Chapter 3. Procedural description
Prev |  | Next

# Chapter 3. Procedural description

Set Options

  This process handles setting of user or site options, and configuration of all aspects of APT. It allows the user to set the location and order of package sources, allowing them to set up source list details, like http site locations, passwords, etc. Display options may also be set.

Updates

  Build a list of available packages, using source lists or a base location and trawling for Packages files (needs to be aware of architecture). This may involve finding and retrieving Packages files, storing them locally for efficiency, and parsing the data for later use. This would entail contacting various underlying access modules (http, cdrom mounts, etc) Use a backing store for speed. This may also require downloading the actual package files locally for speed.

Local status

  Build up a list of packages already installed. This requires reading and writing the local?? status file. For remote installation, this should probably use similar mechanisms as the Packages file retrieval does. Use the backing store for speed. One should consider multiple backing stores, one for each machine.

Relationship determination

  Determine forward and reverse dependencies. All known dependency fields should be acted upon, since it is fairly cheap to do so. Update the backing store with this information.

Selection

  Present the data to the user. Look at Behan Webster's documentation for the user interface procedures. (Note: In the authors opinion deletions and reverse dependencies should also be presented to the user, in a strictly symmetric fashion; this may make it easier to prevent a package being removed that breaks dependencies)

Ordering of package installations and configuration

  Build a list of events. Simple topological sorting gives order of packages in dependency order. At certain points in this ordering, predependencies/immediate configure directives cause a break in normal ordering. We need to insert the uninstall/purge directive in the stream (default: as early as possible).

Action

  Take the order of installations and removals and build up a stream of events to send to the packaging system (dpkg). Execute the list of events if successful. Do not partially install packages and leave system in broken state. Go to The Selection step as needed.

Prev |  | Next
Chapter 2. Requirements | Home | Chapter 4. Modules and interfaces