<title>APT Method Interface </title>
<author>Jason Gunthorpe <email>jgg@debian.org</email></author>
-<version>$Id: method.sgml,v 1.5 1998/12/04 21:16:54 jgg Exp $</version>
+<version>$Id: method.sgml,v 1.7 1999/10/18 00:37:36 jgg Exp $</version>
<abstract>
This document describes the interface that APT uses to the archive
<p>
The APT method interface allows APT to acquire archive files (.deb), index
-files (Packages, Revision, Mirrors) and source files (.tar.gz, .diff). It
+files (Packages, Release, Mirrors) and source files (.tar.gz, .diff). It
is a general, extensible system designed to satisfy all of these
requirements:
<tag>Pipeline<item>The method is capable of pipelining.
<tag>Local<item>The method only returns Filename: feilds.
<tag>Send-Config<item>Send configuration to the method.
+<tag>Needs-Cleanup<item>The process is kept around while the files it returned
+are being used. This is primarily intended for CDROM and File URIs that need
+to unmount filesystems.
<tag>Version<item>Version string for the method
</taglist>
Displays the capabilities of the method. Methods should set the
pipeline bit if their underlying protocol supports pipeling. The
only known method that does support pipelining is http.
-Fields: Version, Single-Instance, Pre-Scan, Pipeline, Send-Config
+Fields: Version, Single-Instance, Pre-Scan, Pipeline, Send-Config,
+Needs-Cleanup
<tag>101 Log<item>
A log message may be printed to the screen if debugging is enabled. This
</sect>
<!-- }}} -->
-<!-- Examples {{{ -->
+<!-- Method Notes {{{ -->
<!-- ===================================================================== -->
-<sect>Examples
+<sect>Notes
+
+<p>
+The methods supplied by the stock apt are:
+<enumlist>
+<item>cdrom - For Multi-Disc CDROMs
+<item>copy - (internal) For copying files around the filesystem
+<item>file - For local files
+<item>gzip - (internal) For decompression
+<item>http - For HTTP servers
+</enumlist>
+
+<p>
+The two internal methods, copy and gzip, are used by the acquire code to
+parallize and simplify the automatic decompression of package files as well
+as copying package files around the file system. Both methods can be seen to
+act the same except that one decompresses on the fly. APT uses them by
+generating a copy URI that is formed identically to a file URI. The destination
+file is send as normal. The method then takes the file specified by the
+URI and writes it to the destination file. A typical set of operations may
+be:
+<example>
+http://foo.com/Packages.gz -> /bar/Packages.gz
+gzip:/bar/Packages.gz -> /bar/Packages.decomp
+rename Packages.decomp to /final/Packages
+</example>
+
+<p>
+The http method implements a fully featured HTTP/1.1 client that supports
+deep pipelining and reget. It works best when coupled with an apache 1.3
+server. The file method simply generates failures or success responses with
+the filename field set to the proper location. The cdrom method acts the same
+except that it checks that the mount point has a valid cdrom in it. It does
+this by (effectively) computing a md5 hash of 'ls -l' on the mountpoint.
</sect>
<!-- }}} -->