]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - policy.sgml
Merge branch 'master' into bug504880-rra
[debian/debian-policy.git] / policy.sgml
index 7c223101cea76fa78dffb94849d33ca15993f9f7..2f4c935114069618e46cfe099d534486ca64d611 100644 (file)
@@ -2,6 +2,8 @@
 <!-- include version information so we don't have to hard code it
      within the document -->
 <!entity % versiondata SYSTEM "version.ent"> %versiondata;
+<!-- current Debian changes file format -->
+<!entity changesversion "1.8">
 ]>
 <debiandoc>
 
              <item>
                  must not require a package outside of <em>main</em>
                  for compilation or execution (thus, the package must
-                 not declare a "Depends", "Recommends", or
-                 "Build-Depends" relationship on a non-<em>main</em>
-                 package),
+                 not declare a <tt>Pre-Depends</tt>, <tt>Depends</tt>,
+                 <tt>Recommends</tt>, <tt>Build-Depends</tt>,
+                 or <tt>Build-Depends-Indep</tt> relationship on a
+                 non-<em>main</em> package unless a package
+                 in <em>main</em> is listed as an alternative),
              </item>
              <item>
                  must not be so buggy that we refuse to support them,
        </p>
 
        <p>
-         Sometimes, a package requires another package to be installed
-         <em>and</em> configured before it can be installed. In this
+         Sometimes, a package requires another package to be unpacked
+         <em>and</em> configured before it can be unpacked. In this
          case, you must specify a <tt>Pre-Depends</tt> entry for
          the package.
        </p>
        </p>
 
        <p>
-         The <var>date</var> must be in RFC822 format<footnote>
-             This is generated by <tt>date -R</tt>.
-         </footnote>; it must include the time zone specified
-         numerically, with the time zone name or abbreviation
-         optionally present as a comment in parentheses.
+         The <var>date</var> has the following format<footnote>
+             This is the same as the format generated by <tt>date
+             -R</tt>.
+         </footnote> (compatible and with the same semantics of
+         RFC 2822 and RFC 5322):
+         <example>day-of-week, dd month yyyy hh:mm:ss +zzzz</example>
+         where:
+         <list compact="compact">
+           <item>
+             day-of week is one of: Mon, Tue, Wed, Thu, Fri, Sat, Sun
+           </item>
+           <item>
+             dd is a one- or two-digit day of the month (01-31)
+           </item>
+           <item>
+             month is one of: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
+             Sep, Oct, Nov, Dec
+           </item>
+           <item>yyyy is the four-digit year (e.g. 2010)</item>
+           <item>hh is the two-digit hour (00-23)</item>
+           <item>mm is the two-digit minutes (00-59)</item>
+           <item>ss is the two-digit seconds (00-60)</item>
+           <item>
+             +zzzz or -zzzz is the the time zone offset from Coordinated
+             Universal Time (UTC).  "+" indicates that the time is ahead
+             of (i.e., east of) UTC and "-" indicates that the time is
+             behind (i.e., west of) UTC.  The first two digits indicate
+             the hour difference from UTC and the last two digits
+             indicate the number of additional minutes difference from
+             UTC.  The last two digits must be in the range 00-59.
+           </item>
+         </list>
        </p>
 
        <p>
                The <tt>build</tt> target should perform all the
                configuration and compilation of the package.
                If a package has an interactive pre-build
-               configuration routine, the Debianized source package
+               configuration routine, the Debian source package
                must either be built after this has taken place (so
                that the binary package can be built without rerunning
                the configuration) or the configuration routine
                A package may also provide both of the targets
                <tt>build-arch</tt> and <tt>build-indep</tt>.
                The <tt>build-arch</tt> target, if provided, should
-               perform all the configuration and compilation required
-               for producing all architecture-dependant binary packages
-               (those packages for which the body of the
-               <tt>Architecture</tt> field in <tt>debian/control</tt>
-               is not <tt>all</tt>).
-               Similarly, the <tt>build-indep</tt> target, if
-               provided, should perform all the configuration and
-               compilation required for producing all
-               architecture-independent binary packages
+               perform all the configuration and compilation required for
+               producing all architecture-dependant binary packages
                (those packages for which the body of the
-               <tt>Architecture</tt> field in <tt>debian/control</tt>
-               is <tt>all</tt>).
+               <tt>Architecture</tt> field in <tt>debian/control</tt> is
+               not <tt>all</tt>).  Similarly, the <tt>build-indep</tt>
+               target, if provided, should perform all the configuration
+               and compilation required for producing all
+               architecture-independent binary packages (those packages
+               for which the body of the <tt>Architecture</tt> field
+               in <tt>debian/control</tt> is <tt>all</tt>).
                The <tt>build</tt> target should depend on those of the
                targets <tt>build-arch</tt> and <tt>build-indep</tt> that
-               are provided in the rules file.
+               are provided in the rules file.<footnote>
+                 The intent of this split is so that binary-only builds
+                 need not install the dependencies required for
+                 the <tt>build-indep</tt> target.  However, this is not
+                 yet used in practice since <tt>dpkg-buildpackage
+                 -B</tt>, and therefore the autobuilders,
+                 invoke <tt>build</tt> rather than <tt>build-arch</tt>
+                 due to the difficulties in determining whether the
+                 optional <tt>build-arch</tt> target exists.
+               </footnote>
              </p>
 
              <p>
@@ -2370,6 +2408,11 @@ Package: libc6
          <tt>libc6</tt>.
        </p>
 
+       <p>
+         A paragraph must not contain more than one instance of a
+         particular field name.
+       </p>
+
        <p>
          Many fields' values may span several lines; in this case
          each continuation line must start with a space or a tab.
@@ -2454,13 +2497,11 @@ Package: libc6
          The syntax and semantics of the fields are described below.
        </p>
 
-<!-- stuff -->
-
        <p>
          These fields are used by <prgn>dpkg-gencontrol</prgn> to
          generate control files for binary packages (see below), by
          <prgn>dpkg-genchanges</prgn> to generate the
