]> git.saurik.com Git - apt.git/blob - doc/apt.conf.5.xml
apt-pkg/acquire-item.cc: Only try to rename existing Release files (Closes: #622912)
[apt.git] / doc / apt.conf.5.xml
1 <?xml version="1.0" encoding="utf-8" standalone="no"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!ENTITY % aptent SYSTEM "apt.ent">
6 %aptent;
7
8 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
9 %aptverbatiment;
10
11 ]>
12
13 <refentry>
14
15 <refentryinfo>
16 &apt-author.jgunthorpe;
17 &apt-author.team;
18 <author>
19 <firstname>Daniel</firstname>
20 <surname>Burrows</surname>
21 <contrib>Initial documentation of Debug::*.</contrib>
22 <email>dburrows@debian.org</email>
23 </author>
24 &apt-email;
25 &apt-product;
26 <!-- The last update date -->
27 <date>16 January 2010</date>
28 </refentryinfo>
29
30 <refmeta>
31 <refentrytitle>apt.conf</refentrytitle>
32 <manvolnum>5</manvolnum>
33 <refmiscinfo class="manual">APT</refmiscinfo>
34 </refmeta>
35
36 <!-- Man page title -->
37 <refnamediv>
38 <refname>apt.conf</refname>
39 <refpurpose>Configuration file for APT</refpurpose>
40 </refnamediv>
41
42 <refsect1><title>Description</title>
43 <para><filename>apt.conf</filename> is the main configuration file for
44 the APT suite of tools, but by far not the only place changes to options
45 can be made. All tools therefore share the configuration files and also
46 use a common command line parser to provide a uniform environment.</para>
47 <orderedlist>
48 <para>When an APT tool starts up it will read the configuration files
49 in the following order:</para>
50 <listitem><para>the file specified by the <envar>APT_CONFIG</envar>
51 environment variable (if any)</para></listitem>
52 <listitem><para>all files in <literal>Dir::Etc::Parts</literal> in
53 alphanumeric ascending order which have no or "<literal>conf</literal>"
54 as filename extension and which only contain alphanumeric,
55 hyphen (-), underscore (_) and period (.) characters.
56 Otherwise APT will print a notice that it has ignored a file if the file
57 doesn't match a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
58 configuration list - in this case it will be silently ignored.</para></listitem>
59 <listitem><para>the main configuration file specified by
60 <literal>Dir::Etc::main</literal></para></listitem>
61 <listitem><para>the command line options are applied to override the
62 configuration directives or to load even more configuration files.</para></listitem>
63 </orderedlist>
64 </refsect1>
65 <refsect1><title>Syntax</title>
66 <para>The configuration file is organized in a tree with options organized into
67 functional groups. Option specification is given with a double colon
68 notation, for instance <literal>APT::Get::Assume-Yes</literal> is an option within
69 the APT tool group, for the Get tool. Options do not inherit from their
70 parent groups.</para>
71
72 <para>Syntactically the configuration language is modeled after what the ISC tools
73 such as bind and dhcp use. Lines starting with
74 <literal>//</literal> are treated as comments (ignored), as well as all text
75 between <literal>/*</literal> and <literal>*/</literal>, just like C/C++ comments.
76 Each line is of the form
77 <literal>APT::Get::Assume-Yes "true";</literal>. The trailing
78 semicolon and the quotes are required. The value must be on one line, and
79 there is no kind of string concatenation. It must not include inside quotes.
80 The behavior of the backslash "\" and escaped characters inside a value is
81 undefined and it should not be used. An option name may include
82 alphanumerical characters and the "/-:._+" characters. A new scope can
83 be opened with curly braces, like:</para>
84
85 <informalexample><programlisting>
86 APT {
87 Get {
88 Assume-Yes "true";
89 Fix-Broken "true";
90 };
91 };
92 </programlisting></informalexample>
93
94 <para>with newlines placed to make it more readable. Lists can be created by
95 opening a scope and including a single string enclosed in quotes followed by a
96 semicolon. Multiple entries can be included, each separated by a semicolon.</para>
97
98 <informalexample><programlisting>
99 DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
100 </programlisting></informalexample>
101
102 <para>In general the sample configuration file in
103 <filename>&docdir;examples/apt.conf</filename> &configureindex;
104 is a good guide for how it should look.</para>
105
106 <para>The names of the configuration items are not case-sensitive. So in the previous example
107 you could use <literal>dpkg::pre-install-pkgs</literal>.</para>
108
109 <para>Names for the configuration items are optional if a list is defined as it can be see in
110 the <literal>DPkg::Pre-Install-Pkgs</literal> example above. If you don't specify a name a
111 new entry will simply add a new option to the list. If you specify a name you can override
112 the option as every other option by reassigning a new value to the option.</para>
113
114 <para>Two specials are allowed, <literal>#include</literal> (which is deprecated
115 and not supported by alternative implementations) and <literal>#clear</literal>:
116 <literal>#include</literal> will include the given file, unless the filename
117 ends in a slash, then the whole directory is included.
118 <literal>#clear</literal> is used to erase a part of the configuration tree. The
119 specified element and all its descendants are erased.
120 (Note that these lines also need to end with a semicolon.)</para>
121
122 <para>The #clear command is the only way to delete a list or a complete scope.
123 Reopening a scope or the ::-style described below will <emphasis>not</emphasis>
124 override previously written entries. Only options can be overridden by addressing a new
125 value to it - lists and scopes can't be overridden, only cleared.</para>
126
127 <para>All of the APT tools take a -o option which allows an arbitrary configuration
128 directive to be specified on the command line. The syntax is a full option
129 name (<literal>APT::Get::Assume-Yes</literal> for instance) followed by an equals
130 sign then the new value of the option. Lists can be appended too by adding
131 a trailing :: to the list name. (As you might suspect: The scope syntax can't be used
132 on the command line.)</para>
133
134 <para>Note that you can use :: only for appending one item per line to a list and
135 that you should not use it in combination with the scope syntax.
136 (The scope syntax implicit insert ::) Using both syntaxes together will trigger a bug
137 which some users unfortunately relay on: An option with the unusual name "<literal>::</literal>"
138 which acts like every other option with a name. These introduces many problems
139 including that a user who writes multiple lines in this <emphasis>wrong</emphasis> syntax in
140 the hope to append to a list will gain the opposite as only the last assignment for this option
141 "<literal>::</literal>" will be used. Upcoming APT versions will raise errors and
142 will stop working if they encounter this misuse, so please correct such statements now
143 as long as APT doesn't complain explicit about them.</para>
144 </refsect1>
145
146 <refsect1><title>The APT Group</title>
147 <para>This group of options controls general APT behavior as well as holding the
148 options for all of the tools.</para>
149
150 <variablelist>
151 <varlistentry><term>Architecture</term>
152 <listitem><para>System Architecture; sets the architecture to use when fetching files and
153 parsing package lists. The internal default is the architecture apt was
154 compiled for.</para></listitem>
155 </varlistentry>
156
157 <varlistentry><term>Default-Release</term>
158 <listitem><para>Default release to install packages from if more than one
159 version available. Contains release name, codename or release version. Examples: 'stable', 'testing',
160 'unstable', '&stable-codename;', '&testing-codename;', '4.0', '5.0*'. See also &apt-preferences;.</para></listitem>
161 </varlistentry>
162
163 <varlistentry><term>Ignore-Hold</term>
164 <listitem><para>Ignore Held packages; This global option causes the problem resolver to
165 ignore held packages in its decision making.</para></listitem>
166 </varlistentry>
167
168 <varlistentry><term>Clean-Installed</term>
169 <listitem><para>Defaults to on. When turned on the autoclean feature will remove any packages
170 which can no longer be downloaded from the cache. If turned off then
171 packages that are locally installed are also excluded from cleaning - but
172 note that APT provides no direct means to reinstall them.</para></listitem>
173 </varlistentry>
174
175 <varlistentry><term>Immediate-Configure</term>
176 <listitem><para>Defaults to on which will cause APT to install essential and important packages
177 as fast as possible in the install/upgrade operation. This is done to limit the effect of a failing
178 &dpkg; call: If this option is disabled APT does treat an important package in the same way as
179 an extra package: Between the unpacking of the important package A and his configuration can then
180 be many other unpack or configuration calls, e.g. for package B which has no relation to A, but
181 causes the dpkg call to fail (e.g. because maintainer script of package B generates an error) which results
182 in a system state in which package A is unpacked but unconfigured - each package depending on A is now no
183 longer guaranteed to work as their dependency on A is not longer satisfied. The immediate configuration marker
184 is also applied to all dependencies which can generate a problem if the dependencies e.g. form a circle
185 as a dependency with the immediate flag is comparable with a Pre-Dependency. So in theory it is possible
186 that APT encounters a situation in which it is unable to perform immediate configuration, errors out and
187 refers to this option so the user can deactivate the immediate configuration temporarily to be able to perform
188 an install/upgrade again. Note the use of the word "theory" here as this problem was only encountered by now
189 in real world a few times in non-stable distribution versions and was caused by wrong dependencies of the package
190 in question or by a system in an already broken state, so you should not blindly disable this option as
191 the mentioned scenario above is not the only problem immediate configuration can help to prevent in the first place.
192 Before a big operation like <literal>dist-upgrade</literal> is run with this option disabled it should be tried to
193 explicitly <literal>install</literal> the package APT is unable to configure immediately, but please make sure to
194 report your problem also to your distribution and to the APT team with the buglink below so they can work on
195 improving or correcting the upgrade process.</para></listitem>
196 </varlistentry>
197
198 <varlistentry><term>Force-LoopBreak</term>
199 <listitem><para>Never Enable this option unless you -really- know what you are doing. It
200 permits APT to temporarily remove an essential package to break a
201 Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential
202 packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option
203 will work if the essential packages are not tar, gzip, libc, dpkg, bash or
204 anything that those packages depend on.</para></listitem>
205 </varlistentry>
206
207 <varlistentry><term>Cache-Start, Cache-Grow and Cache-Limit</term>
208 <listitem><para>APT uses since version 0.7.26 a resizable memory mapped cache file to store the 'available'
209 information. <literal>Cache-Start</literal> acts as a hint to which size the Cache will grow
210 and is therefore the amount of memory APT will request at startup. The default value is
211 20971520 bytes (~20 MB). Note that these amount of space need to be available for APT
212 otherwise it will likely fail ungracefully, so for memory restricted devices these value should
213 be lowered while on systems with a lot of configured sources this might be increased.
214 <literal>Cache-Grow</literal> defines in byte with the default of 1048576 (~1 MB) how much
215 the Cache size will be increased in the event the space defined by <literal>Cache-Start</literal>
216 is not enough. These value will be applied again and again until either the cache is big
217 enough to store all information or the size of the cache reaches the <literal>Cache-Limit</literal>.
218 The default of <literal>Cache-Limit</literal> is 0 which stands for no limit.
219 If <literal>Cache-Grow</literal> is set to 0 the automatic grow of the cache is disabled.
220 </para></listitem>
221 </varlistentry>
222
223 <varlistentry><term>Build-Essential</term>
224 <listitem><para>Defines which package(s) are considered essential build dependencies.</para></listitem>
225 </varlistentry>
226
227 <varlistentry><term>Get</term>
228 <listitem><para>The Get subsection controls the &apt-get; tool, please see its
229 documentation for more information about the options here.</para></listitem>
230 </varlistentry>
231
232 <varlistentry><term>Cache</term>
233 <listitem><para>The Cache subsection controls the &apt-cache; tool, please see its
234 documentation for more information about the options here.</para></listitem>
235 </varlistentry>
236
237 <varlistentry><term>CDROM</term>
238 <listitem><para>The CDROM subsection controls the &apt-cdrom; tool, please see its
239 documentation for more information about the options here.</para></listitem>
240 </varlistentry>
241 </variablelist>
242 </refsect1>
243
244 <refsect1><title>The Acquire Group</title>
245 <para>The <literal>Acquire</literal> group of options controls the download of packages
246 and the URI handlers.
247
248 <variablelist>
249 <varlistentry><term>Check-Valid-Until</term>
250 <listitem><para>Security related option defaulting to true as an
251 expiring validation for a Release file prevents longtime replay attacks
252 and can e.g. also help users to identify no longer updated mirrors -
253 but the feature depends on the correctness of the time on the user system.
254 Archive maintainers are encouraged to create Release files with the
255 <literal>Valid-Until</literal> header, but if they don't or a stricter value
256 is volitional the following <literal>Max-ValidTime</literal> option can be used.
257 </para></listitem>
258 </varlistentry>
259
260 <varlistentry><term>Max-ValidTime</term>
261 <listitem><para>Seconds the Release file should be considered valid after
262 it was created. The default is "for ever" (0) if the Release file of the
263 archive doesn't include a <literal>Valid-Until</literal> header.
264 If it does then this date is the default. The date from the Release file or
265 the date specified by the creation time of the Release file
266 (<literal>Date</literal> header) plus the seconds specified with this
267 options are used to check if the validation of a file has expired by using
268 the earlier date of the two. Archive specific settings can be made by
269 appending the label of the archive to the option name.
270 </para></listitem>
271 </varlistentry>
272
273 <varlistentry><term>PDiffs</term>
274 <listitem><para>Try to download deltas called <literal>PDiffs</literal> for
275 Packages or Sources files instead of downloading whole ones. True
276 by default.</para>
277 <para>Two sub-options to limit the use of PDiffs are also available:
278 With <literal>FileLimit</literal> can be specified how many PDiff files
279 are downloaded at most to patch a file. <literal>SizeLimit</literal>
280 on the other hand is the maximum precentage of the size of all patches
281 compared to the size of the targeted file. If one of these limits is
282 exceeded the complete file is downloaded instead of the patches.
283 </para></listitem>
284 </varlistentry>
285
286 <varlistentry><term>Queue-Mode</term>
287 <listitem><para>Queuing mode; <literal>Queue-Mode</literal> can be one of <literal>host</literal> or
288 <literal>access</literal> which determines how APT parallelizes outgoing
289 connections. <literal>host</literal> means that one connection per target host
290 will be opened, <literal>access</literal> means that one connection per URI type
291 will be opened.</para></listitem>
292 </varlistentry>
293
294 <varlistentry><term>Retries</term>
295 <listitem><para>Number of retries to perform. If this is non-zero APT will retry failed
296 files the given number of times.</para></listitem>
297 </varlistentry>
298
299 <varlistentry><term>Source-Symlinks</term>
300 <listitem><para>Use symlinks for source archives. If set to true then source archives will
301 be symlinked when possible instead of copying. True is the default.</para></listitem>
302 </varlistentry>
303
304 <varlistentry><term>http</term>
305 <listitem><para>HTTP URIs; http::Proxy is the default http proxy to use. It is in the
306 standard form of <literal>http://[[user][:pass]@]host[:port]/</literal>. Per
307 host proxies can also be specified by using the form
308 <literal>http::Proxy::&lt;host&gt;</literal> with the special keyword <literal>DIRECT</literal>
309 meaning to use no proxies. If no one of the above settings is specified,
310 <envar>http_proxy</envar> environment variable
311 will be used.</para>
312
313 <para>Three settings are provided for cache control with HTTP/1.1 compliant
314 proxy caches. <literal>No-Cache</literal> tells the proxy to not use its cached
315 response under any circumstances, <literal>Max-Age</literal> is sent only for
316 index files and tells the cache to refresh its object if it is older than
317 the given number of seconds. Debian updates its index files daily so the
318 default is 1 day. <literal>No-Store</literal> specifies that the cache should never
319 store this request, it is only set for archive files. This may be useful
320 to prevent polluting a proxy cache with very large .deb files. Note:
321 Squid 2.0.2 does not support any of these options.</para>
322
323 <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
324 this applies to all things including connection timeout and data timeout.</para>
325
326 <para>One setting is provided to control the pipeline depth in cases where the
327 remote server is not RFC conforming or buggy (such as Squid 2.0.2).
328 <literal>Acquire::http::Pipeline-Depth</literal> can be a value from 0 to 5
329 indicating how many outstanding requests APT should send. A value of
330 zero MUST be specified if the remote host does not properly linger
331 on TCP connections - otherwise data corruption will occur. Hosts which
332 require this are in violation of RFC 2068.</para>
333
334 <para>The used bandwidth can be limited with <literal>Acquire::http::Dl-Limit</literal>
335 which accepts integer values in kilobyte. The default value is 0 which deactivates
336 the limit and tries uses as much as possible of the bandwidth (Note that this option implicit
337 deactivates the download from multiple servers at the same time.)</para>
338
339 <para><literal>Acquire::http::User-Agent</literal> can be used to set a different
340 User-Agent for the http download method as some proxies allow access for clients
341 only if the client uses a known identifier.</para>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry><term>https</term>
346 <listitem><para>HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and
347 proxy options are the same as for <literal>http</literal> method and will also
348 default to the options from the <literal>http</literal> method if they are not
349 explicitly set for https. <literal>Pipeline-Depth</literal> option is not
350 supported yet.</para>
351
352 <para><literal>CaInfo</literal> suboption specifies place of file that
353 holds info about trusted certificates.
354 <literal>&lt;host&gt;::CaInfo</literal> is corresponding per-host option.
355 <literal>Verify-Peer</literal> boolean suboption determines whether verify
356 server's host certificate against trusted certificates or not.
357 <literal>&lt;host&gt;::Verify-Peer</literal> is corresponding per-host option.
358 <literal>Verify-Host</literal> boolean suboption determines whether verify
359 server's hostname or not.
360 <literal>&lt;host&gt;::Verify-Host</literal> is corresponding per-host option.
361 <literal>SslCert</literal> determines what certificate to use for client
362 authentication. <literal>&lt;host&gt;::SslCert</literal> is corresponding per-host option.
363 <literal>SslKey</literal> determines what private key to use for client
364 authentication. <literal>&lt;host&gt;::SslKey</literal> is corresponding per-host option.
365 <literal>SslForceVersion</literal> overrides default SSL version to use.
366 Can contain 'TLSv1' or 'SSLv3' string.
367 <literal>&lt;host&gt;::SslForceVersion</literal> is corresponding per-host option.
368 </para></listitem></varlistentry>
369
370 <varlistentry><term>ftp</term>
371 <listitem><para>FTP URIs; ftp::Proxy is the default ftp proxy to use. It is in the
372 standard form of <literal>ftp://[[user][:pass]@]host[:port]/</literal>. Per
373 host proxies can also be specified by using the form
374 <literal>ftp::Proxy::&lt;host&gt;</literal> with the special keyword <literal>DIRECT</literal>
375 meaning to use no proxies. If no one of the above settings is specified,
376 <envar>ftp_proxy</envar> environment variable
377 will be used. To use a ftp
378 proxy you will have to set the <literal>ftp::ProxyLogin</literal> script in the
379 configuration file. This entry specifies the commands to send to tell
380 the proxy server what to connect to. Please see
381 &configureindex; for an example of
382 how to do this. The substitution variables available are
383 <literal>$(PROXY_USER)</literal> <literal>$(PROXY_PASS)</literal> <literal>$(SITE_USER)</literal>
384 <literal>$(SITE_PASS)</literal> <literal>$(SITE)</literal> and <literal>$(SITE_PORT)</literal>
385 Each is taken from it's respective URI component.</para>
386
387 <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
388 this applies to all things including connection timeout and data timeout.</para>
389
390 <para>Several settings are provided to control passive mode. Generally it is
391 safe to leave passive mode on, it works in nearly every environment.
392 However some situations require that passive mode be disabled and port
393 mode ftp used instead. This can be done globally, for connections that
394 go through a proxy or for a specific host (See the sample config file
395 for examples).</para>
396
397 <para>It is possible to proxy FTP over HTTP by setting the <envar>ftp_proxy</envar>
398 environment variable to a http url - see the discussion of the http method
399 above for syntax. You cannot set this in the configuration file and it is
400 not recommended to use FTP over HTTP due to its low efficiency.</para>
401
402 <para>The setting <literal>ForceExtended</literal> controls the use of RFC2428
403 <literal>EPSV</literal> and <literal>EPRT</literal> commands. The default is false, which means
404 these commands are only used if the control connection is IPv6. Setting this
405 to true forces their use even on IPv4 connections. Note that most FTP servers
406 do not support RFC2428.</para></listitem>
407 </varlistentry>
408
409 <varlistentry><term>cdrom</term>
410 <listitem><para>CDROM URIs; the only setting for CDROM URIs is the mount point,
411 <literal>cdrom::Mount</literal> which must be the mount point for the CDROM drive
412 as specified in <filename>/etc/fstab</filename>. It is possible to provide
413 alternate mount and unmount commands if your mount point cannot be listed
414 in the fstab (such as an SMB mount and old mount packages). The syntax
415 is to put <literallayout>/cdrom/::Mount "foo";</literallayout> within
416 the cdrom block. It is important to have the trailing slash. Unmount
417 commands can be specified using UMount.</para></listitem>
418 </varlistentry>
419
420 <varlistentry><term>gpgv</term>
421 <listitem><para>GPGV URIs; the only option for GPGV URIs is the option to pass additional parameters to gpgv.
422 <literal>gpgv::Options</literal> Additional options passed to gpgv.
423 </para></listitem>
424 </varlistentry>
425
426 <varlistentry><term>CompressionTypes</term>
427 <listitem><para>List of compression types which are understood by the acquire methods.
428 Files like <filename>Packages</filename> can be available in various compression formats.
429 Per default the acquire methods can decompress <command>bzip2</command>, <command>lzma</command>
430 and <command>gzip</command> compressed files, with this setting more formats can be added
431 on the fly or the used method can be changed. The syntax for this is:
432 <synopsis>Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> "<replaceable>Methodname</replaceable>";</synopsis>
433 </para><para>Also the <literal>Order</literal> subgroup can be used to define in which order
434 the acquire system will try to download the compressed files. The acquire system will try the first
435 and proceed with the next compression type in this list on error, so to prefer one over the other type
436 simple add the preferred type at first - not already added default types will be added at run time
437 to the end of the list, so e.g. <synopsis>Acquire::CompressionTypes::Order:: "gz";</synopsis> can
438 be used to prefer <command>gzip</command> compressed files over <command>bzip2</command> and <command>lzma</command>.
439 If <command>lzma</command> should be preferred over <command>gzip</command> and <command>bzip2</command> the
440 configure setting should look like this <synopsis>Acquire::CompressionTypes::Order { "lzma"; "gz"; };</synopsis>
441 It is not needed to add <literal>bz2</literal> explicit to the list as it will be added automatic.</para>
442 <para>Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
443 be checked: If this setting exists the method will only be used if this file exists, e.g. for
444 the bzip2 method (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
445 Note also that list entries specified on the command line will be added at the end of the list
446 specified in the configuration files, but before the default entries. To prefer a type in this case
447 over the ones specified in the configuration files you can set the option direct - not in list style.
448 This will not override the defined list, it will only prefix the list with this type.</para>
449 <para>The special type <literal>uncompressed</literal> can be used to give uncompressed files a
450 preference, but note that most archives doesn't provide uncompressed files so this is mostly only
451 useable for local mirrors.</para></listitem>
452 </varlistentry>
453
454 <varlistentry><term>GzipIndexes</term>
455 <listitem><para>
456 When downloading <literal>gzip</literal> compressed indexes (Packages, Sources, or
457 Translations), keep them gzip compressed locally instead of unpacking
458 them. This saves quite a lot of disk space at the expense of more CPU
459 requirements when building the local package caches. False by default.
460 </para></listitem>
461 </varlistentry>
462
463 <varlistentry><term>Languages</term>
464 <listitem><para>The Languages subsection controls which <filename>Translation</filename> files are downloaded
465 and in which order APT tries to display the Description-Translations. APT will try to display the first
466 available Description in the Language which is listed at first. Languages can be defined with their
467 short or long Languagecodes. Note that not all archives provide <filename>Translation</filename>
468 files for every Language - especially the long Languagecodes are rare, so please
469 inform you which ones are available before you set here impossible values.</para>
470 <para>The default list includes "environment" and "en". "<literal>environment</literal>" has a special meaning here:
471 It will be replaced at runtime with the languagecodes extracted from the <literal>LC_MESSAGES</literal> environment variable.
472 It will also ensure that these codes are not included twice in the list. If <literal>LC_MESSAGES</literal>
473 is set to "C" only the <filename>Translation-en</filename> file (if available) will be used.
474 To force apt to use no Translation file use the setting <literal>Acquire::Languages=none</literal>. "<literal>none</literal>"
475 is another special meaning code which will stop the search for a fitting <filename>Translation</filename> file.
476 This can be used by the system administrator to let APT know that it should download also this files without
477 actually use them if the environment doesn't specify this languages. So the following example configuration will
478 result in the order "en, de" in an english and in "de, en" in a german localization. Note that "fr" is downloaded,
479 but not used if APT is not used in a french localization, in such an environment the order would be "fr, de, en".
480 <programlisting>Acquire::Languages { "environment"; "de"; "en"; "none"; "fr"; };</programlisting></para></listitem>
481 </varlistentry>
482
483 </variablelist>
484 </para>
485 </refsect1>
486
487 <refsect1><title>Directories</title>
488
489 <para>The <literal>Dir::State</literal> section has directories that pertain to local
490 state information. <literal>lists</literal> is the directory to place downloaded
491 package lists in and <literal>status</literal> is the name of the dpkg status file.
492 <literal>preferences</literal> is the name of the APT preferences file.
493 <literal>Dir::State</literal> contains the default directory to prefix on all sub
494 items if they do not start with <filename>/</filename> or <filename>./</filename>.</para>
495
496 <para><literal>Dir::Cache</literal> contains locations pertaining to local cache
497 information, such as the two package caches <literal>srcpkgcache</literal> and
498 <literal>pkgcache</literal> as well as the location to place downloaded archives,
499 <literal>Dir::Cache::archives</literal>. Generation of caches can be turned off
500 by setting their names to be blank. This will slow down startup but
501 save disk space. It is probably preferred to turn off the pkgcache rather
502 than the srcpkgcache. Like <literal>Dir::State</literal> the default
503 directory is contained in <literal>Dir::Cache</literal></para>
504
505 <para><literal>Dir::Etc</literal> contains the location of configuration files,
506 <literal>sourcelist</literal> gives the location of the sourcelist and
507 <literal>main</literal> is the default configuration file (setting has no effect,
508 unless it is done from the config file specified by
509 <envar>APT_CONFIG</envar>).</para>
510
511 <para>The <literal>Dir::Parts</literal> setting reads in all the config fragments in
512 lexical order from the directory specified. After this is done then the
513 main config file is loaded.</para>
514
515 <para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal>
516 specifies the location of the method handlers and <literal>gzip</literal>,
517 <literal>bzip2</literal>, <literal>lzma</literal>,
518 <literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal>
519 <literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
520 of the respective programs.</para>
521
522 <para>
523 The configuration item <literal>RootDir</literal> has a special
524 meaning. If set, all paths in <literal>Dir::</literal> will be
525 relative to <literal>RootDir</literal>, <emphasis>even paths that
526 are specified absolutely</emphasis>. So, for instance, if
527 <literal>RootDir</literal> is set to
528 <filename>/tmp/staging</filename> and
529 <literal>Dir::State::status</literal> is set to
530 <filename>/var/lib/dpkg/status</filename>, then the status file
531 will be looked up in
532 <filename>/tmp/staging/var/lib/dpkg/status</filename>.
533 </para>
534
535 <para>
536 The <literal>Ignore-Files-Silently</literal> list can be used to specify
537 which files APT should silently ignore while parsing the files in the
538 fragment directories. Per default a file which end with <literal>.disabled</literal>,
539 <literal>~</literal>, <literal>.bak</literal> or <literal>.dpkg-[a-z]+</literal>
540 is silently ignored. As seen in the last default value these patterns can use regular
541 expression syntax.
542 </para>
543 </refsect1>
544
545 <refsect1><title>APT in DSelect</title>
546 <para>
547 When APT is used as a &dselect; method several configuration directives
548 control the default behaviour. These are in the <literal>DSelect</literal> section.</para>
549
550 <variablelist>
551 <varlistentry><term>Clean</term>
552 <listitem><para>Cache Clean mode; this value may be one of always, prompt, auto,
553 pre-auto and never. always and prompt will remove all packages from
554 the cache after upgrading, prompt (the default) does so conditionally.
555 auto removes only those packages which are no longer downloadable
556 (replaced with a new version for instance). pre-auto performs this
557 action before downloading new packages.</para></listitem>
558 </varlistentry>
559
560 <varlistentry><term>options</term>
561 <listitem><para>The contents of this variable is passed to &apt-get; as command line
562 options when it is run for the install phase.</para></listitem>
563 </varlistentry>
564
565 <varlistentry><term>Updateoptions</term>
566 <listitem><para>The contents of this variable is passed to &apt-get; as command line
567 options when it is run for the update phase.</para></listitem>
568 </varlistentry>
569
570 <varlistentry><term>PromptAfterUpdate</term>
571 <listitem><para>If true the [U]pdate operation in &dselect; will always prompt to continue.
572 The default is to prompt only on error.</para></listitem>
573 </varlistentry>
574 </variablelist>
575 </refsect1>
576
577 <refsect1><title>How APT calls dpkg</title>
578 <para>Several configuration directives control how APT invokes &dpkg;. These are
579 in the <literal>DPkg</literal> section.</para>
580
581 <variablelist>
582 <varlistentry><term>options</term>
583 <listitem><para>This is a list of options to pass to dpkg. The options must be specified
584 using the list notation and each list item is passed as a single argument
585 to &dpkg;.</para></listitem>
586 </varlistentry>
587
588 <varlistentry><term>Pre-Invoke</term><term>Post-Invoke</term>
589 <listitem><para>This is a list of shell commands to run before/after invoking &dpkg;.
590 Like <literal>options</literal> this must be specified in list notation. The
591 commands are invoked in order using <filename>/bin/sh</filename>, should any
592 fail APT will abort.</para></listitem>
593 </varlistentry>
594
595 <varlistentry><term>Pre-Install-Pkgs</term>
596 <listitem><para>This is a list of shell commands to run before invoking dpkg. Like
597 <literal>options</literal> this must be specified in list notation. The commands
598 are invoked in order using <filename>/bin/sh</filename>, should any fail APT
599 will abort. APT will pass to the commands on standard input the
600 filenames of all .deb files it is going to install, one per line.</para>
601
602 <para>Version 2 of this protocol dumps more information, including the
603 protocol version, the APT configuration space and the packages, files
604 and versions being changed. Version 2 is enabled by setting
605 <literal>DPkg::Tools::options::cmd::Version</literal> to 2. <literal>cmd</literal> is a
606 command given to <literal>Pre-Install-Pkgs</literal>.</para></listitem>
607 </varlistentry>
608
609 <varlistentry><term>Run-Directory</term>
610 <listitem><para>APT chdirs to this directory before invoking dpkg, the default is
611 <filename>/</filename>.</para></listitem>
612 </varlistentry>
613
614 <varlistentry><term>Build-options</term>
615 <listitem><para>These options are passed to &dpkg-buildpackage; when compiling packages,
616 the default is to disable signing and produce all binaries.</para></listitem>
617 </varlistentry>
618 </variablelist>
619
620 <refsect2><title>dpkg trigger usage (and related options)</title>
621 <para>APT can call dpkg in a way so it can make aggressive use of triggers over
622 multiple calls of dpkg. Without further options dpkg will use triggers only in between his
623 own run. Activating these options can therefore decrease the time needed to perform the
624 install / upgrade. Note that it is intended to activate these options per default in the
625 future, but as it changes the way APT calling dpkg drastically it needs a lot more testing.
626 <emphasis>These options are therefore currently experimental and should not be used in
627 productive environments.</emphasis> Also it breaks the progress reporting so all frontends will
628 currently stay around half (or more) of the time in the 100% state while it actually configures
629 all packages.</para>
630 <para>Note that it is not guaranteed that APT will support these options or that these options will
631 not cause (big) trouble in the future. If you have understand the current risks and problems with
632 these options, but are brave enough to help testing them create a new configuration file and test a
633 combination of options. Please report any bugs, problems and improvements you encounter and make sure
634 to note which options you have used in your reports. Asking dpkg for help could also be useful for
635 debugging proposes, see e.g. <command>dpkg --audit</command>. A defensive option combination would be
636 <literallayout>DPkg::NoTriggers "true";
637 PackageManager::Configure "smart";
638 DPkg::ConfigurePending "true";
639 DPkg::TriggersPending "true";</literallayout></para>
640
641 <variablelist>
642 <varlistentry><term>DPkg::NoTriggers</term>
643 <listitem><para>Add the no triggers flag to all dpkg calls (except the ConfigurePending call).
644 See &dpkg; if you are interested in what this actually means. In short: dpkg will not run the
645 triggers when this flag is present unless it is explicitly called to do so in an extra call.
646 Note that this option exists (undocumented) also in older apt versions with a slightly different
647 meaning: Previously these option only append --no-triggers to the configure calls to dpkg -
648 now apt will add these flag also to the unpack and remove calls.</para></listitem>
649 </varlistentry>
650 <varlistentry><term>PackageManager::Configure</term>
651 <listitem><para>Valid values are "<literal>all</literal>", "<literal>smart</literal>" and "<literal>no</literal>".
652 "<literal>all</literal>" is the default value and causes APT to configure all packages explicit.
653 The "<literal>smart</literal>" way is it to configure only packages which need to be configured before
654 another package can be unpacked (Pre-Depends) and let the rest configure by dpkg with a call generated
655 by the next option. "<literal>no</literal>" on the other hand will not configure anything and totally
656 rely on dpkg for configuration (which will at the moment fail if a Pre-Depends is encountered).
657 Setting this option to another than the all value will implicitly activate also the next option per
658 default as otherwise the system could end in an unconfigured status which could be unbootable!
659 </para></listitem>
660 </varlistentry>
661 <varlistentry><term>DPkg::ConfigurePending</term>
662 <listitem><para>If this option is set apt will call <command>dpkg --configure --pending</command>
663 to let dpkg handle all required configurations and triggers. This option is activated automatic
664 per default if the previous option is not set to <literal>all</literal>, but deactivating could be useful
665 if you want to run APT multiple times in a row - e.g. in an installer. In these sceneries you could
666 deactivate this option in all but the last run.</para></listitem>
667 </varlistentry>
668 <varlistentry><term>DPkg::TriggersPending</term>
669 <listitem><para>Useful for <literal>smart</literal> configuration as a package which has pending
670 triggers is not considered as <literal>installed</literal> and dpkg treats them as <literal>unpacked</literal>
671 currently which is a dealbreaker for Pre-Dependencies (see debbugs #526774). Note that this will
672 process all triggers, not only the triggers needed to configure this package.</para></listitem>
673 </varlistentry>
674 <varlistentry><term>PackageManager::UnpackAll</term>
675 <listitem><para>As the configuration can be deferred to be done at the end by dpkg it can be
676 tried to order the unpack series only by critical needs, e.g. by Pre-Depends. Default is true
677 and therefore the "old" method of ordering in various steps by everything. While both method
678 were present in earlier APT versions the <literal>OrderCritical</literal> method was unused, so
679 this method is very experimental and needs further improvements before becoming really useful.
680 </para></listitem>
681 </varlistentry>
682 <varlistentry><term>OrderList::Score::Immediate</term>
683 <listitem><para>Essential packages (and there dependencies) should be configured immediately
684 after unpacking. It will be a good idea to do this quite early in the upgrade process as these
685 these configure calls require currently also <literal>DPkg::TriggersPending</literal> which
686 will run quite a few triggers (which maybe not needed). Essentials get per default a high score
687 but the immediate flag is relatively low (a package which has a Pre-Depends is higher rated).
688 These option and the others in the same group can be used to change the scoring. The following
689 example shows the settings with there default values.
690 <literallayout>OrderList::Score {
691 Delete 500;
692 Essential 200;
693 Immediate 10;
694 PreDepends 50;
695 };</literallayout>
696 </para></listitem>
697 </varlistentry>
698 </variablelist>
699 </refsect2>
700 </refsect1>
701
702 <refsect1>
703 <title>Periodic and Archives options</title>
704 <para><literal>APT::Periodic</literal> and <literal>APT::Archives</literal>
705 groups of options configure behavior of apt periodic updates, which is
706 done by <literal>/etc/cron.daily/apt</literal> script. See header of
707 this script for the brief documentation of these options.
708 </para>
709 </refsect1>
710
711 <refsect1>
712 <title>Debug options</title>
713 <para>
714 Enabling options in the <literal>Debug::</literal> section will
715 cause debugging information to be sent to the standard error
716 stream of the program utilizing the <literal>apt</literal>
717 libraries, or enable special program modes that are primarily
718 useful for debugging the behavior of <literal>apt</literal>.
719 Most of these options are not interesting to a normal user, but a
720 few may be:
721
722 <itemizedlist>
723 <listitem>
724 <para>
725 <literal>Debug::pkgProblemResolver</literal> enables output
726 about the decisions made by
727 <literal>dist-upgrade, upgrade, install, remove, purge</literal>.
728 </para>
729 </listitem>
730
731 <listitem>
732 <para>
733 <literal>Debug::NoLocking</literal> disables all file
734 locking. This can be used to run some operations (for
735 instance, <literal>apt-get -s install</literal>) as a
736 non-root user.
737 </para>
738 </listitem>
739
740 <listitem>
741 <para>
742 <literal>Debug::pkgDPkgPM</literal> prints out the actual
743 command line each time that <literal>apt</literal> invokes
744 &dpkg;.
745 </para>
746 </listitem>
747
748 <listitem>
749 <para>
750 <literal>Debug::IdentCdrom</literal> disables the inclusion
751 of statfs data in CDROM IDs. <!-- TODO: provide a
752 motivating example, except I haven't a clue why you'd want
753 to do this. -->
754 </para>
755 </listitem>
756 </itemizedlist>
757 </para>
758
759 <para>
760 A full list of debugging options to apt follows.
761 </para>
762
763 <variablelist>
764 <varlistentry>
765 <term><literal>Debug::Acquire::cdrom</literal></term>
766
767 <listitem>
768 <para>
769 Print information related to accessing
770 <literal>cdrom://</literal> sources.
771 </para>
772 </listitem>
773 </varlistentry>
774
775 <varlistentry>
776 <term><literal>Debug::Acquire::ftp</literal></term>
777
778 <listitem>
779 <para>
780 Print information related to downloading packages using
781 FTP.
782 </para>
783 </listitem>
784 </varlistentry>
785
786 <varlistentry>
787 <term><literal>Debug::Acquire::http</literal></term>
788
789 <listitem>
790 <para>
791 Print information related to downloading packages using
792 HTTP.
793 </para>
794 </listitem>
795 </varlistentry>
796
797 <varlistentry>
798 <term><literal>Debug::Acquire::https</literal></term>
799
800 <listitem>
801 <para>
802 Print information related to downloading packages using
803 HTTPS.
804 </para>
805 </listitem>
806 </varlistentry>
807
808 <varlistentry>
809 <term><literal>Debug::Acquire::gpgv</literal></term>
810
811 <listitem>
812 <para>
813 Print information related to verifying cryptographic
814 signatures using <literal>gpg</literal>.
815 </para>
816 </listitem>
817 </varlistentry>
818
819 <varlistentry>
820 <term><literal>Debug::aptcdrom</literal></term>
821
822 <listitem>
823 <para>
824 Output information about the process of accessing
825 collections of packages stored on CD-ROMs.
826 </para>
827 </listitem>
828 </varlistentry>
829
830 <varlistentry>
831 <term><literal>Debug::BuildDeps</literal></term>
832 <listitem>
833 <para>
834 Describes the process of resolving build-dependencies in
835 &apt-get;.
836 </para>
837 </listitem>
838 </varlistentry>
839
840 <varlistentry>
841 <term><literal>Debug::Hashes</literal></term>
842 <listitem>
843 <para>
844 Output each cryptographic hash that is generated by the
845 <literal>apt</literal> libraries.
846 </para>
847 </listitem>
848 </varlistentry>
849
850 <varlistentry>
851 <term><literal>Debug::IdentCDROM</literal></term>
852 <listitem>
853 <para>
854 Do not include information from <literal>statfs</literal>,
855 namely the number of used and free blocks on the CD-ROM
856 filesystem, when generating an ID for a CD-ROM.
857 </para>
858 </listitem>
859 </varlistentry>
860
861 <varlistentry>
862 <term><literal>Debug::NoLocking</literal></term>
863 <listitem>
864 <para>
865 Disable all file locking. For instance, this will allow
866 two instances of <quote><literal>apt-get
867 update</literal></quote> to run at the same time.
868 </para>
869 </listitem>
870 </varlistentry>
871
872 <varlistentry>
873 <term><literal>Debug::pkgAcquire</literal></term>
874
875 <listitem>
876 <para>
877 Log when items are added to or removed from the global
878 download queue.
879 </para>
880 </listitem>
881 </varlistentry>
882
883 <varlistentry>
884 <term><literal>Debug::pkgAcquire::Auth</literal></term>
885 <listitem>
886 <para>
887 Output status messages and errors related to verifying
888 checksums and cryptographic signatures of downloaded files.
889 </para>
890 </listitem>
891 </varlistentry>
892
893 <varlistentry>
894 <term><literal>Debug::pkgAcquire::Diffs</literal></term>
895 <listitem>
896 <para>
897 Output information about downloading and applying package
898 index list diffs, and errors relating to package index list
899 diffs.
900 </para>
901 </listitem>
902 </varlistentry>
903
904 <varlistentry>
905 <term><literal>Debug::pkgAcquire::RRed</literal></term>
906
907 <listitem>
908 <para>
909 Output information related to patching apt package lists
910 when downloading index diffs instead of full indices.
911 </para>
912 </listitem>
913 </varlistentry>
914
915 <varlistentry>
916 <term><literal>Debug::pkgAcquire::Worker</literal></term>
917
918 <listitem>
919 <para>
920 Log all interactions with the sub-processes that actually
921 perform downloads.
922 </para>
923 </listitem>
924 </varlistentry>
925
926 <varlistentry>
927 <term><literal>Debug::pkgAutoRemove</literal></term>
928
929 <listitem>
930 <para>
931 Log events related to the automatically-installed status of
932 packages and to the removal of unused packages.
933 </para>
934 </listitem>
935 </varlistentry>
936
937 <varlistentry>
938 <term><literal>Debug::pkgDepCache::AutoInstall</literal></term>
939 <listitem>
940 <para>
941 Generate debug messages describing which packages are being
942 automatically installed to resolve dependencies. This
943 corresponds to the initial auto-install pass performed in,
944 e.g., <literal>apt-get install</literal>, and not to the
945 full <literal>apt</literal> dependency resolver; see
946 <literal>Debug::pkgProblemResolver</literal> for that.
947 </para>
948 </listitem>
949 </varlistentry>
950
951 <varlistentry>
952 <term><literal>Debug::pkgDepCache::Marker</literal></term>
953 <listitem>
954 <para>
955 Generate debug messages describing which package is marked
956 as keep/install/remove while the ProblemResolver does his work.
957 Each addition or deletion may trigger additional actions;
958 they are shown indented two additional space under the original entry.
959 The format for each line is <literal>MarkKeep</literal>,
960 <literal>MarkDelete</literal> or <literal>MarkInstall</literal> followed by
961 <literal>package-name &lt;a.b.c -&gt; d.e.f | x.y.z&gt; (section)</literal>
962 where <literal>a.b.c</literal> is the current version of the package,
963 <literal>d.e.f</literal> is the version considered for installation and
964 <literal>x.y.z</literal> is a newer version, but not considered for installation
965 (because of a low pin score). The later two can be omitted if there is none or if
966 it is the same version as the installed.
967 <literal>section</literal> is the name of the section the package appears in.
968 </para>
969 </listitem>
970 </varlistentry>
971
972 <!-- Question: why doesn't this do anything? The code says it should. -->
973 <varlistentry>
974 <term><literal>Debug::pkgInitConfig</literal></term>
975 <listitem>
976 <para>
977 Dump the default configuration to standard error on
978 startup.
979 </para>
980 </listitem>
981 </varlistentry>
982
983 <varlistentry>
984 <term><literal>Debug::pkgDPkgPM</literal></term>
985 <listitem>
986 <para>
987 When invoking &dpkg;, output the precise command line with
988 which it is being invoked, with arguments separated by a
989 single space character.
990 </para>
991 </listitem>
992 </varlistentry>
993
994 <varlistentry>
995 <term><literal>Debug::pkgDPkgProgressReporting</literal></term>
996 <listitem>
997 <para>
998 Output all the data received from &dpkg; on the status file
999 descriptor and any errors encountered while parsing it.
1000 </para>
1001 </listitem>
1002 </varlistentry>
1003
1004 <varlistentry>
1005 <term><literal>Debug::pkgOrderList</literal></term>
1006
1007 <listitem>
1008 <para>
1009 Generate a trace of the algorithm that decides the order in
1010 which <literal>apt</literal> should pass packages to
1011 &dpkg;.
1012 </para>
1013 </listitem>
1014 </varlistentry>
1015
1016 <varlistentry>
1017 <term><literal>Debug::pkgPackageManager</literal></term>
1018
1019 <listitem>
1020 <para>
1021 Output status messages tracing the steps performed when
1022 invoking &dpkg;.
1023 </para>
1024 </listitem>
1025 </varlistentry>
1026
1027 <varlistentry>
1028 <term><literal>Debug::pkgPolicy</literal></term>
1029
1030 <listitem>
1031 <para>
1032 Output the priority of each package list on startup.
1033 </para>
1034 </listitem>
1035 </varlistentry>
1036
1037 <varlistentry>
1038 <term><literal>Debug::pkgProblemResolver</literal></term>
1039
1040 <listitem>
1041 <para>
1042 Trace the execution of the dependency resolver (this
1043 applies only to what happens when a complex dependency
1044 problem is encountered).
1045 </para>
1046 </listitem>
1047 </varlistentry>
1048
1049 <varlistentry>
1050 <term><literal>Debug::pkgProblemResolver::ShowScores</literal></term>
1051 <listitem>
1052 <para>
1053 Display a list of all installed packages with their calculated score
1054 used by the pkgProblemResolver. The description of the package
1055 is the same as described in <literal>Debug::pkgDepCache::Marker</literal>
1056 </para>
1057 </listitem>
1058 </varlistentry>
1059
1060 <varlistentry>
1061 <term><literal>Debug::sourceList</literal></term>
1062
1063 <listitem>
1064 <para>
1065 Print information about the vendors read from
1066 <filename>/etc/apt/vendors.list</filename>.
1067 </para>
1068 </listitem>
1069 </varlistentry>
1070
1071 <!-- 2009/07/11 Currently used nowhere. The corresponding code
1072 is commented.
1073 <varlistentry>
1074 <term><literal>Debug::Vendor</literal></term>
1075
1076 <listitem>
1077 <para>
1078 Print information about each vendor.
1079 </para>
1080 </listitem>
1081 </varlistentry>
1082 -->
1083
1084 </variablelist>
1085 </refsect1>
1086
1087 <refsect1><title>Examples</title>
1088 <para>&configureindex; is a
1089 configuration file showing example values for all possible
1090 options.</para>
1091 </refsect1>
1092
1093 <refsect1><title>Files</title>
1094 <variablelist>
1095 &file-aptconf;
1096 </variablelist>
1097 </refsect1>
1098
1099 <refsect1><title>See Also</title>
1100 <para>&apt-cache;, &apt-config;<!-- ? reading apt.conf -->, &apt-preferences;.</para>
1101 </refsect1>
1102
1103 &manbugs;
1104
1105 </refentry>
1106