auto-deconfiguration.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. To: Debian developers list <debian-devel@pixar.com>
  2. Subject: Re: dpkg maintainer script calls and arguments
  3. In-Reply-To: <1506077@toto.iv>
  4. FCC: ~/mail/Outbound
  5. --text follows this line--
  6. In order to support easier upgrades where important packages get split
  7. into several pieces, I have implemented the following scheme, which I
  8. described on debian-private a while ago. It is enabled by the use of
  9. `--auto-deconfigure', or `-B', and the dselect method scripts in
  10. 0.93.76 have been changed to supply this option.
  11. ] I plan to make it possible to `deconfigure' packages at installation
  12. ] time, in order to keep dependency invariants satisfied. In a sane
  13. ] installation this will mean that everything will work right, even when
  14. ] (for example) an important package is split into two pieces or
  15. ] packages.
  16. ]
  17. ] Basically, suppose that package A is being split into A1 and A2, and B
  18. ] and C depend on A1 and A2 respectively. If you try to install A1 dpkg
  19. ] will consider removing A (because of the conflict between A and each
  20. ] of A1 and A2), but then C's dependency is not satisifed, and if you
  21. ] try to install A2 B's dependency wouldn't be satisfied.
  22. ]
  23. ] At the moment dpkg will simply refuse to do it. You have to say
  24. ] --force-depends, or remove either B or C.
  25. ]
  26. ] I'm going to arrange that dpkg will automatically deconfigure B or C,
  27. ] as appropriate, and try to reconfigure it later.
  28. ]
  29. ] So, if you do `dpkg -i A1.deb A2.deb' all will be well; if you do
  30. ] `dpkg -i A1.deb' you'll get A1 installed and configured correctly, but
  31. ] error messages about C being broken, and in order to fix C you'll have
  32. ] to install A2 as well, or return to A (dpkg will remove A1).
  33. ]
  34. ] All of this will appear very automatic to people who use dselect.
  35. ] People who do things manually will have a slightly more complicated
  36. ] task, as dpkg won't remove A (in the scenario above) unless it has
  37. ] been selected for deinstallation using dselect or dpkg --remove (which
  38. ] would fail because of the dependencies from B and C).
  39. This means that maintainer scripts can get called in two new ways:
  40. <prerm(C)> deconfigure in-favour <A1> <version> removing <A> <v.>
  41. <postinst(C)> abort-deconfigure in-favour <A1> <version> removing <A> <v.>
  42. using the example package names above.
  43. The first call happens before the prerm script of the package which is
  44. being removed (A) is called; the second happens if an error occurs and
  45. dpkg wants to back out of the installation.
  46. If the installation of both A1 and A2 is successful dpkg will then
  47. call both
  48. <postinst(B)> configure
  49. <postinst(C)> configure
  50. as usual.
  51. Some time ago I posted a message documenting all the maintainer script
  52. calls and their arguments. Below is a revised version of that
  53. message. I shall upload it as maintainer-script-args.txt, and it
  54. should go in project/standards. The top half of this message will go
  55. in auto-deconfiguration.txt.
  56. Ian.