-         <tt>.changes</tt> file to accompany the upload, and by
+         <file>.changes</file> file to accompany the upload, and by
          <prgn>dpkg-source</prgn> when it creates the
          <file>.dsc</file> source control file as part of a source
          archive. Many fields are permitted to span multiple lines in
@@ -2494,7 +2535,8 @@ Package: libc6
 
        <p>
          The <file>DEBIAN/control</file> file contains the most vital
-         (and version-dependent) information about a binary package.
+         (and version-dependent) information about a binary package.  It
+         consists of a single paragraph.
        </p>
 
        <p>
@@ -2521,23 +2563,24 @@ Package: libc6
        <heading>Debian source control files -- <tt>.dsc</tt></heading>
 
        <p>
-         This file contains a series of fields, identified and
-         separated just like the fields in the control file of
-         a binary package.  The fields are listed below; their
-         syntax is described above, in <ref id="pkg-controlfields">.
+         This file consists of a single paragraph, possibly surrounded by
+         a PGP signature. The fields of that paragraph are listed below.
+         Their syntax is described above, in <ref id="pkg-controlfields">.
 
        <list compact="compact">
          <item><qref id="f-Format"><tt>Format</tt></qref> (mandatory)</item>
          <item><qref id="f-Source"><tt>Source</tt></qref> (mandatory)</item>
+         <item><qref id="f-Binary"><tt>Binary</tt></qref></item>
+         <item><qref id="f-Architecture"><tt>Architecture</tt></qref></item>
          <item><qref id="f-Version"><tt>Version</tt></qref> (mandatory)</item>
          <item><qref id="f-Maintainer"><tt>Maintainer</tt></qref> (mandatory)</item>
          <item><qref id="f-Uploaders"><tt>Uploaders</tt></qref></item>
-         <item><qref id="f-Binary"><tt>Binary</tt></qref></item>
-         <item><qref id="f-Architecture"><tt>Architecture</tt></qref></item>
-          <item><qref id="sourcebinarydeps"><tt>Build-Depends</tt> et al</qref></item>
+         <item><qref id="f-Homepage"><tt>Homepage</tt></qref></item>
          <item><qref id="f-Standards-Version"><tt>Standards-Version</tt></qref> (recommended)</item>
+         <item><qref id="sourcebinarydeps"><tt>Build-Depends</tt> et al</qref></item>
+         <item><qref id="f-Checksums"><tt>Checksums-Sha1</tt>
+             and <tt>Checksums-Sha256</tt></qref> (recommended)</item>
          <item><qref id="f-Files"><tt>Files</tt></qref> (mandatory)</item>
-         <item><qref id="f-Homepage"><tt>Homepage</tt></qref></item>
        </list>
        </p>
 
@@ -2556,12 +2599,19 @@ Package: libc6
        <heading>Debian changes files -- <file>.changes</file></heading>
 
        <p>
-         The .changes files are used by the Debian archive maintenance
-         software to process updates to packages. They contain one
-         paragraph which contains information from the
-         <tt>debian/control</tt> file and other data about the
-         source package gathered via <tt>debian/changelog</tt>
-         and <tt>debian/rules</tt>.
+         The <file>.changes</file> files are used by the Debian archive
+         maintenance software to process updates to packages. They
+         consist of a single paragraph, possibly surrounded by a PGP
+         signature. That paragraph contains information from the
+         <file>debian/control</file> file and other data about the
+         source package gathered via <file>debian/changelog</file>
+         and <file>debian/rules</file>.
+       </p>
+
+       <p>
+         <file>.changes</file> files have a format version that is
+         incremented whenever the documented fields or their meaning
+         change.  This document describes format &changesversion;.
        </p>
 
        <p>
@@ -2581,6 +2631,8 @@ Package: libc6
            <item><qref id="f-Description"><tt>Description</tt></qref> (mandatory)</item>
            <item><qref id="f-Closes"><tt>Closes</tt></qref></item>
            <item><qref id="f-Changes"><tt>Changes</tt></qref> (mandatory)</item>
+           <item><qref id="f-Checksums"><tt>Checksums-Sha1</tt>
+               and <tt>Checksums-Sha256</tt></qref> (recommended)</item>
            <item><qref id="f-Files"><tt>Files</tt></qref> (mandatory)</item>
          </list>
        </p>
@@ -2631,8 +2683,8 @@ Package: libc6
 
          <p>
            The package maintainer's name and email address.  The name
-           should come first, then the email address inside angle
-           brackets <tt>&lt;&gt</tt> (in RFC822 format).
+           must come first, then the email address inside angle
+           brackets <tt>&lt;&gt;</tt> (in RFC822 format).
          </p>
 
          <p>
@@ -2649,17 +2701,17 @@ Package: libc6
        <sect1 id="f-Uploaders">
           <heading><tt>Uploaders</tt></heading>
 
-          <p>
-            List of the names and email addresses of co-maintainers of
-            the package, if any. If the package has other maintainers
-            beside the one named in the 
-            <qref id="f-Maintainer">Maintainer field</qref>, their
-            names and email addresses should be listed here. The
-            format is the same as that of the Maintainer tag, and
-            multiple entries should be comma separated. Currently,
-            this field is restricted to a single line of data.  This
-            is an optional field.
-          </p>
+         <p>
+           List of the names and email addresses of co-maintainers of
+           the package, if any. If the package has other maintainers
+           beside the one named in the
+           <qref id="f-Maintainer">Maintainer field</qref>, their names
+           and email addresses should be listed here. The format of each
+           entry is the same as that of the Maintainer field, and
+           multiple entries must be comma separated.  This is an optional
+           field.
+         </p>
+
          <p>
            Any parser that interprets the Uploaders field in
            <file>debian/control</file> must permit it to span multiple
@@ -2673,9 +2725,10 @@ Package: libc6
          <heading><tt>Changed-By</tt></heading>
 
          <p>
