add another second
[debian-policy.git] / policy / ch-relationships.rst
blob3a73f7b3df680fc6ff6cab71864eaa75ffdeaa2d
1 Declaring relationships between packages
2 ========================================
4 .. _s-depsyntax:
6 Syntax of relationship fields
7 -----------------------------
9 These fields all have a uniform syntax. They are a list of package names
10 separated by commas.
12 In the ``Depends``, ``Recommends``, ``Suggests``, ``Pre-Depends``,
13 ``Build-Depends``, ``Build-Depends-Indep`` and ``Build-Depends-Arch``
14 control fields of the package, which declare dependencies on other
15 packages, the package names listed may also include lists of alternative
16 package names, separated by vertical bar (pipe) symbols ``|``. In such a
17 case, that part of the dependency can be satisfied by any one of the
18 alternative packages.
20 All of the fields except for ``Provides`` may restrict their
21 applicability to particular versions of each named package. This is done
22 in parentheses after each individual package name; the parentheses
23 should contain a relation from the list below followed by a version
24 number, in the format described in :ref:`s-f-Version`.
26 The relations allowed are ``<<``, ``<=``, ``=``, ``>=`` and ``>>`` for
27 strictly earlier, earlier or equal, exactly equal, later or equal and
28 strictly later, respectively.  [#]_
30 Whitespace may appear at any point in the version specification subject
31 to the rules in :ref:`s-controlsyntax`, and must appear
32 where it's necessary to disambiguate; it is not otherwise significant.
33 All of the relationship fields can only be folded in source package
34 control files. For consistency and in case of future changes to ``dpkg``
35 it is recommended that a single space be used after a version
36 relationship and before a version number; it is also conventional to put
37 a single space after each comma, on either side of each vertical bar,
38 and before each open parenthesis. When opening a continuation line in a
39 relationship field, it is conventional to do so after a comma and before
40 the space following that comma.
42 For example, a list of dependencies might appear as:
46     Package: mutt
47     Version: 1.3.17-1
48     Depends: libc6 (>= 2.2.1), exim | mail-transport-agent
50 Relationships may be restricted to a certain set of architectures. This
51 is indicated in brackets after each individual package name and the
52 optional version specification. The brackets enclose a non-empty list of
53 Debian architecture names in the format described in
54 :ref:`s-arch-spec`, separated by whitespace. Exclamation
55 marks may be prepended to each of the names. (It is not permitted for
56 some names to be prepended with exclamation marks while others aren't.)
58 For build relationship fields (``Build-Depends``,
59 ``Build-Depends-Indep``, ``Build-Depends-Arch``, ``Build-Conflicts``,
60 ``Build-Conflicts-Indep`` and ``Build-Conflicts-Arch``), if the current
61 Debian host architecture is not in this list and there are no
62 exclamation marks in the list, or it is in the list with a prepended
63 exclamation mark, the package name and the associated version
64 specification are ignored completely for the purposes of defining the
65 relationships.
67 For example:
71     Source: glibc
72     Build-Depends-Indep: texinfo
73     Build-Depends: kernel-headers-2.2.10 [!hurd-i386],
74      hurd-dev [hurd-i386], gnumach-dev [hurd-i386]
76 requires ``kernel-headers-2.2.10`` on all architectures other than
77 hurd-i386 and requires ``hurd-dev`` and ``gnumach-dev`` only on
78 hurd-i386. Here is another example showing multiple architectures
79 separated by spaces:
83     Build-Depends:
84      libluajit5.1-dev [i386 amd64 kfreebsd-i386 armel armhf powerpc mips],
85      liblua5.1-dev [hurd-i386 ia64 kfreebsd-amd64 s390x sparc],
87 For binary relationship fields and the ``Built-Using`` field, the
88 architecture restriction syntax is only supported in the source package
89 control file ``debian/control``. When the corresponding binary package
90 control file is generated, the relationship will either be omitted or
91 included without the architecture restriction based on the architecture
92 of the binary package. This means that architecture restrictions must
93 not be used in binary relationship fields for architecture-independent
94 packages (``Architecture: all``).
96 For example:
100     Depends: foo [i386], bar [amd64]
102 becomes ``Depends: foo`` when the package is built on the ``i386``
103 architecture, ``Depends: bar`` when the package is built on the
104 ``amd64`` architecture, and omitted entirely in binary packages built
105 on all other architectures.
107 If the architecture-restricted dependency is part of a set of
108 alternatives using ``|``, that alternative is ignored completely on
109 architectures that do not match the restriction. For example:
113     Build-Depends: foo [!i386] | bar [!amd64]
115 is equivalent to ``bar`` on the ``i386`` architecture, to ``foo`` on
116 the ``amd64`` architecture, and to ``foo | bar`` on all other
117 architectures.
119 Relationships may also be restricted to a certain set of architectures
120 using architecture wildcards in the format described in
121 :ref:`s-arch-wildcard-spec`. The syntax for declaring
122 such restrictions is the same as declaring restrictions using a certain
123 set of architectures without architecture wildcards. For example:
127     Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
129 is equivalent to ``foo`` on architectures using the Linux kernel and any
130 cpu, ``bar`` on architectures using any kernel and an i386 cpu, and
131 ``baz`` on any architecture using a kernel other than Linux.
133 Note that the binary package relationship fields such as ``Depends``
134 appear in one of the binary package sections of the control file,
135 whereas the build-time relationships such as ``Build-Depends`` appear in
136 the source package section of the control file (which is the first
137 section).
139 .. _s-binarydeps:
141 Binary Dependencies - ``Depends``, ``Recommends``, ``Suggests``, ``Enhances``, ``Pre-Depends``
142 ----------------------------------------------------------------------------------------------
144 Packages can declare in their control file that they have certain
145 relationships to other packages - for example, that they may not be
146 installed at the same time as certain other packages, and/or that they
147 depend on the presence of others.
149 This is done using the ``Depends``, ``Pre-Depends``, ``Recommends``,
150 ``Suggests``, ``Enhances``, ``Breaks`` and ``Conflicts`` control fields.
151 ``Breaks`` is described in :ref:`s-breaks`, and
152 ``Conflicts`` is described in :ref:`s-conflicts`. The
153 rest are described below.
155 These seven fields are used to declare a dependency relationship by one
156 package on another. Except for ``Enhances`` and ``Breaks``, they appear
157 in the depending (binary) package's control file. (``Enhances`` appears
158 in the recommending package's control file, and ``Breaks`` appears in
159 the version of depended-on package which causes the named package to
160 break).
162 A ``Depends`` field takes effect *only* when a package is to be
163 configured. It does not prevent a package being on the system in an
164 unconfigured state while its dependencies are unsatisfied, and it is
165 possible to replace a package whose dependencies are satisfied and which
166 is properly installed with a different version whose dependencies are
167 not and cannot be satisfied; when this is done the depending package
168 will be left unconfigured (since attempts to configure it will give
169 errors) and will not function properly. If it is necessary, a
170 ``Pre-Depends`` field can be used, which has a partial effect even when
171 a package is being unpacked, as explained in detail below. (The other
172 three dependency fields, ``Recommends``, ``Suggests`` and ``Enhances``,
173 are only used by the various front-ends to ``dpkg`` such as ``apt-get``,
174 ``aptitude``, and ``dselect``.)
176 Since ``Depends`` only places requirements on the order in which
177 packages are configured, packages in an installation run are usually all
178 unpacked first and all configured later.  [#]_
180 If there is a circular dependency among packages being installed or
181 removed, installation or removal order honoring the dependency order is
182 impossible, requiring the dependency loop be broken at some point and
183 the dependency requirements violated for at least one package. Packages
184 involved in circular dependencies may not be able to rely on their
185 dependencies being configured before they themselves are configured,
186 depending on which side of the break of the circular dependency loop
187 they happen to be on. If one of the packages in the loop has no
188 ``postinst`` script, then the cycle will be broken at that package; this
189 ensures that all ``postinst`` scripts are run with their dependencies
190 properly configured if this is possible. Otherwise the breaking point is
191 arbitrary. Packages should therefore avoid circular dependencies where
192 possible, particularly if they have ``postinst`` scripts.
194 The meaning of the five dependency fields is as follows:
196 ``Depends``
197     This declares an absolute dependency. A package will not be
198     configured unless all of the packages listed in its ``Depends``
199     field have been correctly configured (unless there is a circular
200     dependency as described above).
202     The ``Depends`` field should be used if the depended-on package is
203     required for the depending package to provide a significant amount
204     of functionality.
206     The ``Depends`` field should also be used if the ``postinst`` or
207     ``prerm`` scripts require the depended-on package to be unpacked or
208     configured in order to run. In the case of ``postinst configure``,
209     the depended-on packages will be unpacked and configured first. (If
210     both packages are involved in a dependency loop, this might not work
211     as expected; see the explanation a few paragraphs back.) In the case
212     of ``prerm`` or other ``postinst`` actions, the package dependencies
213     will normally be at least unpacked, but they may be only
214     "Half-Installed" if a previous upgrade of the dependency failed.
216     Finally, the ``Depends`` field should be used if the depended-on
217     package is needed by the ``postrm`` script to fully clean up after
218     the package removal. There is no guarantee that package dependencies
219     will be available when ``postrm`` is run, but the depended-on
220     package is more likely to be available if the package declares a
221     dependency (particularly in the case of ``postrm remove``). The
222     ``postrm`` script must gracefully skip actions that require a
223     dependency if that dependency isn't available.
225 ``Recommends``
226     This declares a strong, but not absolute, dependency.
228     The ``Recommends`` field should list packages that would be found
229     together with this one in all but unusual installations.
231 ``Suggests``
232     This is used to declare that one package may be more useful with one
233     or more others. Using this field tells the packaging system and the
234     user that the listed packages are related to this one and can
235     perhaps enhance its usefulness, but that installing this one without
236     them is perfectly reasonable.
238 ``Enhances``
239     This field is similar to Suggests but works in the opposite
240     direction. It is used to declare that a package can enhance the
241     functionality of another package.
243 ``Pre-Depends``
244     This field is like ``Depends``, except that it also forces ``dpkg``
245     to complete installation of the packages named before even starting
246     the installation of the package which declares the pre-dependency,
247     as follows:
249     When a package declaring a pre-dependency is about to be *unpacked*
250     the pre-dependency can be satisfied if the depended-on package is
251     either fully configured, *or even if* the depended-on package(s) are
252     only in the "Unpacked" or the "Half-Configured" state, provided that
253     they have been configured correctly at some point in the past (and
254     not removed or partially removed since). In this case, both the
255     previously-configured and currently "Unpacked" or "Half-Configured"
256     versions must satisfy any version clause in the ``Pre-Depends``
257     field.
259     When the package declaring a pre-dependency is about to be
260     *configured*, the pre-dependency will be treated as a normal
261     ``Depends``. It will be considered satisfied only if the depended-on
262     package has been correctly configured. However, unlike with
263     ``Depends``, ``Pre-Depends`` does not permit circular dependencies
264     to be broken. If a circular dependency is encountered while
265     attempting to honor ``Pre-Depends``, the installation will be
266     aborted.
268     ``Pre-Depends`` are also required if the ``preinst`` script depends
269     on the named package. It is best to avoid this situation if
270     possible.
272     ``Pre-Depends`` should be used sparingly, preferably only by
273     packages whose premature upgrade or installation would hamper the
274     ability of the system to continue with any upgrade that might be in
275     progress.
277     You should not specify a ``Pre-Depends`` entry for a package before
278     this has been discussed on the ``debian-devel`` mailing list and a
279     consensus about doing that has been reached. See
280     :ref:`s-dependencies`.
282 When selecting which level of dependency to use you should consider how
283 important the depended-on package is to the functionality of the one
284 declaring the dependency. Some packages are composed of components of
285 varying degrees of importance. Such a package should list using
286 ``Depends`` the package(s) which are required by the more important
287 components. The other components' requirements may be mentioned as
288 Suggestions or Recommendations, as appropriate to the components'
289 relative importance.
291 .. _s-breaks:
293 Packages which break other packages - ``Breaks``
294 ------------------------------------------------
296 When one binary package declares that it breaks another, ``dpkg`` will
297 refuse to allow the package which declares ``Breaks`` to be unpacked
298 unless the broken package is deconfigured first, and it will refuse to
299 allow the broken package to be reconfigured.
301 A package will not be regarded as causing breakage merely because its
302 configuration files are still installed; it must be at least
303 "Half-Installed".
305 A special exception is made for packages which declare that they break
306 their own package name or a virtual package which they provide (see
307 below): this does not count as a real breakage.
309 Normally a ``Breaks`` entry will have an "earlier than" version clause;
310 such a ``Breaks`` is introduced in the version of an (implicit or
311 explicit) dependency which violates an assumption or reveals a bug in
312 earlier versions of the broken package, or which takes over a file from
313 earlier versions of the package named in ``Breaks``. This use of
314 ``Breaks`` will inform higher-level package management tools that the
315 broken package must be upgraded before the new one.
317 If the breaking package also overwrites some files from the older
318 package, it should use ``Replaces`` to ensure this goes smoothly. See
319 :ref:`s-replaces` for a full discussion of taking over
320 files from other packages, including how to use ``Breaks`` in those
321 cases.
323 Many of the cases where ``Breaks`` should be used were previously
324 handled with ``Conflicts`` because ``Breaks`` did not yet exist. Many
325 ``Conflicts`` fields should now be ``Breaks``. See
326 :ref:`s-conflicts` for more information about the
327 differences.
329 .. _s-conflicts:
331 Conflicting binary packages - ``Conflicts``
332 -------------------------------------------
334 When one binary package declares a conflict with another using a
335 ``Conflicts`` field, ``dpkg`` will refuse to allow them to be unpacked
336 on the system at the same time. This is a stronger restriction than
337 ``Breaks``, which prevents the broken package from being configured
338 while the breaking package is in the "Unpacked" state but allows both
339 packages to be unpacked at the same time.
341 If one package is to be unpacked, the other must be removed first. If
342 the package being unpacked is marked as replacing (see
343 :ref:`s-replaces`, but note that ``Breaks`` should
344 normally be used in this case) the one on the system, or the one on the
345 system is marked as deselected, or both packages are marked
346 ``Essential``, then ``dpkg`` will automatically remove the package which
347 is causing the conflict. Otherwise, it will halt the installation of the
348 new package with an error. This mechanism is specifically designed to
349 produce an error when the installed package is ``Essential``, but the
350 new package is not.
352 A package will not cause a conflict merely because its configuration
353 files are still installed; it must be at least "Half-Installed".
355 A special exception is made for packages which declare a conflict with
356 their own package name, or with a virtual package which they provide
357 (see below): this does not prevent their installation, and allows a
358 package to conflict with others providing a replacement for it. You use
359 this feature when you want the package in question to be the only
360 package providing some feature.
362 Normally, ``Breaks`` should be used instead of ``Conflicts`` since
363 ``Conflicts`` imposes a stronger restriction on the ordering of package
364 installation or upgrade and can make it more difficult for the package
365 manager to find a correct solution to an upgrade or installation
366 problem. ``Breaks`` should be used
368 -  when moving a file from one package to another (see
369    :ref:`s-replaces`),
371 -  when splitting a package (a special case of the previous one), or
373 -  when the breaking package exposes a bug in or interacts badly with
374    particular versions of the broken package.
376 ``Conflicts`` should be used
378 -  when two packages provide the same file and will continue to do so,
380 -  in conjunction with ``Provides`` when only one package providing a
381    given virtual facility may be unpacked at a time (see
382    :ref:`s-virtual`),
384 -  in other cases where one must prevent simultaneous installation of
385    two packages for reasons that are ongoing (not fixed in a later
386    version of one of the packages) or that must prevent both packages
387    from being unpacked at the same time, not just configured.
389 Be aware that adding ``Conflicts`` is normally not the best solution
390 when two packages provide the same files. Depending on the reason for
391 that conflict, using alternatives or renaming the files is often a
392 better approach. See, for example, :ref:`s-binaries`.
394 Neither ``Breaks`` nor ``Conflicts`` should be used unless two packages
395 cannot be installed at the same time or installing them both causes one
396 of them to be broken or unusable. Having similar functionality or
397 performing the same tasks as another package is not sufficient reason to
398 declare ``Breaks`` or ``Conflicts`` with that package.
400 A ``Conflicts`` entry may have an "earlier than" version clause if the
401 reason for the conflict is corrected in a later version of one of the
402 packages. However, normally the presence of an "earlier than" version
403 clause is a sign that ``Breaks`` should have been used instead. An
404 "earlier than" version clause in ``Conflicts`` prevents ``dpkg`` from
405 upgrading or installing the package which declares such a conflict until
406 the upgrade or removal of the conflicted-with package has been
407 completed, which is a strong restriction.
409 .. _s-virtual:
411 Virtual packages - ``Provides``
412 -------------------------------
414 As well as the names of actual ("concrete") packages, the package
415 relationship fields ``Depends``, ``Recommends``, ``Suggests``,
416 ``Enhances``, ``Pre-Depends``, ``Breaks``, ``Conflicts``,
417 ``Build-Depends``, ``Build-Depends-Indep``, ``Build-Depends-Arch``,
418 ``Build-Conflicts``, ``Build-Conflicts-Indep`` and
419 ``Build-Conflicts-Arch`` may mention "virtual packages".
421 A *virtual package* is one which appears in the ``Provides`` control
422 field of another package. The effect is as if the package(s) which
423 provide a particular virtual package name had been listed by name
424 everywhere the virtual package name appears. (See also
425 :ref:`s-virtual-pkg`)
427 If there are both concrete and virtual packages of the same name, then
428 the dependency may be satisfied (or the conflict caused) by either the
429 concrete package with the name in question or any other concrete package
430 which provides the virtual package with the name in question. This is so
431 that, for example, supposing we have
435     Package: foo
436     Depends: bar
438 and someone else releases an enhanced version of the ``bar`` package
439 they can say:
443     Package: bar-plus
444     Provides: bar
446 and the ``bar-plus`` package will now also satisfy the dependency for
447 the ``foo`` package.
449 If a relationship field has a version number attached, only real
450 packages will be considered to see whether the relationship is satisfied
451 (or the prohibition violated, for a conflict or breakage). In other
452 words, if a version number is specified, this is a request to ignore all
453 ``Provides`` for that package name and consider only real packages. The
454 package manager will assume that a package providing that virtual
455 package is not of the "right" version. A ``Provides`` field may not
456 contain version numbers, and the version number of the concrete package
457 which provides a particular virtual package will not be considered when
458 considering a dependency on or conflict with the virtual package name.
459 [#]_
461 To specify which of a set of real packages should be the default to
462 satisfy a particular dependency on a virtual package, list the real
463 package as an alternative before the virtual one.
465 If the virtual package represents a facility that can only be provided
466 by one real package at a time, such as the mail-transport-agent virtual
467 package that requires installation of a binary that would conflict with
468 all other providers of that virtual package (see
469 :ref:`s-mail-transport-agents`), all packages providing
470 that virtual package should also declare a conflict with it using
471 ``Conflicts``. This will ensure that at most one provider of that
472 virtual package is unpacked or installed at a time.
474 .. _s-replaces:
476 Overwriting files and replacing packages - ``Replaces``
477 -------------------------------------------------------
479 Packages can declare in their control file that they should overwrite
480 files in certain other packages, or completely replace other packages.
481 The ``Replaces`` control field has these two distinct purposes.
483 .. _s7.6.1:
485 Overwriting files in other packages
486 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
488 It is usually an error for a package to contain files which are on the
489 system in another package. However, if the overwriting package declares
490 that it ``Replaces`` the one containing the file being overwritten, then
491 ``dpkg`` will replace the file from the old package with that from the
492 new. The file will no longer be listed as "owned" by the old package and
493 will be taken over by the new package. Normally, ``Breaks`` should be
494 used in conjunction with ``Replaces``.  [#]_
496 For example, if a package foo is split into foo and foo-data starting at
497 version 1.2-3, foo-data would have the fields
501     Replaces: foo (<< 1.2-3)
502     Breaks: foo (<< 1.2-3)
504 in its control file. The new version of the package foo would normally
505 have the field
509     Depends: foo-data (>= 1.2-3)
511 (or possibly ``Recommends`` or even ``Suggests`` if the files moved into
512 foo-data are not required for normal operation).
514 If a package is completely replaced in this way, so that ``dpkg`` does
515 not know of any files it still contains, it is considered to have
516 "disappeared". It will be marked as not wanted on the system (selected
517 for removal) and "Not-Installed". Any ``conffile``\ s details noted for
518 the package will be ignored, as they will have been taken over by the
519 overwriting package. The package's ``postrm`` script will be run with a
520 special argument to allow the package to do any final cleanup required.
521 See :ref:`s-mscriptsinstact`.  [#]_
523 For this usage of ``Replaces``, virtual packages (see
524 :ref:`s-virtual`) are not considered when looking at a
525 ``Replaces`` field. The packages declared as being replaced must be
526 mentioned by their real names.
528 This usage of ``Replaces`` only takes effect when both packages are at
529 least partially on the system at once. It is not relevant if the
530 packages conflict unless the conflict has been overridden.
532 .. _s7.6.2:
534 Replacing whole packages, forcing their removal
535 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
537 Second, ``Replaces`` allows the packaging system to resolve which
538 package should be removed when there is a conflict (see
539 :ref:`s-conflicts`). This usage only takes effect when
540 the two packages *do* conflict, so that the two usages of this field do
541 not interfere with each other.
543 In this situation, the package declared as being replaced can be a
544 virtual package, so for example, all mail transport agents (MTAs) would
545 have the following fields in their control files:
549     Provides: mail-transport-agent
550     Conflicts: mail-transport-agent
551     Replaces: mail-transport-agent
553 ensuring that only one MTA can be unpacked at any one time. See
554 :ref:`s-virtual` for more information about this example.
556 .. _s-sourcebinarydeps:
558 Relationships between source and binary packages - ``Build-Depends``, ``Build-Depends-Indep``, ``Build-Depends-Arch``, ``Build-Conflicts``, ``Build-Conflicts-Indep``, ``Build-Conflicts-Arch``
559 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
561 Source packages that require certain binary packages to be installed or
562 absent at the time of building the package can declare relationships to
563 those binary packages.
565 This is done using the ``Build-Depends``, ``Build-Depends-Indep``,
566 ``Build-Depends-Arch``, ``Build-Conflicts``, ``Build-Conflicts-Indep``
567 and ``Build-Conflicts-Arch`` control fields.
569 Build-dependencies on "build-essential" binary packages can be omitted.
570 Please see :ref:`s-pkg-relations` for more information.
572 The dependencies and conflicts they define must be satisfied (as defined
573 earlier for binary packages) in order to invoke the targets in
574 ``debian/rules``, as follows:
576 ``clean``
577     Only the ``Build-Depends`` and ``Build-Conflicts`` fields must be
578     satisfied when this target is invoked.
580 ``build-arch``, and ``binary-arch``
581     The ``Build-Depends``, ``Build-Conflicts``, ``Build-Depends-Arch``,
582     and ``Build-Conflicts-Arch`` fields must be satisfied when these
583     targets are invoked.
585 ``build-indep``, and ``binary-indep``
586     The ``Build-Depends``, ``Build-Conflicts``, ``Build-Depends-Indep``,
587     and ``Build-Conflicts-Indep`` fields must be satisfied when these
588     targets are invoked.
590 ``build`` and ``binary``
591     The ``Build-Depends``, ``Build-Conflicts``, ``Build-Depends-Indep``,
592     ``Build-Conflicts-Indep``, ``Build-Depends-Arch``, and
593     ``Build-Conflicts-Arch`` fields must be satisfied when these targets
594     are invoked.
596 .. _s-built-using:
598 Additional source packages used to build the binary - ``Built-Using``
599 ---------------------------------------------------------------------
601 Some binary packages incorporate parts of other packages when built but
602 do not have to depend on those packages. Examples include linking with
603 static libraries or incorporating source code from another package
604 during the build. In this case, the source packages of those other
605 packages are a required part of the complete source (the binary package
606 is not reproducible without them).
608 A ``Built-Using`` field must list the corresponding source package for
609 any such binary package incorporated during the build,  [#]_ including
610 an "exactly equal" ("=") version relation on the version that was used
611 to build that binary package.  [#]_
613 A package using the source code from the gcc-4.6-source binary package
614 built from the gcc-4.6 source package would have this field in its
615 control file:
619     Built-Using: gcc-4.6 (= 4.6.0-11)
621 A package including binaries from grub2 and loadlin would have this
622 field in its control file:
626     Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
628 .. [#]
629    The relations ``<`` and ``>`` were previously allowed, but they were
630    confusingly defined to mean earlier/later or equal rather than
631    strictly earlier/later. ``dpkg`` still supports them with a warning,
632    but they are no longer allowed by Debian Policy.
634 .. [#]
635    This approach makes dependency resolution easier. If two packages A
636    and B are being upgraded, the installed package A depends on exactly
637    the installed package B, and the new package A depends on exactly the
638    new package B (a common situation when upgrading shared libraries and
639    their corresponding development packages), satisfying the
640    dependencies at every stage of the upgrade would be impossible. This
641    relaxed restriction means that both new packages can be unpacked
642    together and then configured in their dependency order.
644 .. [#]
645    It is possible that a future release of ``dpkg`` may add the ability
646    to specify a version number for each virtual package it provides.
647    This feature is not yet present, however, and is expected to be used
648    only infrequently.
650 .. [#]
651    To see why ``Breaks`` is normally needed in addition to ``Replaces``,
652    consider the case of a file in the package foo being taken over by
653    the package foo-data. ``Replaces`` will allow foo-data to be
654    installed and take over that file. However, without ``Breaks``,
655    nothing requires foo to be upgraded to a newer version that knows it
656    does not include that file and instead depends on foo-data. Nothing
657    would prevent the new foo-data package from being installed and then
658    removed, removing the file that it took over from foo. After that
659    operation, the package manager would think the system was in a
660    consistent state, but the foo package would be missing one of its
661    files.
663 .. [#]
664    Replaces is a one way relationship. You have to install the replacing
665    package after the replaced package.
667 .. [#]
668    ``Build-Depends`` in the source package is not adequate since it
669    (rightfully) does not document the exact version used in the build.
671 .. [#]
672    The archive software might reject packages that refer to non-existent
673    sources.