apt.conf.5.xml 42 KB

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