]> err.no Git - dpkg/commitdiff
Add docbook version of dpkg(8)
authorWichert Akkerman <wakkerma@debian.org>
Fri, 12 Apr 2002 16:47:13 +0000 (16:47 +0000)
committerWichert Akkerman <wakkerma@debian.org>
Fri, 12 Apr 2002 16:47:13 +0000 (16:47 +0000)
ChangeLog
man/en/dpkg.8.sgml [new file with mode: 0644]

index d2417ebe2f2575ca8e3b4f3f9fc647938b6f0737..ab01e64f8323765d1083e6ab214c65c2bbcaf6e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Apr 12 18:46:16 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
+
+  * man/en/dpkg.8.sgml: DocBook version of dpkg manpage
+
 Wed Apr 10 00:39:58 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 
   * configure.in: use AC_SYS_LARGEFILE and bump autoconf requirement to 2.50
diff --git a/man/en/dpkg.8.sgml b/man/en/dpkg.8.sgml
new file mode 100644 (file)
index 0000000..c1fc363
--- /dev/null
@@ -0,0 +1,1487 @@
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+
+<refentry id='dpkg.8'>
+  <refmeta>
+    <refentrytitle>dpkg</refentrytitle>
+    <manvolnum>8</manvolnum>
+    <refmiscinfo class='source'>Debian Project</refmiscinfo>
+    <refmiscinfo class='manual'>dpkg suite</refmiscinfo>
+  </refmeta>
+
+  <refnamediv id='name'>
+    <refname> dpkg</refname>
+    <refpurpose>a medium-level package manager for Debian</refpurpose>
+  </refnamediv>
+
+
+  <refsynopsisdiv id='synopsis'>
+    <cmdsynopsis>
+      <command>dpkg</command> 
+      <arg choice='opt'><replaceable>options</replaceable></arg>
+      <arg choice='plain'><replaceable>action</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id='warning'>
+    <title>Warning</title>
+
+    <para>
+      This manual is intended for users wishing to understand
+      <command>dpkg</command>'s command line options and package states in
+      more detail than that provided by <command>dpkg --help</command>.
+    </para>
+
+    <para>
+      It should <emphasis>not</emphasis> be used by package maintainers
+      wishing to understand how <command>dpkg</command> will install their
+      packages. The descriptions of what <command>dpkg</command> does when
+      installing and removing packages are particularly inadequate.
+    </para>
+  </refsect1>
+
+
+  <refsect1 id='description'>
+    <title>Description</title>
+
+    <para>
+      <command>dpkg</command> is a medium-level tool to install, build, remove
+      and manage Debian packages. The primary and more user-friendly front-end
+      for <command>dpkg</command> is <command>dselect</command> (see
+      <citerefentry><refentrytitle>dselect</refentrytitle>
+      <manvolnum>8</manvolnum></citerefentry>). <command>dpkg</command> itself
+      is controlled entirely via command line parameters, which consist of
+      exactly one action and zero or more options. The action-parameter tells
+      <command>dpkg</command> what to do and options control the behavior of
+      the action in some way.
+    </para>
+
+    <para>
+      <command>dpkg</command> can be also be used as a front-end to
+      <command>dpkg-deb</command>. The following are
+      <command>dpkg-deb</command> actions, and if they are encountered,
+      <command>dpkg</command> just runs <command>dpkg-deb</command> with the
+      parameters given to it:
+
+      <SimpleList columns=2>
+        <Member><option>-b</option>, <option>--build</option></Member>
+        <Member><option>-c</option>, <option>--contents</option></Member>
+        <Member><option>-I</option>, <option>--info</option></Member>
+        <Member><option>-f</option>, <option>--field</option></Member>
+        <Member><option>-e</option>, <option>--control</option></Member>
+        <Member><option>-x</option>, <option>--extract</option></Member>
+        <Member><option>-X</option>, <option>--vextract</option></Member>
+        <Member><option>--fsys-tarfile</option></Member>
+      </SimpleList>
+    </para>
+
+    <para>
+      Please refer to
+      <citerefentry><refentrytitle>dpkg-deb</refentrytitle>
+      <manvolnum>1</manvolnum> </citerefentry> for information about these
+      actions.
+    </para>
+  </refsect1>
+
+  <refsect1 id='informationAboutPackages'>
+    <title>Information About Packages</title>
+
+    <para>
+      <command>dpkg</command> maintains some usable information about available
+      packages. The information is divided in three classes: states,
+      selection states and flags.  These values are intended to
+      be changed mainly with <command>dselect</command>.
+    </para>
+
+    <refsect2 id='packageStates'>
+      <title>Package States</title>
+
+      <variablelist>
+       <varlistentry>
+         <term>installed</term>
+         <listitem><para>
+           The package is unpacked and configured OK.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>half-installed</term>
+         <listitem><para>
+           The installation of the package has been started, but not completed
+           for some reason.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>not-installed</term>
+         <listitem><para>
+           The package is not installed on your system.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>unpacked</term>
+         <listitem><para>
+           The package is unpacked, but not configured.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>half-configured</term>
+         <listitem><para>
+           The package is unpacked and configuration has been started, but not
+           yet completed for some reason.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>config-files</term>
+         <listitem><para>
+           Only the configuration files of the package exist on the system.
+         </para></listitem>
+       </varlistentry>
+
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id='packageSelectionStates'>
+      <title>Package Selection States</title>
+
+      <variablelist>
+       <varlistentry>
+         <term>install</term>
+         <listitem><para>
+           The package is selected for installation.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>deinstall</term>
+         <listitem><para>
+           The package is selected for deinstallation (i.e. we want to remove
+           all files, except configuration files).
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>purge</term>
+         <listitem><para>
+           The package is selected to be purged (i.e. we want to remove
+           everything, even configuration files).
+         </para></listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id='packageFlags'>
+      <title>Package Flags</title>
+
+      <variablelist>
+       <varlistentry>
+         <term>hold</term>
+         <listitem><para>
+           A package marked to be on hold is not handled by
+           <command>dpkg</command>, unless forced to do that with option
+           <option>--force-hold</option>.
+         </para></listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>reinst-required</term>
+         <listitem><para>
+           A package marked reinst-required is broken and requires
+           reinstallation. These packages cannot be removed, unless forced
+           with option <option>--force-reinstreq</option>.
+         </para></listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+  </refsect1>
+
+  <refsect1 id='actions'>
+    <title>Actions</title>
+
+    <variablelist>
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-i</arg>
+               <arg>--install</arg>
+             </group>
+             <replaceable>package_file</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Install the package. If <option>--recursive</option> or
+           <option>-R</option> option is specified,
+           <filename>package file</filename> must refer to a directory
+           instead.
+         </para>
+
+         <para>
+           Installation consists of the following steps:
+         </para>
+
+         <orderedlist spacing="compact" numeration="arabic">
+           <listitem><para>
+             Extract the control files of the new package.
+           </para></listitem>
+
+           <listitem><para>
+             If another version of the same package was installed before
+             the new installation, execute <filename>prerm</filename> script
+             of the old package.
+           </para></listitem>
+
+           <listitem><para>
+             Run the <filename>preinst</filename> script, if provided by the
+             package.
+           </para></listitem>
+
+           <listitem><para>
+             Unpack the new files, and at the same time back up the old files,
+             so that if something goes wrong, they can be restored.
+           </para></listitem>
+
+           <listitem><para>
+             If another version of the same package was installed before
+             the new installation, execute the <filename>postrm</filename>
+             script of the old package. Note that this script is executed
+             after the <filename>preinst</filename> script of the new package,
+             because new files are written at the same time old files are
+             removed.
+           </para></listitem>
+
+           <listitem><para>
+             Configure the package. See <option>--configure</option> for
+             detailed information about how this is done.
+           </para></listitem>
+         </orderedlist>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg rep="repeat" choice="plain">--unpack <replaceable>package_file</replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Unpack the package, but don't configure it. If
+           <option>--recursive</option> or <option>-R</option> option is
+           specified, <filename>package_file</filename> must refer
+           to a directory instead.
+         </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--configure
+             <group choice="req">
+               <arg>--pending</arg>
+               <arg>-a</arg>
+               <arg rep="repeat" choice="plain"> <replaceable>package</replaceable></arg>
+             </group>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Reconfigure an unpacked package. If <option>-a</option> or
+           <option>--pending</option> is given instead of
+           <filename>package</filename>, all unpacked but unconfigured
+           packages are configured.
+         </para>
+
+         <para>
+           Configuring consists of the following steps:
+         </para>
+
+         <orderedlist spacing="compact" numeration="arabic">
+           <listitem><para>
+             Unpack the configuration files, and at the same time back up the
+             old configuration files, so that they can be restored if
+             something goes wrong.
+           </para></listitem>
+
+           <listitem><para>
+             Run <filename>postinst</filename> script, if provided by the
+             package.
+           </para> </listitem>
+         </orderedlist>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">
+             <group choice="req">
+               <arg>-r</arg>
+               <arg>--remove</arg>
+               <arg>-P</arg>
+               <arg>--purge</arg>
+             </group>
+             <group choice="req">
+               <arg choice="plain">--pending</arg>
+               <arg choice="plain">-a</arg>
+               <arg choice="plain" rep="repeat"><replaceable>package</replaceable></arg>
+             </group>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Remove an installed package. <option>-r</option> or
+           <option>--remove</option> remove everything except configuration
+           files. This may avoid having to reconfigure the package if it is
+           reinstalled later. (Configuration files are the files listed in the
+           <filename>debian/conffiles</filename> control file).
+           <option>-P</option> or <option>--purge</option> removes everything,
+           including configuration files.
+         </para>
+
+         <para>
+           If <option>-a</option> or <option>--pending</option> is given
+           instead of a package name, then all packages unpacked, but
+           marked to be removed or purged in file
+           <filename>/var/lib/dpkg/status</filename>, are removed or purged,
+           respectively.
+         </para>
+
+         <para>
+           Removing of a package consists of the following steps:
+         </para>
+
+         <orderedlist spacing="compact" numeration="arabic">
+           <listitem><para>
+             Run <filename>prerm</filename> script.
+           </para></listitem>
+
+           <listitem><para>
+             Remove the installed files.
+           </para></listitem>
+
+           <listitem><para>
+             Run <filename>postrm</filename> script.
+           </para></listitem>
+         </orderedlist>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-p</arg>
+               <arg>--print-avail</arg>
+             </group>
+             <replaceable>package</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Display details about <option>package</option>, as found in
+         <filename>/var/lib/dpkg/available</filename>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>--update-avail</arg>
+               <arg>--merge-avail</arg>
+             </group>
+             <replaceable>Packages file</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Update <command>dpkg</command>'s and <command>dselect</command>'s
+         idea of which packages are available. With action
+         <option>--merge-avail</option>, old information is combined with
+         information from <option>Packages-file</option>. With action
+         <option>--update-avail</option>, old information is replaced with the
+         information in the <option>Packages-file</option>. The
+         <filename>Packages-file</filename> distributed with Debian is simply
+         named <filename>Packages</filename>. <command>dpkg</command> keeps
+         its record of available packages in
+         <filename>/var/lib/dpkg/available</filename>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-A</arg>
+               <arg>--record-avail</arg>
+             </group>
+             <replaceable>package file</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Update <command>dpkg</command> and <command>dselect</command>'s idea
+         of which packages are available with information from the package
+         <filename>package file</filename>. If <option>--recursive</option> or
+         <option>-R</option> option is specified,
+         <filename>package file</filename> must refer to a directory
+         instead.
+       </para> </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--forget-old-unavail</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Forget about uninstalled unavailable packages.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--clear-avail</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Erase the existing information about what packages are
+         available.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-l</arg>
+               <arg>--list</arg>
+             </group>
+             <replaceable>package-name-pattern</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         List packages matching given pattern. If no
+         <option>package-name-pattern</option> is given, list all packages
+         in <filename>/var/lib/dpkg/available</filename>. Normal shell
+         wildchars are allowed. (You will probably have to quote 
+         <option>package-name-pattern</option> to prevent the shell
+         from performing filename expansion. For example,
+         <screen>dpkg -l 'libc5*'</screen> will list all the package
+         names starting with "libc5".)
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-s</arg>
+               <arg>--status</arg>
+             </group>
+             <replaceable>package-name</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Report status of specified package. This just displays the entry in
+         the installed package status database.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">
+             <group choice="req">
+               <arg>-C</arg>
+               <arg>--audit</arg>
+             </group>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Searches for packages that have been installed only partially on your
+         system. <command>dpkg</command> will suggest what to do with them to
+         get them working.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">--get-selections <replaceable><optional>pattern</optional></replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Get list of package selections, and write it to stdout.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--set-selections</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Set package selections using file read from stdin.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--yet-to-unpack</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Searches for packages selected for installation, but which for some
+         reason still haven't been installed.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-L</arg>
+               <arg>--listfiles</arg>
+             </group>
+             <replaceable>package</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         List files installed to your system from <option>package</option>.
+         However, note that files created by package-specific
+         installation-scripts are not listed.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain" rep="repeat">
+             <group choice="req">
+               <arg>-S</arg>
+               <arg>--search</arg>
+             </group>
+             <replaceable>filename_search_pattern</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Search for a filename from installed packages. All standard shell
+         wildchars can be used in the pattern.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--print-architecture </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Print target architecture (for example, "i386"). This option uses
+         <command>gcc</command>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--print-gnu-build-architecture</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Print GNU version of target architecture (for example, "i486").
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--print-installation-architecture</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Print host architecture for installation.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--compare-versions
+             <replaceable>ver1</replaceable>
+             <replaceable>op</replaceable>
+             <replaceable>ver2</replaceable>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Compare version numbers, where <option>op</option> is a binary
+         operator. <command>dpkg</command> returns success (zero result) if
+         the specified condition is satisfied, and failure (nonzero result)
+         otherwise.  There are two groups of operators, which differ in how
+         they treat a missing <option>ver1</option> or <option>ver2</option>.
+         These treat no version as earlier than any version:
+         <emphasis>lt le eq ne ge gt</emphasis>. These treat no version as
+         later than any version: <emphasis>lt-nl le-nl ge-nl gt-nl</emphasis>.
+         These are provided only for compatibility with
+         <filename>control</filename> file syntax: <emphasis>&lt; &lt;&lt;
+         &lt;= = &gt;= &gt;&gt; &gt;</emphasis>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--command-fd <replaceable>&lt;n&gt;</replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Accept a series of commands on input file descriptor 
+         <option>&lt;n&gt;</option>. Note: additional options set on the
+         command line, and thru this file descriptor, are not reset for
+         subsequent commands executed during the same run.
+       </para> </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--help</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Display a brief help message.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--force-help</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Give help about the
+         <option>--force-<replaceable>thing</replaceable></option> options.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">
+             <group choice="req">
+               <arg>-Dh</arg>
+               <arg>--debug=help></arg>
+             </group>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Give help about debugging options.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">
+             <group choice="req">
+               <arg>--licence</arg>
+               <arg>--license </arg>
+             </group>
+           </arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Display <command>dpkg</command> licence.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <command>dpkg</command>
+           <arg choice="plain">--version</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Display <command>dpkg</command> version information.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <command>dpkg-deb</command> actions
+       </term>
+
+       <listitem><para>
+           See <citerefentry><refentrytitle>dpkg-deb</refentrytitle>
+           <manvolnum>1</manvolnum></citerefentry> for more information
+           about the low-level actions.
+       </para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id='options'>
+    <title>Options</title>
+
+    <para>
+      All options can be specified both on the commandline and in the
+      <command>dpkg</command> configuration file
+      <filename>/etc/dpkg/dpkg.cfg</filename>. Each line in the configuration
+      file is either an option (exactly the same as the commandline option
+      but without leading dashes) or a comment (if it starts with a
+      hash (`#') sign).
+    </para>
+
+    <variablelist>
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice="plain">--abort-after=<replaceable>number</replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Change after how many errors <command>dpkg</command> will abort.
+         The default is 50.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">-B</arg>
+             <arg choice="plain">--auto-deconfigure</arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         When a package is removed, there is a possibility that another
+         installed package depended on the removed package. Specifying this
+         option will cause automatic deconfiguration of the package which
+         depended on the removed package.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">-D<replaceable>octal</replaceable></arg>
+             <arg choice='plain'>--debug=<replaceable>octal</replaceable></arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Set debugging on. <option>octal</option> is formed by
+           bitwise-orring desired values together from the list below (note
+           that these values may change in future releases). The
+           <option>-Dh</option> or <option>--debug=help</option> options
+           display these debugging values.
+         </para>
+
+         <table>
+           <title>Debug flags</title>
+           <tgroup cols=2>
+             <thead>
+               <row>
+                 <entry>number</entry>
+                 <entry>description</entry>
+               </row>
+             </thead>
+
+             <tbody>
+               <row>
+                 <entry>1</entry>
+                 <entry>Generally helpful progress information</entry>
+               </row>
+               <row>
+                 <entry>2</entry>
+                 <entry>Invocation and status of maintainer scripts</entry>
+               </row>
+               <row>
+                 <entry>10</entry>
+                 <entry>Output for each file processed</entry>
+               </row>
+               <row>
+                 <entry>100</entry>
+                 <entry>Lots of output for each file processed</entry>
+               </row>
+               <row>
+                 <entry>20</entry>
+                 <entry>Output for each configuration file</entry>
+               </row>
+               <row>
+                 <entry>200</entry>
+                 <entry>Lots of output for each configuration file</entry>
+               </row>
+               <row>
+                 <entry>40</entry>
+                 <entry>Dependencies and conflicts</entry>
+               </row>
+               <row>
+                 <entry>400</entry>
+                 <entry>Lots of dependencies/conflicts output</entry>
+               </row>
+               <row>
+                 <entry>1000</entry>
+                 <entry>Lots of drivel about e.g. the dpkg/info dir</entry>
+               </row>
+               <row>
+                 <entry>2000</entry>
+                 <entry>Insane amounts of drivel</entry>
+               </row>
+             </tbody>
+           </tgroup>
+         </table>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">--force-<replaceable>things</replaceable></arg>
+             <arg choice="plain">--no-force-<replaceable>things</replaceable></arg>
+             <arg choice='plain'>--refuse-<replaceable>things</replaceable></arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Force or refuse (<option>no-force</option> and
+           <option>refuse</option> mean the same thing) to do
+           some things. <option>things</option> is a comma separated list
+           of things specified below. <option>--force-help</option>
+           displays a message describing them. Things marked with
+           <screen>(*)</screen> are forced by default.
+         </para>
+
+         <note>
+           <para>
+             <emphasis>Warning: These options are mostly intended to be used
+             by experts only. Using them without fully understanding their
+             effects may break your whole system.</emphasis>
+           </para>
+         </note>
+
+         <variablelist>
+           <varlistentry>
+             <term>all</term>
+
+             <listitem><para>
+               Turns on(or off) all force options.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>auto-select (*)</term>
+
+             <listitem><para>
+               Select packages to install them, and deselect packages to
+               remove them.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>downgrade (*)</term>
+
+             <listitem><para>
+               Install a package, even if newer version of it is already
+               installed.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>configure-any</term>
+
+             <listitem><para>
+               Configure also any unpacked but unconfigured packages on
+               which the current package depends.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>hold</term>
+
+             <listitem><para>
+               Process packages even when marked "hold".
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>remove-reinstreq</term>
+
+             <listitem><para>
+               Remove a package, even if it's broken and marked to require
+               reinstallation.  This may, for example, cause parts of the
+               package to remain on the system, which will then be forgotten
+               by <command>dpkg</command>.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>remove-essential</term>
+
+             <listitem><para>
+               Remove, even if the package is considered essential.
+               Essential packages contain mostly very basic Unix commands.
+               Removing them might cause the whole system to stop working,
+               so use with caution.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>depends</term>
+
+             <listitem><para>
+               Turn all dependency problems into warnings.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>depends-version</term>
+
+             <listitem><para>
+               Don't care about versions when checking dependencies.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>conflicts</term>
+
+             <listitem><para>
+               Install, even if it conflicts with another package. This is
+               dangerous, for it will usually cause overwriting of some
+               files.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>confnew</term>
+
+             <listitem><para>
+               If a conffile has been modified always install the new
+               version without prompting.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>confold</term>
+
+             <listitem><para>
+               If a conffile has been modified always keep the old version
+               without prompting.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>confdef</term>
+
+             <listitem><para>
+               If a conffile has been modified always choose the default
+               action. If there is no default action it will stop to ask the
+               user unless <option>--force-confnew</option> or
+               <option>--force-confold</option> is also been given, in which
+               case it will use that to decide the final action.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>overwrite</term>
+
+             <listitem><para>
+               Overwrite one package's file with another's file.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>overwrite-dir</term>
+
+             <listitem><para>
+               Overwrite one package's directory with another's file.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>overwrite-diverted</term>
+
+             <listitem><para>
+               Overwrite a diverted file with an undiverted version.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>architecture</term>
+
+             <listitem><para>
+               Process even packages with the wrong architecture.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>bad-path</term>
+
+             <listitem><para>
+               <screen>PATH</screen> is missing important programs, so
+               problems are likely.
+             </para></listitem>
+           </varlistentry>
+
+           <varlistentry>
+             <term>not-root</term>
+
+             <listitem><para>
+               Try to (de)install things even when not root.
+             </para></listitem>
+           </varlistentry>
+         </variablelist>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice="plain" rep="repeat">--ignore-depends=<replaceable>package,</replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Ignore dependency-checking for specified packages (actually,
+         checking is performed, but only warnings about conflicts are given,
+         nothing else).
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">--new</arg>
+             <arg choice="plain">--old </arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Select new or old binary package format. This is a
+         <citerefentry><refentrytitle>dpkg-deb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+         option.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice="plain">--nocheck</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Don't read or check contents of <filename>control</filename> file
+         while building a package. This is a
+         <citerefentry><refentrytitle>dpkg-deb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+         option.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice='plain'>--no-act</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem>
+         <para>
+           Do everything which is supposed to be done, but don't write any
+           changes. This is used to see what would happen with the specified
+           action, without actually modifying anything.
+         </para>
+
+         <para>
+           Be sure to give <option>--no-act</option> before the
+           action-parameter, or you might end up with undesirable results.
+           (e.g.  <screen>dpkg --purge foo --no-act</screen> will first
+           purge package foo and then try to <command>purge</command>
+           package --no-act, even though you probably expected it to
+           actually do nothing)
+         </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">-R</arg>
+             <arg choice="plain">--recursive</arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Recursively handle all regular files matching pattern
+         <filename>*.deb</filename> found at specified directories and all
+         of its subdirectories. This can be used with <option>-i</option>,
+         <option>-A</option>, <option>--install</option>,
+         <option>--unpack</option> and <option>--avail</option>
+         actions.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice="plain">-G</arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Do not install a package if a newer version of the same package is
+         already installed. This is an alias of
+         <option>--refuse-downgrade</option>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">--root=<replaceable>dir</replaceable></arg>
+             <arg choice="plain">--admindir=<replaceable>dir</replaceable></arg>
+             <arg choice="plain">--instdir=<replaceable>dir</replaceable></arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Change default directories. <option>admindir</option> defaults to
+         <filename>/var/lib/dpkg</filename> and contains many files that
+         give information about status of installed or uninstalled packages,
+         etc.  <option>instdir</option> defaults to <filename>/</filename>
+         and refers to the directory where packages are to be installed.
+         <option>instdir</option> is also the directory passed to
+         <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+         before running package's installation scripts, which means that the
+         scripts see <option>instdir</option> as a root directory.
+         Changing <option>root</option> changes <option>instdir</option> to
+         <option>dir</option> and <option>admindir</option> to
+         <option>dir</option><filename>/var/lib/dpkg</filename>.
+       </para> </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">-O</arg>
+             <arg choice="plain">--selected-only</arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Only process the packages that are selected for installation. The
+         actual marking is done with <command>dselect</command> or by
+         <command>dpkg</command>, when it handles packages.  For example,
+         when a package is removed, it will be marked selected for
+         installation.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <group choice="plain">
+             <arg choice="plain">-E</arg>
+             <arg choice="plain">--skip-same-version</arg>
+           </group>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Do not install the package if the same version of the package is
+         already installed.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
+         <cmdsynopsis>
+           <arg choice="plain">--status-fd <replaceable>&lt;n&gt;</replaceable></arg>
+         </cmdsynopsis>
+       </term>
+
+       <listitem><para>
+         Send package status info to file descriptor
+         <option>&lt;n&gt;</option>. This can be given multiple times.
+         Status updates are of the form 
+         <screen>`status: &lt;pkg&gt;: &lt;pkg qstate&gt;'</screen>
+       </para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id='files'>
+    <title>Files</title>
+
+    <variablelist>
+      <varlistentry>
+       <term><filename>/etc/dpkg/dpkg.cfg</filename></term>
+
+       <listitem><para>
+         Configuration file with default options.
+       </para></listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>
+      There files are stored in the <command>dpkg</command> database directory
+      (which defaults to <filename>/var/lib/dpkg</filename>). You can
+      override the location with the <option>--admindir</option> option.
+    </para>
+
+    <variablelist>
+      <varlistentry>
+       <term><filename>/var/lib/dpkg/available</filename></term>
+
+       <listitem><para>
+         List of available packages.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><filename>/var/lib/dpkg/status</filename></term>
+
+       <listitem><para>
+         Statuses of available packages. This file contains information about
+         whether a package is marked for removing or not, whether it is
+         installed or not, etc.
+       </para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Environment variables</title>
+
+    <variablelist>
+      <varlistentry>
+        <term>DPKG_NO_TSTP</term>
+
+       <listitem><para>
+         Define this to something if you prefer <command>dpkg</command>
+         starting a new shell rather than suspending itself, while doing a
+         shell escape.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>SHELL</term>
+
+       <listitem><para>
+         The program <command>dpkg</command> will execute while starting a new
+         shell.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>COLUMNS</term>
+
+       <listitem><para>
+         Sets the number of columns <command>dpkg</command> should use when
+         displaying formatted text.  Currently only used by
+         <option>-l</option>.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>DPKG_OLD_CONFFILE</term>
+
+       <listitem><para>
+         Set by <command>dpkg</command> to the filename of the old
+         configuration file when you start a shell to examine a changed
+         configuration file.
+       </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>DPKG_NEW_CONFFILE</term>
+
+       <listitem><para>
+         Set by <command>dpkg</command> to the filename of the newversion of a
+         configuration file when you start a shell to examine a changed
+         configuration file.
+       </para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id='examples'>
+    <title>Examples</title>
+
+    <para>
+      To list packages related to the editor vi:
+
+      <Screen><command>dpkg</command> <option>-l</option> '*vi*'</Screen>
+    </para>
+
+    <para>
+      To see the entries in <filename>/var/lib/dpkg/available</filename> on two
+      packages
+
+      <Screen><command>dpkg</command> <option>--print-avail</option> elvis vim</Screen>
+    </para>
+
+    <para>
+      To search the listing of packages yourself:
+
+      <Screen><command>less</command> <filename>/var/lib/dpkg/available</filename></Screen>
+    </para>
+
+    <para>
+      To remove an installed emacs package:
+
+      <Screen><command>dpkg</command> <option>-r</option> emacs</Screen>
+    </para>
+
+    <para>
+      To make a local copy of the package selection states:
+
+      <Screen><command>dpkg</command> <option>--get-selections</option> &gt; <filename>myselections</filename></Screen>
+    </para>
+
+    <para>
+      You might transfer this file to another computer, and install it there
+      with:
+
+      <Screen><command>dpkg</command> <option>--set-selections</option> &lt; <filename>myselections</filename></Screen>
+
+      Note that this will not actually install or remove anything, but just
+      set the selection state on the requested packages.  You will need some
+      other application to actually download and install the requested
+      packages.
+    </para>
+
+    <para>
+      Ordinarily, you will find that
+      <citerefentry><refentrytitle>dselect</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      provides a more convenient way to modify the package selection
+      states.
+    </para>
+  </refsect1>
+
+  <refsect1 id='seeAlso'>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry>
+        <refentrytitle>dselect</refentrytitle>
+       <manvolnum>8</manvolnum>
+      </citerefentry>,
+
+      <citerefentry>
+        <refentrytitle>dpkg-deb</refentrytitle>
+       <manvolnum>1</manvolnum>
+      </citerefentry>,
+
+      <citerefentry>
+       <refentrytitle>deb</refentrytitle>
+       <manvolnum>5</manvolnum>
+      </citerefentry>,
+
+      <citerefentry>
+       <refentrytitle>deb-control</refentrytitle>
+       <manvolnum>5</manvolnum>
+      </citerefentry>
+    </para>
+  </refsect1>
+</refentry>
+