From: Russ Allbery Date: Tue, 29 Jun 2010 18:14:49 +0000 (-0700) Subject: Merge branch 'master' into bug504880-rra X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=21df36b8215e66ff6a1f66de5418660dc032df99;hp=-c;p=debian%2Fdebian-policy.git Merge branch 'master' into bug504880-rra --- 21df36b8215e66ff6a1f66de5418660dc032df99 diff --combined policy.sgml index 57ff067,9fe7158..2f4c935 --- a/policy.sgml +++ b/policy.sgml @@@ -2,6 -2,8 +2,8 @@@ %versiondata; + + ]> @@@ -474,9 -476,11 +476,11 @@@ must not require a package outside of main for compilation or execution (thus, the package must - not declare a "Depends", "Recommends", or - "Build-Depends" relationship on a non-main - package), + not declare a Pre-Depends, Depends, + Recommends, Build-Depends, + or Build-Depends-Indep relationship on a + non-main package unless a package + in main is listed as an alternative), must not be so buggy that we refuse to support them, @@@ -1054,8 -1058,8 +1058,8 @@@

- Sometimes, a package requires another package to be installed - and configured before it can be installed. In this + Sometimes, a package requires another package to be unpacked + and configured before it can be unpacked. In this case, you must specify a Pre-Depends entry for the package.

@@@ -2497,7 -2501,7 +2501,7 @@@ Package: libc These fields are used by dpkg-gencontrol to generate control files for binary packages (see below), by dpkg-genchanges to generate the - .changes file to accompany the upload, and by + .changes file to accompany the upload, and by dpkg-source when it creates the .dsc source control file as part of a source archive. Many fields are permitted to span multiple lines in @@@ -2531,7 -2535,8 +2535,8 @@@

The DEBIAN/control 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.

@@@ -2558,10 -2563,9 +2563,9 @@@ Debian source control files -- .dsc

- 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 . + 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 . Format (mandatory) @@@ -2595,12 -2599,19 +2599,19 @@@ Debian changes files -- .changes

- 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 - debian/control file and other data about the - source package gathered via debian/changelog - and debian/rules. + The .changes 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 + debian/control file and other data about the + source package gathered via debian/changelog + and debian/rules. +

+ +

+ .changes files have a format version that is + incremented whenever the documented fields or their meaning + change. This document describes format &changesversion;.

@@@ -3259,12 -3270,30 +3270,30 @@@ Format

- This field specifies a format revision for the file. - The most current format described in the Policy Manual - is version 1.5. 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 . + In .changes + files, this field declares the format version of that file. + The syntax of the field value is the same as that of + a package version number except + that no epoch or Debian revision is allowed. The format + described in this document is &changesversion;. +

+ +

+ In .dsc + Debian source control 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. + + The source formats currently supported by the Debian archive + software are 1.0, 3.0 (native), + and 3.0 (quilt). +

@@@ -3525,7 -3554,6 +3554,6 @@@ Checksums-Sha256 must match the list of files in the Files field.

- @@@ -3625,7 -3653,7 +3653,7 @@@

Broadly speaking the preinst is called before - (a particular version of) a package is installed, and the + (a particular version of) a package is unpacked, and the postinst afterwards; the prerm before (a version of) a package is removed and the postrm afterwards. @@@ -4015,7 -4043,7 +4043,7 @@@ 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. Part of the problem is due to what is arguably a bug in dpkg. @@@ -4151,7 -4179,7 +4179,7 @@@ 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). @@@ -4465,30 -4493,31 +4493,30 @@@ Build-Depends: foo [linux-any], bar [an

- 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 Depends 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.

-

- 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. -

-

- The Depends 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 + postinst script, then the cycle will be broken at + that package; this ensures that all postinst + 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 postinst + scripts.

@@@ -4500,8 -4529,7 +4528,8 @@@ This declares an absolute dependency. A package will not be configured unless all of the packages listed in its Depends field have been correctly - configured. + configured (unless there is a circular dependency as + described above).

@@@ -4515,17 -4543,10 +4543,17 @@@ The Depends field should also be used if the postinst, prerm or postrm scripts require the package to be - present in order to run. Note, however, that the - postrm cannot rely on any non-essential - packages to be present during the purge - 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 + postinst and postrm, the + depended-on packages will be unpacked and configured + first. (Note, however, that the postrm + cannot rely on any non-essential packages to be present + during the purge phase.) In the case of + prerm, the depended-on package will at least + be unpacked (it might be configured too, but you can't + rely on this unless you use Pre-Depends). Recommends @@@ -4588,17 -4609,7 +4616,17 @@@ to be configured, the pre-dependency will be treated as a normal Depends, 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 Depends, Pre-Depends does not + permit circular dependencies to be broken. If a circular + dependency is encountered while attempting to honor + Pre-Depends, the installation will be aborted. +

+ +

+ Pre-Depends are also required if the + preinst script depends on the named package. + It is best to avoid this situation if possible.

@@@ -4607,6 -4618,13 +4635,6 @@@ installation would hamper the ability of the system to continue with any upgrade that might be in progress.

- -

- Pre-Depends are also required if the - preinst script depends on the named - package. It is best to avoid this situation if - possible. -

@@@ -4631,7 -4649,7 +4659,7 @@@

When one binary package declares that it breaks another, dpkg will refuse to allow the package which - declares Breaks be installed unless the broken + declares Breaks be unpacked unless the broken package is deconfigured first, and it will refuse to allow the broken package to be reconfigured.

@@@ -4684,7 -4702,7 +4712,7 @@@

When one binary package declares a conflict with another using a Conflicts field, dpkg will - refuse to allow them to be installed on the system at the + refuse to allow them to be unpacked on the system at the same time. This is a stronger restriction than Breaks, which just prevents both packages from being configured at the same time. Conflicting packages cannot be unpacked on the @@@ -4692,8 -4710,8 +4720,8 @@@

- If one package is to be installed, the other must be removed - first. If the package being installed is marked as replacing + If one package is to be unpacked, the other must be removed + first. If the package being unpacked is marked as replacing (see , but note that Breaks 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 @@@ -4966,7 -4984,7 +4994,7 @@@ Provides: mail-transport-agen Conflicts: mail-transport-agent Replaces: mail-transport-agent - ensuring that only one MTA can be installed at any one + ensuring that only one MTA can be unpacked at any one time. See for more information about this example. @@@ -5185,7 -5203,7 +5213,7 @@@

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 @@@ -5330,7 -5348,7 +5358,7 @@@ ) 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).

@@@ -9391,14 -9409,15 +9419,15 @@@ END-INFO-DIR-ENTR

Packages distributed under 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 + 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 /usr/share/common-licenses,

In particular, /usr/share/common-licenses/Apache-2.0, /usr/share/common-licenses/Artistic, + /usr/share/common-licenses/GPL-1, /usr/share/common-licenses/GPL-2, /usr/share/common-licenses/GPL-3, /usr/share/common-licenses/LGPL-2, @@@ -9668,7 -9687,7 +9697,7 @@@

The DEBIAN directory will not appear in the file system archive of the package, and so won't be installed - by dpkg when the package is installed. + by dpkg when the package is unpacked.