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