dependency-ordering.txt 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. To: Debian developers list <debian-devel@pixar.com>
  2. Subject: Note about the default for virtal package dependencies
  3. As I wrote some time ago (see below), ordering is significant in the
  4. Depends and Recommended fields - in the absence of other information
  5. dselect will suggest to the user that they select the first named
  6. package in a list of options.
  7. However, there is no way to specify the `order' of several packages
  8. which all Provide the same thing, when that thing is listed as a
  9. Dependency.
  10. Eg, if we have:
  11. Package: glibcdoc
  12. Recommended: info-browser
  13. Package: info
  14. Provides: info-browser
  15. Package: emacs
  16. Provides: info-browser
  17. then (if emacs and info are both in the same Class) dselect's choice
  18. will be essentially random.
  19. It is important to think about this problem, and to consider whether
  20. to list one the the packages explicitly.
  21. For example,
  22. Package: glibcdoc
  23. Recommended: info | info-browser
  24. will do the same as the above, except that it will ensure that `info'
  25. is the package which dselect will suggest to the user they also select
  26. if the user has neither it nor Emacs and asks to select glibcdoc.
  27. This is not necessary if one of the packages has a more fundamental
  28. Class - see the details below.
  29. Ian.
  30. ------- Start of forwarded message -------
  31. To: Debian developers list <debian-devel@pixar.com>
  32. Subject: Ordering is significant in Depends: and Recommends:
  33. For dselect, the ordering of alternative packages in a Depends: or
  34. Recommended: line is significant.
  35. When an unsatisfied dependency (Depends or Recommended) or a conflict
  36. is detected dselect will go into a `recursive package list', where the
  37. user gets to choose how to resolve the problem.
  38. Usually dselect will suggest to the user that they select the package
  39. with the most `fundamental' class (eg, it will prefer Base packages to
  40. Optional ones), or the one that they `most wanted' to select in some
  41. sense.
  42. However, in the absence of other information dselect will prefer
  43. packages listed earlier in the unsatisfied entry in the Depends or
  44. Recommended field.
  45. NB: this doesn't apply to constructions of the form:
  46. Package: auctex
  47. Depends: emacs, tex
  48. which specifies that auctex depends on *both* emacs and tex. In this
  49. case dselect will suggest to the user that they select both packages.
  50. It applies to constructions of the form:
  51. Package: a2gs
  52. Recommended: gs_x | gs_both | gs_svga
  53. Here, dselect will prefer gs_x because it is listed earlier. (In the
  54. future I may make it more clever - it may be able to notice, to
  55. continue the example, that the dependencies of gs_x are not yet
  56. satisfied while those of gs_svga, are, and thus prefer the latter, or
  57. in a different situation to notice that gs_both has extra dependencies
  58. which are satisfied, and thus prefer it to gs_x and gs_svga. More
  59. thought is needed in this area.)
  60. One final example. In the more complicated construction:
  61. Package: trn
  62. Depends: smail | sendmail, inn | inewsinn
  63. dselect will prefer smail because it is a Standard package, and
  64. Sendmail is only Optional, and will prefer inewsinn because it is
  65. Recommended and inn is only Optional. So, the default (if none of the
  66. other packages were selected) would be to select smail and inewsinn.
  67. However, if inewsinn were moved to Optional this would change, and inn
  68. would be preferred whenever the issue arose after the change.
  69. Optional fields have the same structure as Depends and Recommended
  70. fields, but they will not arrange for the packages they list to be
  71. suggested for selection, though they will be offered to the user.
  72. Ian M: can this go in an appendix to the Guidelines ?
  73. Ian.
  74. ------- End of forwarded message -------