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