PackageDependencyFieldBreaks

Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2006-06-14 10:13:47
Size: 2887
Editor: chiark
Comment: own page
Revision 4 as of 2006-06-21 14:21:55
Size: 5187
Editor: ALagny-109-1-2-202
Comment: wip
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

Implement the already-specified Breaks package dependency field in dpkg and higher layers.
Line 5: Line 7:
Implement the already-specified Breaks package dependency field in dpkg and higher layers. See https://launchpad.net/distros/ubuntu/+spec/replacement-package-auto-installation.

Formerly half of PackageDependencyFixes which has been split into this spec and ReplacementPackageAutoInstallation.
Line 19: Line 23:
dpkg and apt and other programs which read/write status files need to be taught about Breaks so as not to mind it.
Line 23: Line 25:
apt does not need to consider Breaks although it might be useful to try to minimise the aforementioned deconfiguration. apt does not absolutely need to consider Breaks. It would be good for apt to (a) know that Breaks usually means apt should try to upgrade the Broken package to satisfy the dependency, (b) know enough about Breaks to avoid starting an operation which is guaranteed to leave a package deconfigured due to an unfixable Breaks, and (c) know enough to reconfigure packages after dpkg has deconfigured them because of Breaks.
Line 25: Line 27:
== Design == update-manager needs to be taught to run dpkg --configure --pending or some similar equivalent at the end of an upgrade, to configure any packages left unconfigured by apt/dpkg.
Line 27: Line 29:
Breaks:
http://www.dpkg.org/Breaks (currently down unfortunately)
http://lists.debian.org/debian-devel/1997/10/msg00643.html
Some programs which read and write status files need to be taught about Breaks so as not to mind it.
Line 31: Line 31:
== Implementation == == Semantic design ==

See http://lists.debian.org/debian-devel/1997/10/msg00643.html

== Implementation and deployment plan ==

 1. Immediately (as soon as possible) dpkg will be changed in edgy so that it will refuse to install any package whose control file specifies Breaks. (Ideally this same change would go into Debian sid at approximately the same time.)
 2. Proper implementation of Breaks in dpkg will be developed, tested, and deployed into edgy. (Ideally this would be deployed in Debian sid at the same time too.)
 3. Now an announcement can be made that packages should start using Breaks << instead of Conflicts <<. The announcement should describe when to pick Breaks and when to pick Conflicts and should also come with proposed new text for the policy manual.
 4. update-manager's upgrade script will be changed so that packages are not left unconfigured (this is trivial).
 4. If time permits, the improvements in apt described above will be implemented. (a) (knowing that Breaks
Line 54: Line 64:
= From dpkg.org wiki =
= Breaks =

== Status ==

 * Created: [[Date(2005-07-17T11:45:27Z)]] by ScottJamesRemnant
 * Status: DevelopmentProposal

== Semantics - discursive explanation (originally from dpkg.org wiki) ==

The basic idea is that, roughly, Breaks is to Conflicts as Depends is to Pre-Depends. Conflicts requires that the conflicted-against package isn't even unpacked when the conflictor is unpacked, while Breaks allows the two packages to coexist on the system but (with {{{--auto-deconfigure}}}) deconfigures one of them. Breaks would be appropriate in cases where

{{{
Conflicts: foo (<< some-version)
}}}

is currently used to indicate that {{{foo}}} needs to be upgraded to {{{some-version}}} or newer in order to work with the conflictor.

Summary and Status

Implement the already-specified Breaks package dependency field in dpkg and higher layers.

See https://launchpad.net/distros/ubuntu/+spec/package-dependency-field-breaks

See https://launchpad.net/distros/ubuntu/+spec/replacement-package-auto-installation.

Formerly half of PackageDependencyFixes which has been split into this spec and ReplacementPackageAutoInstallation.

Rationale

It is very likely that many problems with installation are traceable to the ubiquitous use of Conflicts where Breaks would be better - eg, deinstallations of ubuntu-desktop - but most of these consequences probably go unreported. Even with the new distro upgrader life will be easier without these. Furthermore, use of Breaks instead would mean less deinstallation and reinstallation of packages and so might reduce or eliminate the impact of other bugs.

Breaks will replace almost every use of Conflicts << without Replaces <<. This will reduce the amount of churn needed during upgrades, as packages will no longer need to be removed. Installation ordering will be less criticial. This will make upgrades less fragile. In particular, it should eliminate most semi-accidental removals implied by the dependency system, and switching routine use to the less-dangerous Breaks will reduce the total amount of damage done by incorrect dependencies. It may also speed up upgrades.

Use cases

Breezy i386 contains 909 instances of Conflicts << in main; 1921 overall. There is scope for considerable improvement here - Breaks would get rid of nearly all of these.

Scope

dpkg needs to be taught how to apply Breaks (usually, deconfigure packages if necessary).

apt does not absolutely need to consider Breaks. It would be good for apt to (a) know that Breaks usually means apt should try to upgrade the Broken package to satisfy the dependency, (b) know enough about Breaks to avoid starting an operation which is guaranteed to leave a package deconfigured due to an unfixable Breaks, and (c) know enough to reconfigure packages after dpkg has deconfigured them because of Breaks.

update-manager needs to be taught to run dpkg --configure --pending or some similar equivalent at the end of an upgrade, to configure any packages left unconfigured by apt/dpkg.

Some programs which read and write status files need to be taught about Breaks so as not to mind it.

Semantic design

See http://lists.debian.org/debian-devel/1997/10/msg00643.html

Implementation and deployment plan

  1. Immediately (as soon as possible) dpkg will be changed in edgy so that it will refuse to install any package whose control file specifies Breaks. (Ideally this same change would go into Debian sid at approximately the same time.)
  2. Proper implementation of Breaks in dpkg will be developed, tested, and deployed into edgy. (Ideally this would be deployed in Debian sid at the same time too.)
  3. Now an announcement can be made that packages should start using Breaks << instead of Conflicts <<. The announcement should describe when to pick Breaks and when to pick Conflicts and should also come with proposed new text for the policy manual.

  4. update-manager's upgrade script will be changed so that packages are not left unconfigured (this is trivial).
  5. If time permits, the improvements in apt described above will be implemented. (a) (knowing that Breaks
  6. dpkg proper will have to be taught about Breaks; this involves new code in many of the dependency-handling situations.
  7. other code in dpkg will need updating a bit too (eg, dpkg-source et al)
  8. apt should ideally be taught about Breaks; this involves new code in its dependency handling too
  9. Various other packages will need minor edits.
  10. If we switch to smartpm we should educate that too, at least as far as we educate apt.

Compatibility and upgrade process

TBD

Q and A

Q. Is it really better to allow programs to break than to force stuff to be removed ?

A. The programs will be deconfigured (which is the proper way to avoid bad consequences from them not being properly installed). It is actually wrong to remove them because we don't want them to be removed; really we just want them upgraded (in most of these cases).

Outstanding issues

BoF agenda and discussion

From dpkg.org wiki

Breaks

Status

Semantics - discursive explanation (originally from dpkg.org wiki)

The basic idea is that, roughly, Breaks is to Conflicts as Depends is to Pre-Depends. Conflicts requires that the conflicted-against package isn't even unpacked when the conflictor is unpacked, while Breaks allows the two packages to coexist on the system but (with --auto-deconfigure) deconfigures one of them. Breaks would be appropriate in cases where

Conflicts: foo (<< some-version)

is currently used to indicate that foo needs to be upgraded to some-version or newer in order to work with the conflictor.


CategorySpec

PackageDependencyFieldBreaks (last edited 2008-08-06 16:20:56 by localhost)