-           The name and email address of the person who changed the
-           said package. Usually the name of the maintainer.
-           All the rules for the Maintainer field apply here, too.
+           The name and email address of the person who prepared this
+           version of the package, usually a maintainer.  The syntax is
+           the same as for the <qref id="f-Maintainer">Maintainer
+           field</qref>.
          </p>
        </sect1>
 
@@ -2985,9 +3038,10 @@ Package: libc6
                  It is optional; if it isn't present then the
                  <var>upstream_version</var> may not contain a hyphen.
                  This format represents the case where a piece of
-                 software was written specifically to be turned into a
-                 Debian package, and so there is only one "debianisation"
-                 of it and therefore no revision indication is required.
+                 software was written specifically to be a Debian
+                 package, where the Debian package source must always
+                 be identical to the pristine source and therefore no
+                 revision indication is required.
                </p>
 
                <p>
@@ -3200,7 +3254,9 @@ Package: libc6
          <heading><tt>Date</tt></heading>
 
          <p>
-           This field includes the date the package was built or last edited.
+           This field includes the date the package was built or last
+           edited.  It must be in the same format as the <var>date</var>
+           in a <file>debian/changelog</file> entry.
          </p>
 
          <p>
@@ -3214,12 +3270,30 @@ Package: libc6
          <heading><tt>Format</tt></heading>
 
          <p>
-           This field specifies a format revision for the file.
-           The most current format described in the Policy Manual
-           is version <strong>1.5</strong>.  The syntax of the
-           format value is the same as that of a package version
-           number except that no epoch or Debian revision is allowed
-           - see <ref id="f-Version">.
+           In <qref id="debianchangesfiles"><file>.changes</file></qref>
+           files, this field declares the format version of that file.
+           The syntax of the field value is the same as that of
+           a <qref id="f-Version">package version number</qref> except
+           that no epoch or Debian revision is allowed.  The format
+           described in this document is <tt>&changesversion;</tt>.
+         </p>
+
+         <p>
+           In <qref id="debiansourcecontrolfiles"><file>.dsc</file>
+           Debian source control</qref> files, this field declares the
+           format of the source package.  The field value is used by
+           programs acting on a source package to interpret the list of
+           files in the source package and determine how to unpack it.
+           The syntax of the field value is a numeric major revision, a
+           period, a numeric minor revision, and then an optional subtype
+           after whitespace, which if specified is an alphanumeric word
+           in parentheses.  The subtype is optional in the syntax but may
+           be mandatory for particular source format revisions.
+           <footnote>
+             The source formats currently supported by the Debian archive
+             software are <tt>1.0</tt>, <tt>3.0 (native)</tt>,
+             and <tt>3.0 (quilt)</tt>.
+           </footnote>
          </p>
        </sect1>
 
@@ -3436,6 +3510,50 @@ Files:
          </p>
        </sect1>
 
+       <sect1 id="f-Checksums">
+         <heading><tt>Checksums-Sha1</tt>
+           and <tt>Checksums-Sha256</tt></heading>
+
+         <p>
+           These fields contain a list of files with a checksum and size
+           for each one.  Both <tt>Checksums-Sha1</tt>
+           and <tt>Checksums-Sha256</tt> have the same syntax and differ
+           only in the checksum algorithm used: SHA-1
+           for <tt>Checksums-Sha1</tt> and SHA-256
+           for <tt>Checksums-Sha256</tt>.
+         </p>
+
+         <p>
+           <tt>Checksums-Sha1</tt> and <tt>Checksums-Sha256</tt> are
+           multiline fields.  The first line of the field value (the part
+           on the same line as <tt>Checksums-Sha1:</tt>
+           or <tt>Checksums-Sha256:</tt>) is always empty.  The content
+           of the field is expressed as continuation lines, one line per
+           file.  Each line consists of the checksum, a space, the file
+           size, a space, and the file name.  For example (from
+           a <file>.changes</file> file):
+           <example>
+Checksums-Sha1:
+ 1f418afaa01464e63cc1ee8a66a05f0848bd155c 1276 example_1.0-1.dsc
+ a0ed1456fad61116f868b1855530dbe948e20f06 171602 example_1.0.orig.tar.gz
+ 5e86ecf0671e113b63388dac81dd8d00e00ef298 6137 example_1.0-1.debian.tar.gz
+ 71a0ff7da0faaf608481195f9cf30974b142c183 548402 example_1.0-1_i386.deb
+Checksums-Sha256:
+ ac9d57254f7e835bed299926fd51bf6f534597cc3fcc52db01c4bffedae81272 1276 example_1.0-1.dsc
+ 0d123be7f51e61c4bf15e5c492b484054be7e90f3081608a5517007bfb1fd128 171602 example_1.0.orig.tar.gz
+ f54ae966a5f580571ae7d9ef5e1df0bd42d63e27cb505b27957351a495bc6288 6137 example_1.0-1.debian.tar.gz
+ 3bec05c03974fdecd11d020fc2e8250de8404867a8a2ce865160c250eb723664 548402 example_1.0-1_i386.deb
+           </example>
+         </p>
+
+         <p>
+           In the <file>.dsc</file> file, these fields should list all
+           files that make up the source package.  In
+           the <file>.changes</file> file, these fields should list all
+           files being uploaded.  The list of files in these fields
+           must match the list of files in the <tt>Files</tt> field.
+         </p>
+       </sect1>
       </sect>
 
       <sect>
@@ -3535,7 +3653,7 @@ Files:
 
        <p>
          Broadly speaking the <prgn>preinst</prgn> is called before
-         (a particular version of) a package is installed, and the
+         (a particular version of) a package is unpacked, and the
          <prgn>postinst</prgn> afterwards; the <prgn>prerm</prgn>
          before (a version of) a package is removed and the
          <prgn>postrm</prgn> afterwards.
@@ -3925,7 +4043,7 @@ Files:
                behavior which, though deterministic, is hard for the
                system administrator to understand.  It can easily
                lead to "missing" programs if, for example, a package
