apt-ftparchive.1.xml 27 KB

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