APT Files



Version 3.1.3



Table of Contents

1. Introduction
1.1. General
2. Files
2.1. Files and fragment directories in /etc/apt
2.2. Distribution Source list (sources.list)
2.2.1. Hashing the URI
2.3. Extended States File (extended_states)
2.4. Binary Package Cache (srcpkgcache.bin and pkgcache.bin)
2.5. Downloads Directory (archives)
2.6. The Methods Directory (/usr/lib/apt/methods)
2.7. The Configuration File (/etc/apt/apt.conf)
2.8. The trusted.gpg File (/etc/apt/trusted.gpg)
2.9. The Release File
   

The distribution source list is used to locate archives of the debian distribution. It is designed to support any number of active sources and to support a mix of source media. The file lists one source per line, with the fastest source listed first. The format of each line is:

   

type uri args

   

The first item, type, indicates the format for the remainder of the line. It is designed to indicate the structure of the distribution the line is talking about. Currently the only defined values are deb and deb-src which indicate a standard debian (source) archive with a dists directory. More about these types and the URI specification can be found in the sources.list manpage.

   

This file plays an important role in how APT presents the archive to the user. Its main purpose is to present a descriptive name for the source of each version of each package. It also is used to detect when new versions of debian are released. It augments the package file it is associated with by providing meta information about the entire archive which the Packages file describes.

   

The full name of the distribution for presentation to the user is formed as 'label version archive', with a possible extended name being 'label version archive component'.

   

The file is formed as the package file (RFC-822) with the following tags defined:

   
Archive

This is the common name we give our archives, such as stable or unstable.

Component

Refers to the sub-component of the archive, main, contrib etc. Component may be omitted if there are no components for this archive.

Version

This is a version string with the same properties as in the Packages file. It represents the release level of the archive.

Origin

This specifies who is providing this archive. In the case of Debian the string will read 'Debian'. Other providers may use their own string

Label

This carries the encompassing name of the distribution. For Debian proper this field reads 'Debian'. For derived distributions it should contain their proper name.

Architecture

When the archive has packages for a single architecture then the Architecture is listed here. If a mixed set of systems are represented then this should contain the keyword mixed.

NotAutomatic

A Yes/No flag indicating that the archive is extremely unstable and its version's should never be automatically selected. This is to be used by experimental.

Description

Description is used to describe the release. For instance experimental would contain a warning that the packages have problems.

   

The location of the Release file in the archive is very important, it must be located in the same location as the packages file so that it can be located in all situations. The following is an example for the current stable release, 1.3.1r6

   
Archive: stable
Component: main
Version: 1.3.1r6
Origin: Debian
Label: Debian
Architecture: i386
   

This is an example of experimental,

   
Archive: experimental
Version: 0
Origin: Debian
Label: Debian
Architecture: mixed
NotAutomatic: Yes
   

And unstable,

   
Archive: unstable
Component: main
Version: 2.1
Origin: Debian
Label: Debian
Architecture: i386