-               is installed which overwrites a file from another
+               is unpacked which overwrites a file from another
                package, and is then removed again.<footnote>
                    Part of the problem is due to what is arguably a
                    bug in <prgn>dpkg</prgn>.
@@ -4061,7 +4179,7 @@ Files:
                If there was a conflicting package we go and do the
                removal actions (described below), starting with the
                removal of the conflicting package's files (any that
-               are also in the package being installed have already
+               are also in the package being unpacked have already
                been removed from the conflicting package's file list,
                and so do not get removed now).
            </item>
@@ -4375,31 +4493,30 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
        </p>
 
        <p>
-         For this reason packages in an installation run are usually
-         all unpacked first and all configured later; this gives
-         later versions of packages with dependencies on later
-         versions of other packages the opportunity to have their
-         dependencies satisfied.
+         Since <tt>Depends</tt> only places requirements on the
+         configuration step, packages in an installation run are usually
+         all unpacked first and all configured later.  This makes it
+         easier to satisfy all dependencies when multiple packages are
+         being upgraded.
        </p>
 
-        <p>
-          In case of circular dependencies, since installation or
-          removal order honoring the dependency order can't be
-          established, dependency loops are broken at some point
-          (based on rules below), and some packages may not be able to
-          rely on their dependencies being present when being
-          installed or removed, depending on which side of the break
-          of the circular dependency loop they happen to be on.  If one
-          of the packages in the loop has no postinst script, then the
-          cycle will be broken at that package, so as to ensure that
-          all postinst scripts run with the dependencies properly
-          configured if this is possible. Otherwise the breaking point
-          is arbitrary.
-        </p>
-
        <p>
-         The <tt>Depends</tt> field thus allows package maintainers
-         to impose an order in which packages should be configured.
+         If there is a circular dependency among packages being installed
+         or removed, installation or removal order honoring the
+         dependency order is impossible, requiring the dependency loop be
+         broken at some point and the dependency requirements violated
+         for at least one package.  Packages involved in circular
+         dependencies may not be able to rely on their dependencies being
+         configured when being configured or removed depending on which
+         side of the break of the circular dependency loop they happen to
+         be on.  If one of the packages in the loop has no
+         <prgn>postinst</prgn> script, then the cycle will be broken at
+         that package; this ensures that all <prgn>postinst</prgn>
+         scripts are run with their dependencies properly configured if
+         this is possible.  Otherwise the breaking point is arbitrary.
+         Packages should therefore avoid circular dependencies where
+         possible, particularly if they have <prgn>postinst</prgn>
+         scripts.
        </p>
 
        <p>
@@ -4411,7 +4528,8 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
                This declares an absolute dependency.  A package will
                not be configured unless all of the packages listed in
                its <tt>Depends</tt> field have been correctly
-               configured.
+               configured (unless there is a circular dependency as
+               described above).
              </p>
 
              <p>
@@ -4425,10 +4543,17 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
                The <tt>Depends</tt> field should also be used if the
                <prgn>postinst</prgn>, <prgn>prerm</prgn> or
                <prgn>postrm</prgn> scripts require the package to be
-               present in order to run.  Note, however, that the
-               <prgn>postrm</prgn> cannot rely on any non-essential
-               packages to be present during the <tt>purge</tt>
-               phase.
+               present in order to run.  (If both packages are involved
+               in a dependency loop, this might not work as expected; see
+               the explanation a few paragraphs back.)  In the case of
+               <prgn>postinst</prgn> and <prgn>postrm</prgn>, the
+               depended-on packages will be unpacked and configured
+               first.  (Note, however, that the <prgn>postrm</prgn>
+               cannot rely on any non-essential packages to be present
+               during the <tt>purge</tt> phase.)  In the case of
+               <prgn>prerm</prgn>, the depended-on package will at least
+               be unpacked (it might be configured too, but you can't
+               rely on this unless you use <tt>Pre-Depends</tt>).
            </item>
 
            <tag><tt>Recommends</tt></tag>
@@ -4491,7 +4616,17 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
                to be <em>configured</em>, the pre-dependency will be
                treated as a normal <tt>Depends</tt>, that is, it will
                be considered satisfied only if the depended-on
-               package has been correctly configured.
+               package has been correctly configured.  However, unlike
+               with <tt>Depends</tt>, <tt>Pre-Depends</tt> does not
+               permit circular dependencies to be broken.  If a circular
+               dependency is encountered while attempting to honor
+               <tt>Pre-Depends</tt>, the installation will be aborted.
+             </p>
+
+             <p>
+               <tt>Pre-Depends</tt> are also required if the
+               <prgn>preinst</prgn> script depends on the named package.
+               It is best to avoid this situation if possible.
              </p>
 
              <p>
@@ -4500,13 +4635,6 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
                installation would hamper the ability of the system to
                continue with any upgrade that might be in progress.
              </p>
-
-             <p>
-               <tt>Pre-Depends</tt> are also required if the
-               <prgn>preinst</prgn> script depends on the named
-               package.  It is best to avoid this situation if
-               possible.
-             </p>
            </item>
          </taglist>
        </p>
@@ -4531,7 +4659,7 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
        <p>
          When one binary package declares that it breaks another,
          <prgn>dpkg</prgn> will refuse to allow the package which
-         declares <tt>Breaks</tt> be installed unless the broken
+         declares <tt>Breaks</tt> be unpacked unless the broken
          package is deconfigured first, and it will refuse to
          allow the broken package to be reconfigured.
        </p>
@@ -4552,17 +4680,29 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
        <p>
          Normally a <tt>Breaks</tt> entry will have an "earlier than"
          version clause; such a <tt>Breaks</tt> is introduced in the
-         version of an (implicit or explicit) dependency which
-         violates an assumption or reveals a bug in earlier versions
-         of the broken package.  This use of <tt>Breaks</tt> will
-         inform higher-level package management tools that broken
-         package must be upgraded before the new one.
+         version of an (implicit or explicit) dependency which violates
+         an assumption or reveals a bug in earlier versions of the broken
+         package, or which takes over a file from earlier versions of the
+         package named in <tt>Breaks</tt>.  This use of <tt>Breaks</tt>
+         will inform higher-level package management tools that the
+         broken package must be upgraded before the new one.
        </p>
 
        <p>
          If the breaking package also overwrites some files from the
-         older package, it should use <tt>Replaces</tt> (not
-         <tt>Conflicts</tt>) to ensure this goes smoothly.
+         older package, it should use <tt>Replaces</tt> to ensure this
+         goes smoothly.  See <ref id="replaces"> for a full discussion
+         of taking over files from other packages, including how to
+         use <tt>Breaks</tt> in those cases.
+       </p>
+
+       <p>
+         Many of the cases where <tt>Breaks</tt> should be used were
+         previously handled with <tt>Conflicts</tt>
+         because <tt>Breaks</tt> did not yet exist.
+         Many <tt>Conflicts</tt> fields should now be <tt>Breaks</tt>.
+         See <ref id="conflicts"> for more information about the
+         differences.
        </p>
       </sect>
 
@@ -4572,22 +4712,25 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
        <p>
           When one binary package declares a conflict with another
          using a <tt>Conflicts</tt> field, <prgn>dpkg</prgn> will
-         refuse to allow them to be installed on the system at the
-         same time.
+         refuse to allow them to be unpacked on the system at the
+         same time.  This is a stronger restriction than <tt>Breaks</tt>,
+         which just prevents both packages from being configured at the
+         same time.  Conflicting packages cannot be unpacked on the
+         system at the same time.
        </p>
 
        <p>
-         If one package is to be installed, the other must be removed
-         first - if the package being installed is marked as
-         replacing (see <ref id="replaces">) the one on the system,
-         or the one on the system is marked as deselected, or both
-         packages are marked <tt>Essential</tt>, then
-         <prgn>dpkg</prgn> will automatically remove the package
-         which is causing the conflict, otherwise it will halt the
-         installation of the new package with an error.  This
-         mechanism is specifically designed to produce an error when
-         the installed package is <tt>Essential</tt>, but the new
-         package is not.
+         If one package is to be unpacked, the other must be removed
+         first.  If the package being unpacked is marked as replacing
+         (see <ref id="replaces">, but note that <tt>Breaks</tt> should
+         normally be used in this case) the one on the system, or the one
+         on the system is marked as deselected, or both packages are
+         marked <tt>Essential</tt>, then <prgn>dpkg</prgn> will
+         automatically remove the package which is causing the conflict.
+         Otherwise, it will halt the installation of the new package with
+         an error.  This mechanism is specifically designed to produce an
+         error when the installed package is <tt>Essential</tt>, but the
+         new package is not.
        </p>
 
        <p>
@@ -4607,12 +4750,52 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
        </p>
 
        <p>
-         A <tt>Conflicts</tt> entry should almost never have an
-         "earlier than" version clause.  This would prevent
-         <prgn>dpkg</prgn> from upgrading or installing the package
-         which declared such a conflict until the upgrade or removal
-         of the conflicted-with package had been completed.  Instead,
-         <tt>Breaks</tt> may be used.
+         Normally, <tt>Breaks</tt> should be used instead
+         of <tt>Conflicts</tt> since <tt>Conflicts</tt> imposes a
+         stronger restriction on the ordering of package installation or
+         upgrade and can make it more difficult for the package manager
+         to find a correct solution to an upgrade or installation
+         problem.  <tt>Breaks</tt> should be used
+         <list>
+           <item>when moving a file from one package to another (see
+             <ref id="replaces">),</item>
+           <item>when splitting a package (a special case of the previous
+             one), or</item>
+           <item>when the breaking package exposes a bug in or interacts
+             badly with particular versions of the broken
+             package.</item>
+         </list>
+         <tt>Conflicts</tt> should be used
+         <list>
+           <item>when two packages provide the same file and will
+             continue to do so,</item>
+           <item>in conjunction with <tt>Provides</tt> when only one
+             package providing a given virtual facility may be installed
+             at a time (see <ref id="virtual">),</item>
+           <item>in other cases where one must prevent simultaneous
+             installation of two packages for reasons that are ongoing
+             (not fixed in a later version of one of the packages) or
+             that must prevent both packages from being unpacked at the
+             same time, not just configured.</item>
+         </list>
+         Be aware that adding <tt>Conflicts</tt> is normally not the best
+         solution when two packages provide the same files.  Depending on
+         the reason for that conflict, using alternatives or renaming the
+         files is often a better approach.  See, for
+         example, <ref id="binaries">.
+       </p>
+
+       <p>
+         A <tt>Conflicts</tt> entry may have an "earlier than" version
+         clause if the reason for the conflict is corrected in a later
+         version of one of the packages.  However, normally the presence
+         of an "earlier than" version clause is a sign
+         that <tt>Breaks</tt> should have been used instead.  An "earlier
+         than" version clause in <tt>Conflicts</tt>
+         prevents <prgn>dpkg</prgn> from upgrading or installing the
+         package which declares such a conflict until the upgrade or
+         removal of the conflicted-with package has been completed, which
+         is a strong restriction.
        </p>
       </sect>
 
@@ -4659,35 +4842,45 @@ Provides: bar
        </p>
 
        <p>
-         If a relationship field has a version number attached
-         then only real packages will be considered to see whether
-         the relationship is satisfied (or the prohibition violated,
-         for a conflict or breakage) - it is assumed that a real
-         package which provides the virtual package is not of the
-         "right" version.  So, a <tt>Provides</tt> field may not
-         contain version numbers, and the version number of the
-         concrete package which provides a particular virtual package
-         will not be looked at when considering a dependency on or
-         conflict with the virtual package name.
+         If a relationship field has a version number attached, only real
+         packages will be considered to see whether the relationship is
+         satisfied (or the prohibition violated, for a conflict or
+         breakage).  In other words, if a version number is specified,
+         this is a request to ignore all <tt>Provides</tt> for that
+         package name and consider only real packages.  The package
+         manager will assume that a package providing that virtual
+         package is not of the "right" version.  A <tt>Provides</tt>
+         field may not contain version numbers, and the version number of
+         the concrete package which provides a particular virtual package
+         will not be considered when considering a dependency on or
+         conflict with the virtual package name.<footnote>
+           It is possible that a future release of <prgn>dpkg</prgn> may
+           add the ability to specify a version number for each virtual
+           package it provides.  This feature is not yet present,
+           however, and is expected to be used only infrequently.
+         </footnote>
        </p>
 
        <p>
-         It is likely that the ability will be added in a future
-         release of <prgn>dpkg</prgn> to specify a version number for
-         each virtual package it provides.  This feature is not yet
-         present, however, and is expected to be used only
-         infrequently.
+         To specify which of a set of real packages should be the default
+         to satisfy a particular dependency on a virtual package, list
+         the real package as an alternative before the virtual one.
        </p>
 
        <p>
-         If you want to specify which of a set of real packages
-         should be the default to satisfy a particular dependency on
-         a virtual package, you should list the real package as an
-         alternative before the virtual one.
+         If the virtual package represents a facility that can only be
+         provided by one real package at a time, such as
+         the <package>mail-transport-agent</package> virtual package that
+         requires installation of a binary that would conflict with all
+         other providers of that virtual package (see
+         <ref id="mail-transport-agents">), all packages providing that
+         virtual package should also declare a conflict with it
+         using <tt>Conflicts</tt>.  This will ensure that at most one
+         provider of that virtual package is unpacked or installed at a
+         time.
        </p>
       </sect>
 
-
       <sect id="replaces"><heading>Overwriting files and replacing
          packages - <tt>Replaces</tt></heading>
 
@@ -4701,17 +4894,51 @@ Provides: bar
        <sect1><heading>Overwriting files in other packages</heading>
 
          <p>
-           Firstly, as mentioned before, it is usually an error for a
-           package to contain files which are on the system in
-           another package.
+           It is usually an error for a package to contain files which
+           are on the system in another package.  However, if the
+           overwriting package declares that it <tt>Replaces</tt> the one
+           containing the file being overwritten, then <prgn>dpkg</prgn>
+           will replace the file from the old package with that from the
+           new.  The file will no longer be listed as "owned" by the old
+           package and will be taken over by the new package.
+           Normally, <tt>Breaks</tt> should be used in conjunction
+           with <tt>Replaces</tt>.<footnote>
+             To see why <tt>Breaks</tt> is normally needed in addition
+             to <tt>Replaces</tt>, consider the case of a file in the
+             package <package>foo</package> being taken over by the
+             package <package>foo-data</package>.
+             <tt>Replaces</tt> will allow <package>foo-data</package> to
+             be installed and take over that file.  However,
+             without <tt>Breaks</tt>, nothing
+             requires <package>foo</package> to be upgraded to a newer
+             version that knows it does not include that file and instead
+             depends on <package>foo-data</package>.  Nothing would
+             prevent the new <package>foo-data</package> package from
+             being installed and then removed, removing the file that it
+             took over from <package>foo</package>.  After that
+             operation, the package manager would think the system was in
+             a consistent state, but the <package>foo</package> package
+             would be missing one of its files.
+           </footnote>
          </p>
 
          <p>
-           However, if the overwriting package declares that it
-           <tt>Replaces</tt> the one containing the file being
-           overwritten, then <prgn>dpkg</prgn> will replace the file
-           from the old package with that from the new.  The file
-           will no longer be listed as "owned" by the old package.
+           For example, if a package <package>foo</package> is split
+           into <package>foo</package> and <package>foo-data</package>
+           starting at version 1.2-3, <package>foo-data</package> would
+           have the fields
+           <example compact="compact">
+Replaces: foo (&lt;&lt; 1.2-3)
+Breaks: foo (&lt;&lt; 1.2-3)
+           </example>
+           in its control file.  The new version of the
+           package <package>foo</package> would normally have the field
+           <example compact="compact">
+Depends: foo-data (&gt;= 1.2-3)
+           </example>
+           (or possibly <tt>Recommends</tt> or even <tt>Suggests</tt> if
+           the files moved into <package>foo-data</package> are not
+           required for normal operation).
          </p>
 
          <p>
@@ -4726,40 +4953,35 @@ Provides: bar
            special argument to allow the package to do any final
            cleanup required.  See <ref id="mscriptsinstact">.
            <footnote>
-             <p>
-               Replaces is a one way relationship -- you have to              
-               install the replacing package after the replaced
-               package.
-             </p>
+             Replaces is a one way relationship.  You have to install
+             the replacing package after the replaced package.
            </footnote>
          </p>
 
          <p>
            For this usage of <tt>Replaces</tt>, virtual packages (see
            <ref id="virtual">) are not considered when looking at a
-           <tt>Replaces</tt> field - the packages declared as being
+           <tt>Replaces</tt> field.  The packages declared as being
            replaced must be mentioned by their real names.
          </p>
 
          <p>
-           Furthermore, this usage of <tt>Replaces</tt> only takes
-           effect when both packages are at least partially on the
-           system at once, so that it can only happen if they do not
-           conflict or if the conflict has been overridden.
+           This usage of <tt>Replaces</tt> only takes effect when both
+           packages are at least partially on the system at once.  It is
+           not relevant if the packages conflict unless the conflict has
+           been overridden.
          </p>
-
        </sect1>
 
        <sect1><heading>Replacing whole packages, forcing their
            removal</heading>
 
          <p>
-           Secondly, <tt>Replaces</tt> allows the packaging system to
+           Second, <tt>Replaces</tt> allows the packaging system to
            resolve which package should be removed when there is a
