From 2361862aada29e1f9cddfc830393cc8b32ff986a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 5 Mar 2008 03:08:25 +0000 Subject: [PATCH] New Breaks dependency field Documents the new Breaks field supported by dpkg. This is Ian Jackson's patch with minor formatting changes and an added note that Breaks should not be used until Debian stable supports it. Recommend Breaks instead of versioned Conflicts once Debian stable supports it. Remove the paragraph about suidmanager in dpkg-statoverride entirely since that package no longer exists even in oldstable. Closes #379150. git-archimport-id: rra@debian.org--lenny/debian-policy--devel--3.7--patch-33 --- debian/changelog | 2 + policy.sgml | 134 ++++++++++++++++++++++++++++----------- upgrading-checklist.html | 4 ++ 3 files changed, 104 insertions(+), 36 deletions(-) diff --git a/debian/changelog b/debian/changelog index e0ce0b4..0728ea9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ debian-policy (3.7.4.0) unstable; urgency=low * Bug fix: "[AMENDMENT 11/02/2008] Manual page encoding", thanks to Colin Watson (Closes: #440420). + * Bug fix: "Documentation for Breaks in dpkg", thanks to Ian Jackson + (Closes: #379150). * Bug fix: "support for wrapped Uploaders should now be mandatory" (Closes: #431813). * Bug fix: "[PROPOSAL] Add should not embed code from other packages", diff --git a/policy.sgml b/policy.sgml index a53af99..9e2037a 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2567,7 +2567,8 @@ Package: libc6 Package interrelationship fields: Depends, Pre-Depends, - Recommends, Suggests, Conflicts, + Recommends, Suggests, + Breaks, Conflicts, Provides, Replaces, Enhances @@ -3358,8 +3359,8 @@ Package: libc6 deconfigured's-postinst abort-deconfigure in-favour failed-install-package version - removing conflicting-package - version + [removing conflicting-package + version] @@ -3384,9 +3385,9 @@ Package: libc6 deconfigured's-prerm deconfigure in-favour package-being-installed - version removing + version [removing conflicting-package - version + version] @@ -3467,11 +3468,30 @@ Package: libc6 - If a "conflicting" package is being removed at the same time: + If a "conflicting" package is being removed at the same time, + or if any package will be broken (due to Breaks): - If any packages depended on that conflicting - package and --auto-deconfigure is + If --auto-deconfigure is + specified, call, for each package to be deconfigured + due to Breaks: + +deconfigured's-prerm deconfigure \ + in-favour package-being-installed version + + Error unwind: + +deconfigured's-postinst abort-deconfigure \ + in-favour package-being-installed-but-failed version + + The deconfigured packages are marked as + requiring configuration, so that if + --install is used they will be + configured again if possible. + + + If any packages depended on a conflicting + package being removed and --auto-deconfigure is specified, call, for each such package: deconfigured's-prerm deconfigure \ @@ -3490,7 +3510,7 @@ Package: libc6 configured again if possible. - To prepare for removal of the conflicting package, call: + To prepare for removal of each conflicting package, call: conflictor's-prerm remove \ in-favour package new-version @@ -3987,16 +4007,19 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386],

This is done using the Depends, Pre-Depends, - Recommends, Suggests, Enhances and - Conflicts control file fields. + Recommends, Suggests, Enhances, + Breaks and Conflicts control file fields.

- These six fields are used to declare a dependency + These seven fields are used to declare a dependency relationship by one package on another. Except for - Enhances, they appear in the depending (binary) - package's control file. (Enhances appears in the - recommending package's control file.) + Enhances and Breaks, they appear in the + depending (binary) package's control file. + (Enhances appears in the recommending package's + control file, and Breaks appears in the version of + depended-on package which causes the named package to + break).

@@ -4034,7 +4057,7 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386], (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 dependcy loop they happen to be on. If one + 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 @@ -4170,6 +4193,53 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386],

+ + Packages which break other packages - Breaks + +

+ Using Breaks may cause problems for upgrades from older + versions of Debian and should not be used until the stable + release of Debian supports Breaks. +

+ +

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

+ +

+ A package will not be regarded as causing breakage merely + because its configuration files are still installed; it must + be at least half-installed. +

+ +

+ A special exception is made for packages which declare that + they break their own package name or a virtual package which + they provide (see below): this does not count as a real + breakage. +

+ +

+ Normally a Breaks entry will have an "earlier than" + version clause; such a Breaks 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 Breaks will + inform higher-level package management tools that broken + package must be upgraded before the new one. +

+ +

+ If the breaking package also overwrites some files from the + older package, it should use Replaces (not + Conflicts) to ensure this goes smoothly. +

+
+ Conflicting binary packages - Conflicts @@ -4215,7 +4285,9 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386], "earlier than" version clause. This would prevent dpkg from upgrading or installing the package which declared such a conflict until the upgrade or removal - of the conflicted-with package had been completed. + of the conflicted-with package had been completed. Instead, + Breaks may be used (once Breaks is supported + by the stable release of Debian).

@@ -4226,7 +4298,7 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386], As well as the names of actual ("concrete") packages, the package relationship fields Depends, Recommends, Suggests, Enhances, - Pre-Depends, Conflicts, + Pre-Depends, Breaks, Conflicts, Build-Depends, Build-Depends-Indep, Build-Conflicts and Build-Conflicts-Indep may mention "virtual packages". @@ -4262,16 +4334,16 @@ Provides: bar

- If a dependency or a conflict has a version number attached + 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) - it is assumed that a real package which - provides the virtual package is not of the "right" version. - So, a Provides 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. + 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 Provides 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.

@@ -7445,16 +7517,6 @@ endscript description of the use of dpkg-statoverride.

-

- dpkg-statoverride is a replacement for the - deprecated suidmanager package. Packages which - previously used suidmanager should have a - Conflicts: suidmanager (<< 0.50) entry (or even - (<< 0.52)), and calls to suidregister - and suidunregister should now be simply removed - from the maintainer scripts. -

-

If a system administrator wishes to have a file (or directory or other such thing) installed with owner and diff --git a/upgrading-checklist.html b/upgrading-checklist.html index d0afa35..3105c5d 100644 --- a/upgrading-checklist.html +++ b/upgrading-checklist.html @@ -58,6 +58,10 @@ picking your way through this list. packages unless the included package is explicitly intended to be used that way. [4.13] * The Uploaders field in debian/control may be wrapped. [5.6.3] + * The Breaks field declares that this package breaks another and + prevents installation of the breaking package unless the package + named in Breaks is deconfigured first. This field should not be + used until the dpkg in Debian stable supports it. [6.5, 6.6, 7] * Manual pages in locale-specific directories should use either the legacy encoding for that directory or UTF-8. Country names should not be included in locale-specific manual page directories unless -- 2.39.5