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