-           conflict - see <ref id="conflicts">.  This usage only
-           takes effect when the two packages <em>do</em> conflict,
-           so that the two usages of this field do not interfere with
-           each other.
+           conflict (see <ref id="conflicts">).  This usage only takes
+           effect when the two packages <em>do</em> conflict, so that the
+           two usages of this field do not interfere with each other.
          </p>
 
          <p>
@@ -4772,8 +4994,9 @@ Provides: mail-transport-agent
 Conflicts: mail-transport-agent
 Replaces: mail-transport-agent
            </example>
-           ensuring that only one MTA can be installed at any one
-           time.
+           ensuring that only one MTA can be unpacked at any one
+           time.  See <ref id="virtual"> for more information about this
+           example.
        </sect1>
       </sect>
 
@@ -4804,58 +5027,44 @@ Replaces: mail-transport-agent
           The dependencies and conflicts they define must be satisfied
           (as defined earlier for binary packages) in order to invoke
           the targets in <tt>debian/rules</tt>, as follows:<footnote>
-           <p>
-             If you make "build-arch" or "binary-arch", you need
-             Build-Depends.  If you make "build-indep" or
-             "binary-indep", you need Build-Depends and
-             Build-Depends-Indep.  If you make "build" or "binary",
-             you need both.
-           </p>
            <p>
              There is no Build-Depends-Arch; this role is essentially
-              met with Build-Depends.  Anyone building the
-              <tt>build-indep</tt> and binary-indep<tt></tt> targets
-              is basically assumed to be building the whole package
-              anyway and so installs all build dependencies.  The
-              autobuilders use <tt>dpkg-buildpackage -B</tt>, which
-              calls <tt>build</tt> (not <tt>build-arch</tt>, since it
-              does not yet know how to check for its existence) and
-              <tt>binary-arch</tt>.
+             met with Build-Depends.  Anyone building the
+             <tt>build-indep</tt> and binary-indep<tt></tt> targets is
+             assumed to be building the whole package, and therefore
+             installation of all build dependencies is required.
            </p>
            <p>
-             The purpose of the original split, I recall, was so that
-             the autobuilders wouldn't need to install extra packages
-             needed only for the binary-indep targets.  But without a
-             build-arch/build-indep split, this didn't work, since
-             most of the work is done in the build target, not in the
-             binary target.
+             The autobuilders use <tt>dpkg-buildpackage -B</tt>, which
+             calls <tt>build</tt>, not <tt>build-arch</tt> since it does
+             not yet know how to check for its existence, and
+             <tt>binary-arch</tt>.  The purpose of the original split
+             between <tt>Build-Depends</tt> and
+             <tt>Build-Depends-Indep</tt> was so that the autobuilders
+             wouldn't need to install extra packages needed only for the
+             binary-indep targets.  But without a build-arch/build-indep
+             split, this didn't work, since most of the work is done in
+             the build target, not in the binary target.
            </p>
          </footnote>
-
          <taglist>
-           <tag><tt>Build-Depends</tt>, <tt>Build-Conflicts</tt></tag>
+           <tag><tt>clean</tt>, <tt>build-arch</tt>, and
+             <tt>binary-arch</tt></tag>
            <item>
-                The <tt>Build-Depends</tt> and
-               <tt>Build-Conflicts</tt> fields must be satisfied when
-               any of the following targets is invoked:
-               <tt>build</tt>, <tt>clean</tt>, <tt>binary</tt>,
-               <tt>binary-arch</tt>, <tt>build-arch</tt>,
-               <tt>build-indep</tt> and <tt>binary-indep</tt>.
+             Only the <tt>Build-Depends</tt> and <tt>Build-Conflicts</tt>
+             fields must be satisfied when these targets are invoked.
            </item>
-           <tag><tt>Build-Depends-Indep</tt>,
-             <tt>Build-Conflicts-Indep</tt></tag>
+           <tag><tt>build</tt>, <tt>build-indep</tt>, <tt>binary</tt>,
+             and <tt>binary-indep</tt></tag>
            <item>
-                The <tt>Build-Depends-Indep</tt> and
-               <tt>Build-Conflicts-Indep</tt> fields must be
-               satisfied when any of the following targets is
-               invoked: <tt>build</tt>, <tt>build-indep</tt>,
-               <tt>binary</tt> and <tt>binary-indep</tt>.
+             The <tt>Build-Depends</tt>, <tt>Build-Conflicts</tt>,
+             <tt>Build-Depends-Indep</tt>, and
+             <tt>Build-Conflicts-Indep</tt> fields must be satisfied when
+             these targets are invoked.
            </item>
          </taglist>
        </p>
-
       </sect>
-
     </chapt>
 
 
@@ -5004,7 +5213,7 @@ Replaces: mail-transport-agent
          <footnote>
            <p>
              During install or upgrade, the preinst is called before
-             the new files are installed, so calling "ldconfig" is
+             the new files are unpacked, so calling "ldconfig" is
              pointless.  The preinst of an existing package can also be
              called if an upgrade fails.  However, this happens during
              the critical time when a shared libs may exist on-disk
@@ -5127,11 +5336,20 @@ Replaces: mail-transport-agent
        <heading>Development files</heading>
 
       <p>
-       The development files associated to a shared library need to be
-       placed in a package called
-       <package><var>libraryname</var><var>soversion</var>-dev</package>,
+       If there are development files associated with a shared library,
+       the source package needs to generate a binary development package
+       named <package><var>libraryname</var><var>soversion</var>-dev</package>,
        or if you prefer only to support one development version at a
-       time, <package><var>libraryname</var>-dev</package>.
+       time, <package><var>libraryname</var>-dev</package>.  Installing
+       the development package must result in installation of all the
+       development files necessary for compiling programs against that
+       shared library.<footnote>
+         This wording allows the development files to be split into
+         several packages, such as a separate architecture-independent
+         <package><var>libraryname</var>-headers</package>, provided that
+         the development package depends on all the required additional
+         packages.
+       </footnote>
       </p>
 
       <p>
