Chapter 7. Declaring relationships between packages
47
For this reason packages in an installation run are usually all unpacked first and all config
ured later; this gives later versions of packages with dependencies on later versions of other
packages the opportunity to have their dependencies satisfied.
The
Depends
field thus allows package maintainers to impose an order in which packages
should be configured.
The meaning of the five dependency fields is as follows:
Depends
This declares an absolute dependency. A package will not be configured unless all
of the packages listed in its
Depends
field have been correctly configured.
The
Depends
field should be used if the depended on package is required for the de
pending package to provide a significant amount of functionality.
The
Depends
field should also be used if the
postinst
,
prerm
or
postrm
scripts re
quire the package to be present in order to run. Note, however, that the
postrm
cannot
rely on any non essential packages to be present during the
purge
phase.
Recommends
This declares a strong, but not absolute, dependency.
The
Recommends
field should list packages that would be found together with this one
in all but unusual installations.
Suggests
This is used to declare that one package may be more useful with one or more
others. Using this field tells the packaging system and the user that the listed packages
are related to this one and can perhaps enhance its usefulness, but that installing this one
without them is perfectly reasonable.
Enhances
This field is similar to Suggests but works in the opposite direction. It is used to
declare that a package can enhance the functionality of another package.
Pre Depends
This field is like
Depends
, except that it also forces
dpkg
to complete instal
lation of the packages named before even starting the installation of the package which
declares the pre dependency, as follows:
When a package declaring a pre dependency is about to be unpacked the pre dependency
can be satisfied if the depended on package is either fully configured, or even if the
depended on package(s) are only unpacked or half configured, provided that they have
been configured correctly at some point in the past (and not removed or partially re
moved since). In this case, both the previously configured and currently unpacked or
half configured versions must satisfy any version clause in the
Pre Depends
field.
When the package declaring a pre dependency is about to be configured, the pre
dependency will be treated as a normal
Depends
, that is, it will be considered satisfied
only if the depended on package has been correctly configured.
Pre Depends
should be used sparingly, preferably only by packages whose premature
upgrade or installation would hamper the ability of the system to continue with any
upgrade that might be in progress.
Pre Depends
are also required if the
preinst
script depends on the named package.
It is best to avoid this situation if possible.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved