]> git.saurik.com Git - apt.git/blame - doc/apt-ftparchive.1.xml
Additional test for the case when installed version != newest version
[apt.git] / doc / apt-ftparchive.1.xml
CommitLineData
24f6490f 1<?xml version="1.0" encoding="utf-8" standalone="no"?>
81cf16a2
DK
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
24f6490f
AL
4
5<!ENTITY % aptent SYSTEM "apt.ent">
6%aptent;
7
0c1a7101
DK
8<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
9%aptverbatiment;
10
694ef56e
DK
11<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
12%aptvendor;
24f6490f
AL
13]>
14
15<refentry>
5e80de29
AL
16
17 <refentryinfo>
18 &apt-author.jgunthorpe;
19 &apt-author.team;
20 &apt-email;
21 &apt-product;
22 <!-- The last update date -->
dabb215c 23 <date>2012-06-09T00:00:00Z</date>
5e80de29 24 </refentryinfo>
24f6490f
AL
25
26 <refmeta>
27 <refentrytitle>apt-ftparchive</refentrytitle>
28 <manvolnum>1</manvolnum>
f0599b9c 29 <refmiscinfo class="manual">APT</refmiscinfo>
24f6490f
AL
30 </refmeta>
31
32 <!-- Man page title -->
33 <refnamediv>
34 <refname>apt-ftparchive</refname>
35 <refpurpose>Utility to generate index files</refpurpose>
36 </refnamediv>
37
6e8b4572
DK
38 &synopsis-command-apt-ftparchive;
39
24f6490f
AL
40 <refsect1><title>Description</title>
41 <para><command>apt-ftparchive</command> is the command line tool that generates the index
42 files that APT uses to access a distribution source. The index files should
43 be generated on the origin site based on the content of that site.</para>
44
45 <para><command>apt-ftparchive</command> is a superset of the &dpkg-scanpackages; program,
46 incorporating its entire functionality via the <literal>packages</literal> command.
47 It also contains a contents file generator, <literal>contents</literal>, and an
48 elaborate means to 'script' the generation process for a complete
49 archive.</para>
50
51 <para>Internally <command>apt-ftparchive</command> can make use of binary databases to
52 cache the contents of a .deb file and it does not rely on any external
53 programs aside from &gzip;. When doing a full generate it automatically
54 performs file-change checks and builds the desired compressed output files.</para>
55
aec22160
DK
56 <para>Unless the <option>-h</option>, or <option>--help</option> option is given,
57 one of the commands below must be present.</para>
24f6490f
AL
58
59 <variablelist>
2b9b27c3 60 <varlistentry><term><option>packages</option></term>
24f6490f
AL
61 <listitem><para>
62 The packages command generates a package file from a directory tree. It
63 takes the given directory and recursively searches it for .deb files,
64 emitting a package record to stdout for each. This command is
65 approximately equivalent to &dpkg-scanpackages;.</para>
66
67 <para>The option <option>--db</option> can be used to specify a binary caching DB.</para></listitem>
68 </varlistentry>
69
2b9b27c3 70 <varlistentry><term><option>sources</option></term>
24f6490f
AL
71 <listitem><para>
72 The <literal>sources</literal> command generates a source index file from a directory tree.
73 It takes the given directory and recursively searches it for .dsc files,
74 emitting a source record to stdout for each. This command is approximately
75 equivalent to &dpkg-scansources;.</para>
76 <para>
77 If an override file is specified then a source override file will be
78 looked for with an extension of .src. The --source-override option can be
79 used to change the source override file that will be used.</para></listitem>
80 </varlistentry>
81
2b9b27c3 82 <varlistentry><term><option>contents</option></term>
24f6490f
AL
83 <listitem><para>
84 The <literal>contents</literal> command generates a contents file from a directory tree. It
85 takes the given directory and recursively searches it for .deb files,
86 and reads the file list from each file. It then sorts and writes to stdout
87 the list of files matched to packages. Directories are not written to
88 the output. If multiple packages own the same file then each package is
89 separated by a comma in the output.</para>
90 <para>
91 The option <option>--db</option> can be used to specify a binary caching DB.</para></listitem>
92 </varlistentry>
93
2b9b27c3 94 <varlistentry><term><option>release</option></term>
24f6490f
AL
95 <listitem><para>
96 The <literal>release</literal> command generates a Release file from a
3cb3fe76 97 directory tree. It recursively searches the given directory for uncompressed
a4396982 98 <filename>Packages</filename> and <filename>Sources</filename> files and ones
3cb3fe76
DK
99 compressed with <command>gzip</command>, <command>bzip2</command> or <command>lzma</command>
100 as well as <filename>Release</filename> and <filename>md5sum.txt</filename> files by default
101 (<literal>APT::FTPArchive::Release::Default-Patterns</literal>). Additional filename patterns
102 can be added by listing them in <literal>APT::FTPArchive::Release::Patterns</literal>.
a4396982 103 It then writes to stdout a <filename>Release</filename> file containing an MD5, SHA1 and SHA256 digest
24f6490f
AL
104 for each file.</para>
105 <para>
106 Values for the additional metadata fields in the Release file are
107 taken from the corresponding variables under
108 <literal>APT::FTPArchive::Release</literal>,
109 e.g. <literal>APT::FTPArchive::Release::Origin</literal>. The supported fields
110 are: <literal>Origin</literal>, <literal>Label</literal>, <literal>Suite</literal>,
111 <literal>Version</literal>, <literal>Codename</literal>, <literal>Date</literal>,
c99e48ec
DK
112 <literal>Valid-Until</literal>, <literal>Architectures</literal>,
113 <literal>Components</literal>, <literal>Description</literal>.</para></listitem>
24f6490f
AL
114
115 </varlistentry>
116
2b9b27c3 117 <varlistentry><term><option>generate</option></term>
24f6490f
AL
118 <listitem><para>
119 The <literal>generate</literal> command is designed to be runnable from a cron script and
120 builds indexes according to the given config file. The config language
121 provides a flexible means of specifying which index files are built from
122 which directories, as well as providing a simple means of maintaining the
123 required settings.</para></listitem>
124 </varlistentry>
125
2b9b27c3 126 <varlistentry><term><option>clean</option></term>
24f6490f
AL
127 <listitem><para>
128 The <literal>clean</literal> command tidies the databases used by the given
129 configuration file by removing any records that are no longer necessary.</para></listitem>
130 </varlistentry>
131 </variablelist>
132 </refsect1>
133
134 <refsect1><title>The Generate Configuration</title>
135 <para>
136 The <literal>generate</literal> command uses a configuration file to describe the
137 archives that are going to be generated. It follows the typical ISC
138 configuration format as seen in ISC tools like bind 8 and dhcpd.
139 &apt-conf; contains a description of the syntax. Note that the generate
140 configuration is parsed in sectional manner, but &apt-conf; is parsed in a
141 tree manner. This only effects how the scope tag is handled.</para>
142
143 <para>
a4396982 144 The generate configuration has four separate sections, each described below.</para>
24f6490f 145
aec22160 146 <refsect2><title><literal>Dir</literal> Section</title>
24f6490f
AL
147 <para>
148 The <literal>Dir</literal> section defines the standard directories needed to
149 locate the files required during the generation process. These
5f4331c4 150 directories are prepended certain relative paths defined in later
24f6490f
AL
151 sections to produce a complete an absolute path.</para>
152 <variablelist>
2b9b27c3 153 <varlistentry><term><option>ArchiveDir</option></term>
24f6490f
AL
154 <listitem><para>
155 Specifies the root of the FTP archive, in a standard
156 Debian configuration this is the directory that contains the
157 <filename>ls-LR</filename> and dist nodes.</para></listitem>
158 </varlistentry>
159
2b9b27c3 160 <varlistentry><term><option>OverrideDir</option></term>
24f6490f
AL
161 <listitem><para>
162 Specifies the location of the override files.</para></listitem>
163 </varlistentry>
164
2b9b27c3 165 <varlistentry><term><option>CacheDir</option></term>
24f6490f 166 <listitem><para>
a4396982 167 Specifies the location of the cache files.</para></listitem>
24f6490f
AL
168 </varlistentry>
169
2b9b27c3 170 <varlistentry><term><option>FileListDir</option></term>
24f6490f
AL
171 <listitem><para>
172 Specifies the location of the file list files,
173 if the <literal>FileList</literal> setting is used below.</para></listitem>
174 </varlistentry>
175 </variablelist>
176 </refsect2>
177
aec22160 178 <refsect2><title><literal>Default</literal> Section</title>
24f6490f
AL
179 <para>
180 The <literal>Default</literal> section specifies default values, and settings
181 that control the operation of the generator. Other sections may override
182 these defaults with a per-section setting.</para>
183 <variablelist>
2b9b27c3 184 <varlistentry><term><option>Packages::Compress</option></term>
24f6490f
AL
185 <listitem><para>
186 Sets the default compression schemes to use
14301cf3 187 for the package index files. It is a string that contains a space
24f6490f
AL
188 separated list of at least one of: '.' (no compression), 'gzip' and
189 'bzip2'. The default for all compression schemes is '. gzip'.</para></listitem>
190 </varlistentry>
191
2b9b27c3 192 <varlistentry><term><option>Packages::Extensions</option></term>
24f6490f
AL
193 <listitem><para>
194 Sets the default list of file extensions that are package files.
195 This defaults to '.deb'.</para></listitem>
196 </varlistentry>
197
2b9b27c3 198 <varlistentry><term><option>Sources::Compress</option></term>
24f6490f
AL
199 <listitem><para>
200 This is similar to <literal>Packages::Compress</literal>
201 except that it controls the compression for the Sources files.</para></listitem>
202 </varlistentry>
203
2b9b27c3 204 <varlistentry><term><option>Sources::Extensions</option></term>
24f6490f
AL
205 <listitem><para>
206 Sets the default list of file extensions that are source files.
207 This defaults to '.dsc'.</para></listitem>
208 </varlistentry>
209
2b9b27c3 210 <varlistentry><term><option>Contents::Compress</option></term>
24f6490f
AL
211 <listitem><para>
212 This is similar to <literal>Packages::Compress</literal>
213 except that it controls the compression for the Contents files.</para></listitem>
214 </varlistentry>
34f1d96c 215
2b9b27c3 216 <varlistentry><term><option>Translation::Compress</option></term>
34f1d96c
DK
217 <listitem><para>
218 This is similar to <literal>Packages::Compress</literal>
219 except that it controls the compression for the Translation-en master file.</para></listitem>
220 </varlistentry>
221
2b9b27c3 222 <varlistentry><term><option>DeLinkLimit</option></term>
24f6490f
AL
223 <listitem><para>
224 Specifies the number of kilobytes to delink (and
225 replace with hard links) per run. This is used in conjunction with the
226 per-section <literal>External-Links</literal> setting.</para></listitem>
227 </varlistentry>
228
2b9b27c3 229 <varlistentry><term><option>FileMode</option></term>
24f6490f
AL
230 <listitem><para>
231 Specifies the mode of all created index files. It
232 defaults to 0644. All index files are set to this mode with no regard
233 to the umask.</para></listitem>
234 </varlistentry>
34f1d96c 235
2b9b27c3 236 <varlistentry><term><option>LongDescription</option></term>
34f1d96c 237 <listitem><para>
a4396982
JR
238 Specifies whether long descriptions should be included in the <filename>Packages</filename> file or split
239 out into a master <filename>Translation-en</filename> file.</para></listitem>
34f1d96c 240 </varlistentry>
24f6490f
AL
241 </variablelist>
242 </refsect2>
243
aec22160 244 <refsect2><title><literal>TreeDefault</literal> Section</title>
24f6490f
AL
245 <para>
246 Sets defaults specific to <literal>Tree</literal> sections. All of these
247 variables are substitution variables and have the strings $(DIST),
248 $(SECTION) and $(ARCH) replaced with their respective values.</para>
249
250 <variablelist>
2b9b27c3 251 <varlistentry><term><option>MaxContentsChange</option></term>
24f6490f
AL
252 <listitem><para>
253 Sets the number of kilobytes of contents
254 files that are generated each day. The contents files are round-robined
255 so that over several days they will all be rebuilt.</para></listitem>
256 </varlistentry>
257
2b9b27c3 258 <varlistentry><term><option>ContentsAge</option></term>
24f6490f
AL
259 <listitem><para>
260 Controls the number of days a contents file is allowed
261 to be checked without changing. If this limit is passed the mtime of the
262 contents file is updated. This case can occur if the package file is
263 changed in such a way that does not result in a new contents file
264 [override edit for instance]. A hold off is allowed in hopes that new
265 .debs will be installed, requiring a new file anyhow. The default is 10,
266 the units are in days.</para></listitem>
267 </varlistentry>
268
2b9b27c3 269 <varlistentry><term><option>Directory</option></term>
24f6490f
AL
270 <listitem><para>
271 Sets the top of the .deb directory tree. Defaults to
272 <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/</filename></para></listitem>
273 </varlistentry>
274
2b9b27c3 275 <varlistentry><term><option>SrcDirectory</option></term>
24f6490f
AL
276 <listitem><para>
277 Sets the top of the source package directory tree. Defaults to
278 <filename>$(DIST)/$(SECTION)/source/</filename></para></listitem>
279 </varlistentry>
280
2b9b27c3 281 <varlistentry><term><option>Packages</option></term>
24f6490f
AL
282 <listitem><para>
283 Sets the output Packages file. Defaults to
284 <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/Packages</filename></para></listitem>
285 </varlistentry>
286
2b9b27c3 287 <varlistentry><term><option>Sources</option></term>
24f6490f 288 <listitem><para>
c6474fb6 289 Sets the output Sources file. Defaults to
24f6490f
AL
290 <filename>$(DIST)/$(SECTION)/source/Sources</filename></para></listitem>
291 </varlistentry>
4e794c50 292
2b9b27c3 293 <varlistentry><term><option>Translation</option></term>
4e794c50 294 <listitem><para>
a4396982 295 Sets the output Translation-en master file with the long descriptions if they
4e794c50
DK
296 should be not included in the Packages file. Defaults to
297 <filename>$(DIST)/$(SECTION)/i18n/Translation-en</filename></para></listitem>
4e794c50
DK
298 </varlistentry>
299
2b9b27c3 300 <varlistentry><term><option>InternalPrefix</option></term>
24f6490f
AL
301 <listitem><para>
302 Sets the path prefix that causes a symlink to be
303 considered an internal link instead of an external link. Defaults to
304 <filename>$(DIST)/$(SECTION)/</filename></para></listitem>
305 </varlistentry>
306
2b9b27c3 307 <varlistentry><term><option>Contents</option></term>
24f6490f
AL
308 <listitem><para>
309 Sets the output Contents file. Defaults to
3adddfa8 310 <filename>$(DIST)/$(SECTION)/Contents-$(ARCH)</filename>. If this setting causes multiple
a4396982 311 Packages files to map onto a single Contents file (as is the default)
24f6490f
AL
312 then <command>apt-ftparchive</command> will integrate those package files
313 together automatically.</para></listitem>
314 </varlistentry>
315
2b9b27c3 316 <varlistentry><term><option>Contents::Header</option></term>
24f6490f
AL
317 <listitem><para>
318 Sets header file to prepend to the contents output.</para></listitem>
319 </varlistentry>
320
2b9b27c3 321 <varlistentry><term><option>BinCacheDB</option></term>
24f6490f
AL
322 <listitem><para>
323 Sets the binary cache database to use for this
324 section. Multiple sections can share the same database.</para></listitem>
325 </varlistentry>
326
2b9b27c3 327 <varlistentry><term><option>FileList</option></term>
24f6490f
AL
328 <listitem><para>
329 Specifies that instead of walking the directory tree,
330 <command>apt-ftparchive</command> should read the list of files from the given
331 file. Relative files names are prefixed with the archive directory.</para></listitem>
332 </varlistentry>
333
2b9b27c3 334 <varlistentry><term><option>SourceFileList</option></term>
24f6490f
AL
335 <listitem><para>
336 Specifies that instead of walking the directory tree,
337 <command>apt-ftparchive</command> should read the list of files from the given
338 file. Relative files names are prefixed with the archive directory.
e3a1f08d 339 This is used when processing source indexes.</para></listitem>
24f6490f
AL
340 </varlistentry>
341 </variablelist>
342 </refsect2>
343
aec22160 344 <refsect2><title><literal>Tree</literal> Section</title>
24f6490f
AL
345 <para>
346 The <literal>Tree</literal> section defines a standard Debian file tree which
347 consists of a base directory, then multiple sections in that base
348 directory and finally multiple Architectures in each section. The exact
349 pathing used is defined by the <literal>Directory</literal> substitution variable.</para>
350 <para>
351 The <literal>Tree</literal> section takes a scope tag which sets the
352 <literal>$(DIST)</literal> variable and defines the root of the tree
353 (the path is prefixed by <literal>ArchiveDir</literal>).
e1dd65c9 354 Typically this is a setting such as <filename>dists/&stable-codename;</filename>.</para>
24f6490f
AL
355 <para>
356 All of the settings defined in the <literal>TreeDefault</literal> section can be
a4396982 357 used in a <literal>Tree</literal> section as well as three new variables.</para>
24f6490f
AL
358 <para>
359 When processing a <literal>Tree</literal> section <command>apt-ftparchive</command>
360 performs an operation similar to:
f8b832bd 361 <programlisting>
24f6490f
AL
362for i in Sections do
363 for j in Architectures do
364 Generate for DIST=scope SECTION=i ARCH=j
f8b832bd 365 </programlisting></para>
24f6490f
AL
366
367 <variablelist>
2b9b27c3 368 <varlistentry><term><option>Sections</option></term>
24f6490f
AL
369 <listitem><para>
370 This is a space separated list of sections which appear
a4396982 371 under the distribution; typically this is something like
24f6490f
AL
372 <literal>main contrib non-free</literal></para></listitem>
373 </varlistentry>
374
2b9b27c3 375 <varlistentry><term><option>Architectures</option></term>
24f6490f
AL
376 <listitem><para>
377 This is a space separated list of all the
378 architectures that appear under search section. The special architecture
379 'source' is used to indicate that this tree has a source archive.</para></listitem>
380 </varlistentry>
4e794c50 381
2b9b27c3 382 <varlistentry><term><option>LongDescription</option></term>
4e794c50 383 <listitem><para>
a4396982
JR
384 Specifies whether long descriptions should be included in the <filename>Packages</filename> file or split
385 out into a master <filename>Translation-en</filename> file.</para></listitem>
4e794c50
DK
386 </varlistentry>
387
2b9b27c3 388 <varlistentry><term><option>BinOverride</option></term>
24f6490f
AL
389 <listitem><para>
390 Sets the binary override file. The override file
391 contains section, priority and maintainer address information.</para></listitem>
392 </varlistentry>
393
2b9b27c3 394 <varlistentry><term><option>SrcOverride</option></term>
24f6490f
AL
395 <listitem><para>
396 Sets the source override file. The override file
397 contains section information.</para></listitem>
398 </varlistentry>
399
2b9b27c3 400 <varlistentry><term><option>ExtraOverride</option></term>
24f6490f
AL
401 <listitem><para>
402 Sets the binary extra override file.</para></listitem>
403 </varlistentry>
404
2b9b27c3 405 <varlistentry><term><option>SrcExtraOverride</option></term>
24f6490f
AL
406 <listitem><para>
407 Sets the source extra override file.</para></listitem>
408 </varlistentry>
409 </variablelist>
410 </refsect2>
411
aec22160 412 <refsect2><title><literal>BinDirectory</literal> Section</title>
24f6490f
AL
413 <para>
414 The <literal>bindirectory</literal> section defines a binary directory tree
415 with no special structure. The scope tag specifies the location of
416 the binary directory and the settings are similar to the <literal>Tree</literal>
417 section with no substitution variables or
418 <literal>Section</literal><literal>Architecture</literal> settings.</para>
419 <variablelist>
2b9b27c3 420 <varlistentry><term><option>Packages</option></term>
24f6490f
AL
421 <listitem><para>
422 Sets the Packages file output.</para></listitem>
423 </varlistentry>
424
2b9b27c3 425 <varlistentry><term><option>Sources</option></term>
24f6490f
AL
426 <listitem><para>
427 Sets the Sources file output. At least one of
168e1e4e 428 <literal>Packages</literal> or <literal>Sources</literal> is required.</para></listitem>
24f6490f
AL
429 </varlistentry>
430
2b9b27c3 431 <varlistentry><term><option>Contents</option></term>
24f6490f 432 <listitem><para>
a4396982 433 Sets the Contents file output (optional).</para></listitem>
24f6490f
AL
434 </varlistentry>
435
2b9b27c3 436 <varlistentry><term><option>BinOverride</option></term>
24f6490f
AL
437 <listitem><para>
438 Sets the binary override file.</para></listitem>
439 </varlistentry>
440
2b9b27c3 441 <varlistentry><term><option>SrcOverride</option></term>
24f6490f
AL
442 <listitem><para>
443 Sets the source override file.</para></listitem>
444 </varlistentry>
445
2b9b27c3 446 <varlistentry><term><option>ExtraOverride</option></term>
24f6490f
AL
447 <listitem><para>
448 Sets the binary extra override file.</para></listitem>
449 </varlistentry>
450
2b9b27c3 451 <varlistentry><term><option>SrcExtraOverride</option></term>
24f6490f
AL
452 <listitem><para>
453 Sets the source extra override file.</para></listitem>
454 </varlistentry>
455
2b9b27c3 456 <varlistentry><term><option>BinCacheDB</option></term>
24f6490f
AL
457 <listitem><para>
458 Sets the cache DB.</para></listitem>
459 </varlistentry>
460
2b9b27c3 461 <varlistentry><term><option>PathPrefix</option></term>
24f6490f
AL
462 <listitem><para>
463 Appends a path to all the output paths.</para></listitem>
464 </varlistentry>
465
2b9b27c3 466 <varlistentry><term><option>FileList</option></term><term><option>SourceFileList</option></term>
24f6490f
AL
467 <listitem><para>
468 Specifies the file list file.</para></listitem>
469 </varlistentry>
470 </variablelist>
471 </refsect2>
472 </refsect1>
473
474
475 <refsect1><title>The Binary Override File</title>
476 <para>The binary override file is fully compatible with &dpkg-scanpackages;. It
a4396982
JR
477 contains four fields separated by spaces. The first field is the package name,
478 the second is the priority to force that package to, the third is
24f6490f
AL
479 the section to force that package to and the final field is the maintainer
480 permutation field.</para>
481 <para>The general form of the maintainer field is:
482 <literallayout>old [// oldn]* => new</literallayout>
483 or simply,
484 <literallayout>new</literallayout>
485 The first form allows a double-slash separated list of old email addresses
486 to be specified. If any of those are found then new is substituted for the
487 maintainer field. The second form unconditionally substitutes the
488 maintainer field.</para>
489 </refsect1>
490
491
492 <refsect1><title>The Source Override File</title>
493 <para>
494 The source override file is fully compatible with &dpkg-scansources;. It
a4396982 495 contains two fields separated by spaces. The first field is the source
24f6490f
AL
496 package name, the second is the section to assign it.</para>
497 </refsect1>
498
499 <refsect1><title>The Extra Override File</title>
500 <para>
501 The extra override file allows any arbitrary tag to be added or replaced
a4396982 502 in the output. It has three columns, the first is the package, the second is
24f6490f
AL
503 the tag and the remainder of the line is the new value.</para>
504 </refsect1>
505
506 <refsect1><title>options</title>
507 &apt-cmdblurb;
508
509 <variablelist>
2b9b27c3 510 <varlistentry><term><option>--md5</option></term><term><option>--sha1</option></term><term><option>--sha256</option></term>
24f6490f 511 <listitem><para>
3c54407f
DK
512 Generate the given checksum. These options default to on, when turned off the generated
513 index files will not have the checksum fields where possible.
514 Configuration Items: <literal>APT::FTPArchive::<replaceable>Checksum</replaceable></literal> and
515 <literal>APT::FTPArchive::<replaceable>Index</replaceable>::<replaceable>Checksum</replaceable></literal> where
1fc8c922
MV
516 <literal><replaceable>Index</replaceable></literal> can be <literal>Packages</literal>, <literal>Sources</literal> or
517 <literal>Release</literal> and <literal><replaceable>Checksum</replaceable></literal> can be <literal>MD5</literal>,
518 <literal>SHA1</literal> or <literal>SHA256</literal>.</para></listitem>
24f6490f
AL
519 </varlistentry>
520
521 <varlistentry><term><option>-d</option></term><term><option>--db</option></term>
522 <listitem><para>
523 Use a binary caching DB. This has no effect on the generate command.
524 Configuration Item: <literal>APT::FTPArchive::DB</literal>.</para></listitem>
525 </varlistentry>
526
527 <varlistentry><term><option>-q</option></term><term><option>--quiet</option></term>
528 <listitem><para>
529 Quiet; produces output suitable for logging, omitting progress indicators.
530 More q's will produce more quiet up to a maximum of 2. You can also use
531 <option>-q=#</option> to set the quiet level, overriding the configuration file.
532 Configuration Item: <literal>quiet</literal>.</para></listitem>
533 </varlistentry>
534
535 <varlistentry><term><option>--delink</option></term>
536 <listitem><para>
537 Perform Delinking. If the <literal>External-Links</literal> setting is used then
538 this option actually enables delinking of the files. It defaults to on and
539 can be turned off with <option>--no-delink</option>.
540 Configuration Item: <literal>APT::FTPArchive::DeLinkAct</literal>.</para></listitem>
541 </varlistentry>
542
543 <varlistentry><term><option>--contents</option></term>
544 <listitem><para>
545 Perform contents generation. When this option is set and package indexes
546 are being generated with a cache DB then the file listing will also be
547 extracted and stored in the DB for later use. When using the generate
548 command this option also allows the creation of any Contents files. The
549 default is on.
550 Configuration Item: <literal>APT::FTPArchive::Contents</literal>.</para></listitem>
551 </varlistentry>
552
553 <varlistentry><term><option>-s</option></term><term><option>--source-override</option></term>
554 <listitem><para>
555 Select the source override file to use with the <literal>sources</literal> command.
556 Configuration Item: <literal>APT::FTPArchive::SourceOverride</literal>.</para></listitem>
557 </varlistentry>
558
559 <varlistentry><term><option>--readonly</option></term>
560 <listitem><para>
561 Make the caching databases read only.
562 Configuration Item: <literal>APT::FTPArchive::ReadOnlyDB</literal>.</para></listitem>
31981076
DK
563 </varlistentry>
564
565 <varlistentry><term><option>-a</option></term><term><option>--arch</option></term>
566 <listitem><para>Accept in the <literal>packages</literal> and <literal>contents</literal>
567 commands only package files matching <literal>*_arch.deb</literal> or
568 <literal>*_all.deb</literal> instead of all package files in the given path.
569 Configuration Item: <literal>APT::FTPArchive::Architecture</literal>.</para></listitem>
570 </varlistentry>
9c24493f 571
ff574e76
DK
572 <varlistentry><term><option>APT::FTPArchive::AlwaysStat</option></term>
573 <listitem><para>
31981076 574 &apt-ftparchive; caches as much as possible of metadata in a cachedb. If packages
ff574e76
DK
575 are recompiled and/or republished with the same version again, this will lead to problems
576 as the now outdated cached metadata like size and checksums will be used. With this option
577 enabled this will no longer happen as it will be checked if the file was changed.
578 Note that this option is set to "<literal>false</literal>" by default as it is not recommend
579 to upload multiply versions/builds of a package with the same versionnumber, so in theory
580 nobody will have these problems and therefore all these extra checks are useless.
581 </para></listitem>
582 </varlistentry>
583
9c24493f
DK
584 <varlistentry><term><option>APT::FTPArchive::LongDescription</option></term>
585 <listitem><para>
586 This configuration option defaults to "<literal>true</literal>" and should only be set to
587 <literal>"false"</literal> if the Archive generated with &apt-ftparchive; also provides
4e794c50
DK
588 <filename>Translation</filename> files. Note that the <filename>Translation-en</filename>
589 master file can only be created in the generate command.
9c24493f
DK
590 </para></listitem>
591 </varlistentry>
592
24f6490f
AL
593 &apt-commonoptions;
594
595 </variablelist>
596 </refsect1>
597
598<refsect1><title>Examples</title>
599
600<para>To create a compressed Packages file for a directory containing
601binary packages (.deb):
602
603<programlisting>
604<command>apt-ftparchive</command> packages <replaceable>directory</replaceable> | <command>gzip</command> > <filename>Packages.gz</filename>
605</programlisting></para>
606
607</refsect1>
608
609 <refsect1><title>See Also</title>
610 <para>&apt-conf;</para>
611 </refsect1>
612
613 <refsect1><title>Diagnostics</title>
614 <para><command>apt-ftparchive</command> returns zero on normal operation, decimal 100 on error.</para>
615 </refsect1>
616
617 &manbugs;
24f6490f
AL
618
619</refentry>