@@ -5140,7 +5358,7 @@ Replaces: mail-transport-agent
        <ref id="conflicts">) to ensure that the user only installs one
        development version at a time (as different development versions are
        likely to have the same header files in them, which would cause a
-       filename clash if both were installed).
+       filename clash if both were unpacked).
       </p>
 
       <p>
@@ -6958,7 +7176,7 @@ exec /usr/lib/foo/foo "$@"
     <chapt id="files">
       <heading>Files</heading>
 
-      <sect>
+      <sect id="binaries">
        <heading>Binaries</heading>
 
        <p>
@@ -7503,6 +7721,8 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
                  package is purged.
              </item>
            </list>
+           Obsolete configuration files without local changes may be
+           removed by the package during upgrade.
          </p>
 
          <p>
@@ -8923,7 +9143,7 @@ name ["<var>syshostname</var>"]:
                name="Man-Page-HOWTO">,
              <manref name="man" section="7">, the examples
               created by <prgn>debmake</prgn> or <prgn>dh_make</prgn>,
-             the helper programs <prgn>help2man</prgn>, or the
+             the helper program <prgn>help2man</prgn>, or the
               directory <file>/usr/share/doc/man-db/examples</file>.
           </footnote>
        </p>
@@ -9198,16 +9418,16 @@ END-INFO-DIR-ENTRY
        </p>
 
        <p>
-         Packages distributed under the UCB BSD license, the Apache
-         license (version 2.0), the Artistic license, the GNU GPL
-         (version 2 or 3), the GNU LGPL (versions 2, 2.1, or 3), and the
-         GNU FDL (versions 1.2 or 1.3) should refer to the corresponding
-         files under <file>/usr/share/common-licenses</file>,<footnote>
+         Packages distributed under the Apache license (version 2.0), the
+         Artistic license, the GNU GPL (versions 1, 2, or 3), the GNU
+         LGPL (versions 2, 2.1, or 3), and the GNU FDL (versions 1.2 or
+         1.3) should refer to the corresponding files
+         under <file>/usr/share/common-licenses</file>,<footnote>
            <p>
              In particular,
-              <file>/usr/share/common-licenses/BSD</file>,
               <file>/usr/share/common-licenses/Apache-2.0</file>,
               <file>/usr/share/common-licenses/Artistic</file>,
+              <file>/usr/share/common-licenses/GPL-1</file>,
               <file>/usr/share/common-licenses/GPL-2</file>,
               <file>/usr/share/common-licenses/GPL-3</file>,
               <file>/usr/share/common-licenses/LGPL-2</file>,
@@ -9215,7 +9435,14 @@ END-INFO-DIR-ENTRY
               <file>/usr/share/common-licenses/LGPL-3</file>,
               <file>/usr/share/common-licenses/GFDL-1.2</file>, and
               <file>/usr/share/common-licenses/GFDL-1.3</file>
-              respectively.
+             respectively.  The University of California BSD license is
+             also included in <package>base-files</package> as
+             <file>/usr/share/common-licenses/BSD</file>, but given the
+             brevity of this license, its specificity to code whose
+             copyright is held by the Regents of the University of
+             California, and the frequency of minor wording changes, its
+             text should be included in the copyright file rather than
+             referencing this file.
             </p>
           </footnote> rather than quoting them in the copyright
          file. 
@@ -9470,7 +9697,7 @@ END-INFO-DIR-ENTRY
        <p>
          The <prgn>DEBIAN</prgn> directory will not appear in the
          file system archive of the package, and so won't be installed
-         by <prgn>dpkg</prgn> when the package is installed.
+         by <prgn>dpkg</prgn> when the package is unpacked.
        </p>
 
        <p>
@@ -10016,23 +10243,23 @@ END-INFO-DIR-ENTRY
       </sect>
 
       <sect id="pkg-sourcetree">
-       <heading>The Debianised source tree</heading>
+       <heading>The Debian package source tree</heading>
 
        <p>
          The source archive scheme described later is intended to
-         allow a Debianised source tree with some associated control
-         information to be reproduced and transported easily.  The
-         Debianised source tree is a version of the original program
-         with certain files added for the benefit of the
-         Debianisation process, and with any other changes required
+         allow a Debian package source tree with some associated
+         control information to be reproduced and transported easily.
+         The Debian package source tree is a version of the original
+         program with certain files added for the benefit of the
+         packaging process, and with any other changes required
          made to the rest of the source code and installation
          scripts.
        </p>
 
        <p>
          The extra files created for Debian are in the subdirectory
-         <file>debian</file> of the top level of the Debianised source
-         tree.  They are described below.
+         <file>debian</file> of the top level of the Debian package
+         source tree. They are described below.
        </p>
 
        <sect1 id="pkg-debianrules">
@@ -10122,7 +10349,7 @@ END-INFO-DIR-ENTRY
            </item>
 
            <tag>
-             Debianisation diff -
+             Debian package diff -
              <file>
                <var>package</var>_<var>upstream_version-revision</var>.diff.gz
              </file>
@@ -10191,7 +10418,7 @@ END-INFO-DIR-ENTRY
          <item><p>Apply the diff using <tt>patch -p0</tt>.</p>
          </item>
          <item><p>Untar the tarfile again if you want a copy of the original
-             source code alongside the Debianised version.</p>
+             source code alongside the Debian version.</p>
          </item>
        </enumlist>
 
@@ -10225,10 +10452,10 @@ END-INFO-DIR-ENTRY
 
          <p>
            The source packaging tools manage the changes between the
-           original and Debianised source using <prgn>diff</prgn> and
+           original and Debian source using <prgn>diff</prgn> and
            <prgn>patch</prgn>.  Turning the original source tree as
-           included in the <file>.orig.tar.gz</file> into the debianised
-           source must not involve any changes which cannot be
+           included in the <file>.orig.tar.gz</file> into the Debian
+           package source must not involve any changes which cannot be
            handled by these tools.  Problematic changes which cause
            <prgn>dpkg-source</prgn> to halt with an error when
            building the source package are: