Libzypp/Dependencies

Şuraya atla: kullan, ara

Supported Dependencies

All Resolvables are treated alike during dependency resolution. There is no semantical difference between different kinds of Resolvables.

This page describes the possible dependencies a Resolvable can express and their semantics.

It is heavily based on rpm (for the strong dependencies) and debian (for the weak dependencies).
The reverse dependencies were made on suggestion by Michael Schroeder.

If in doubt, look at RPM and Debian.

Definition of words

  • Edition

The combination of epoch, version, and release. Just like RPM. i.e. 1.0-42 or 1:1.47-11

  • Capability

A name with an optional operator and an edition. i.e. foo, foo = 1.0-42, bar > 1.47

  • Dependency

A combination of capabilities and a what (i.e. Requires, Provides, ...)

Strong dependencies

  • Requires

An absolute dependencies. All requirements must be fulfilled.

  • Provides

Capabilities this resolvable provides. They can be used to match Requires from others.

Every Resolvable has a self-provide by default, its own name and edition. i.e package bar-1.42-1 provides capability bar = 1.42-1

  • Conflicts

This Resolvable cannot be installed if another Resolvable is installed and provides matching capabilities

  • Obsoletes

When this Resolvable is installed, it will uninstall any other Resolvable with a matching name.

Weak dependencies

  • Recommends

A weak Requires. A best-try approach is made to fulfill Recommends but they are silently dropped if no match is possible.

  • Suggests

Suggests are just hints for an application and not handled during dependency resolution.
Kind of Amazon-style customers who bought this also looked at that

Conditional dependencies

  • Freshens

Freshens define the relationship between an uninstalled Resolvable and an installed one. If an uninstalled resolvable defines a freshen dependency, it is only considered for installation if an installed resolvable matches.

Its primary use is for Patches which express via freshen when they are to be considered.

Reverse dependencies

Unlike the above mentioned dependencies, which are kind-of top-down, the following dependencies work the other way around. Read on.

  • Essentialfor

A reverse requires.

This resolvable must be installed if this capability is provided by an installed resolvable.

Uninstalling it will produce an error (which the user can ignore ...)

  • supplements

A reverse recommends.

This resolvable will be installed if this capability is provided by an installed resolvable.

The dependency resolver will install it. Uninstalling it is silently accepted.

  • enhances

A reverse suggests.

This resolvable can be installed if this capability is provided by an installed resolvable.

Its just a hint for an application. I.e. SuSEplugger can suggest packages for installation if a specific hardware is found.

Kernel Dependant Packages and Enhances

For kernel-dependant packages, enhances is important in order to give the right hint to the solver when multiple packages provide the same capability.

REMARK: This is just a (bad) example. For kernel driver packages, which depend on hardware and kernel, modalias(...) provides should be used instead.


Example:

tpctl, an application, requires tpctl-kmp, a kernel dependant package. However, there is no tpctl-kmp packages, but multiple ones providing this tag.

== tpctl-kmp-default provides tpctl-kmp but depends on (requires) kernel-default

==

== tpctl-kmp-smp provides tpctl-kmp but depends on (requires) kernel-smp

==

== tpctl-kmp-bigsmp provides tpctl-kmp but depends on (requires) kernel-bigsmp

==

When trying to fulfill the dependency tpctl-kmp there is no way for the solver to choose the right package. It can only evaluate all three possibilities, which in turn drag in extra kernel packages due to requirements. A user might know that extra kernels are not wanted, but to the solver its a normal package dependency which must be honored.

So the solver needs some extra information in order to decide which of the tpctl-kmp-* packages is the right one. This should be done by adding enhances:

== tpctl-kmp-default enhances kernel-default

==

== tpctl-kmp-smp enhances kernel-smp

==

== tpctl-kmp-bigsmp enhances kernel-bigsmp

==

Combining Freshens/Supplements Dependencies with "AND"

Supplements and Freshens are both reverse dependencies. Multiple reverse dependencies (i.e. freshens: foo bar) are combined via 'or'.

However, here we need an 'and' expression since the package should only be installed if dependency A and dependency B match.

e.g. kernel-flavor _and_ modalias(...) match

Currently we are reaching this taget by a combination of freshens and supplements.

Example: freshens: foo bar

supplements: donald duck

This is evaluated as (foo OR bar) AND (donald OR duck)


back ...

Last edit in Trac '06/27/06 17:02:50' by 'schubi'


Last edit in Trac '06/27/06 17:02:50' by 'schubi'


Last edit in Trac '06/27/06 17:02:50' by 'schubi'


Last edit in Trac '06/27/06 17:02:50' by 'schubi'


Last edit in Trac '06/27/06 17:02:50' by 'schubi'