compression formats, with partial downloads and patches is an involved
process which is hard to implement correctly and securely.
-APT frontends share the code and binaries to make this happen in libapt
+APT front-ends share the code and binaries to make this happen in libapt
with the Acquire system, supported by helpers shipped in the apt package
itself and additional transports in individual packages like
apt-transport-https.
For its own operation libapt needs or can make use of Packages, Sources
and Translation-* files, which it will acquire by default, but
-a repository might contain more data files (e.g. Contents) a frontend
+a repository might contain more data files (e.g. Contents) a front-end
(e.g. apt-file) might want to use and would therefore need to be
downloaded as well.
-This file describes the configuration scheme such a frontend can use to
+This file describes the configuration scheme such a front-end can use to
instruct the Acquire system to download those additional files.
# The Configuration Stanza
After the type you can pick any valid and unique string which preferable
refers to the file it downloads (In the example we picked 'Packages').
-This string is used as identifier for the target class and accessible as
-'Created-By' e.g. in the "apt-get indextargets" output as detailed
-below. It is also used to allow user to enable/disable targets per
-sources.list entry.
+This string is used as identifier (if not explicitly set otherwise) for
+the target class and accessible as 'Identifier' and 'Created-By' e.g.
+in the "apt-get indextargets" output as detailed below. The identifier
+is also used to allow user to enable/disable targets per sources.list
+entry.
All targets have three main properties you can define:
* MetaKey: The identifier of the file to be downloaded as used in the
Additional optional properties:
+* Identifier: The default value is the unique string identifying this
+ file (in the example above it was 'Packages') also accessible as
+ Created-By. The difference is that using this property multiple files
+ can be subsumed under one identifier e.g. if you configure multiple
+ possible locations for the files (with Fallback-Of), but the front-end
+ doesn't need to handle files from the different locations differently.
* DefaultEnabled: The default value is 'yes' which means that apt will
try to acquire this target from all sources. If set to 'no' the user
has to explicitly enable this target in the sources.list file with the
regardless of this setting.
* KeepCompressed: The default is the value of Acquire::GzipIndexes,
which defaults to false. If true, the acquire system will keep the
- file compressed on disk rather than extract it. If your frontend can't
+ file compressed on disk rather than extract it. If your front-end can't
deal with compressed files transparently you have to explicitly set
this option to false to avoid problems with users setting the option
globally. On the other hand, if you set it to true or don't set it you
- have to ensure your frontend can deal with all compressed fileformats
- supported by apt (libapt users can e.g. use FileFd).
+ have to ensure your front-end can deal with all compressed fileformats
+ supported by apt (libapt users can e.g. use FileFd, others can use
+ the cat-file command of /usr/lib/apt/apt-helper).
+* Fallback-Of: Is by default not set. If it is set and specifies another
+ target name (see Created-By) which was found in the Release file the
+ download of this target will be skipped. This can be used to implement
+ fallback(chain)s to allow transitions like the rename of target files.
+ The behavior if cycles are formed with Fallback-Of is undefined!
* flat{MetaKey,Description}: APT supports two types of repositories:
dists-style repositories which are the default and by far the most
common which are named after the fact that the files are in an
*NO* properties have to be set to enable this!
-More properties exist, but these should *NOT* be set by frontends
+More properties exist, but these should *NOT* be set by front-ends
requesting files. They exist for internal and end-user usage only.
Some of these are – which are documented here only to ensure that they
-aren't accidentally used by frontends:
+aren't accidentally used by front-ends:
* PDiffs: controls if apt will try to use PDiffs for this target.
Defaults to the value of Acquire::PDiffs which is true by default.
Can be overridden per-source by the sources.list option of the same
name. See the documentation for both of these for details.
+* By-Hash: controls if apt will try to use an URI constructed from
+ a hashsum of the file to download. See the documentation for config
+ option Acquire::By-Hash and sources.list option By-Hash for details.
* CompressionTypes: The default value is a space separated list of
compression types supported by apt (see Acquire::CompressionTypes).
You can set this option to prevent apt from downloading a compression
- type a frontend can't open transparently. This should always be
+ type a front-end can't open transparently. This should always be
a temporary workaround through and a bug should be reported against
- the frontend in question.
+ the front-end in question.
+* KeepCompressedAs: The default value is a space separated list of
+ compression types supported by apt (see previous option) which is
+ sorted by the cost-value of the compression in ascending order,
+ except that cost=0 "compressions" (like uncompressed) are listed last.
# More examples
APT::Architectures (potentially modified by sources.list options),
e.g. "amd64", "i386" or "armel" for the 'deb' type. In type 'deb-src'
this variable has the value "source".
+* $(NATIVE_ARCHITECTURE): The architecture apt treats as the native
+ architecture for this system configured as APT::Architecture
+ defaulting to the architecture apt itself was built for.
Note that while more variables might exist in the implementation, these
are to be considered undefined and their usage strongly discouraged. If
uppercase and wrapped in $(), as in the configuration file.
To get all the filenames of all Translation-en files you can e.g. call:
- apt-get indextargets --format '$(FILENAME)' "Created-By: Translations" "Language: en"
+ apt-get indextargets --format '$(FILENAME)' "Identifier: Translations" "Language: en"
-The line-based filtering and the formating is rather crude and feature-
+The line-based filtering and the formatting is rather crude and feature-
less by design: The default format is Debians standard format deb822 (in
particular: Field names are case-insensitive and the order of fields in
the stanza is undefined), so instead of apt reimplementing powerful
-filters and formating for this command, it is recommend to use piping
+filters and formatting for this command, it is recommend to use piping
and dedicated tools like 'grep-dctrl' if you need more than the basics
provided.
Remarks on other available fields:
* MetaKey, ShortDesc, Description, Site, Release: as defined
by the configuration and described further above.
+* Identifier: Defaults to the value of Created-By, but can be set
+ explicitly in the configuration (see above). Prefer this field over
+ Created-By to subsume multiple file(location)s (see Fallback-Of).
* Created-By: configuration entity responsible for this target
* Target-Of: type of the sources.list entry
* URI, Repo-URI: avoid using. Contains potentially username/password.
package ship the configuration needed to get the files, but specific
needs might require specific solutions. Again: talk to us.
-Bad things will happen if multiple frontends request the same file(s)
+Bad things will happen if multiple front-ends request the same file(s)
via different targets, which is another reason why coordination is very
important!
# Acquiring files to a specific location on disk
-You can't by design to avoid multiple frontends requesting the same file
+You can't by design to avoid multiple front-ends requesting the same file
to be downloaded to multiple different places on (different) disks
(among other reasons). See the next point for a solution if you really
have to force a specific location by creating symlinks.