From Fedora Project Wiki

< PackagingDrafts

Revision as of 19:06, 20 February 2009 by Toshio (talk | contribs) (Update with FESCo feedback)

Addition to ReviewGuidelines

MUST: A package's list of dependencies must not contain any unnecessary explicit Requires on libraries.

Addition to Packaging Guidelines

Explicit Requires

Packages must not contain explicit Requires within the spec file, except when absolutely necessary. Any non-obvious explicit Requires should be explained with comments in the spec file.

In particular, we rely on rpmbuild's automatically added dependencies on library SONAMEs. Modern package management tools are capable of resolving such dependencies to determine the required packages. Explicit dependencies on specific package names may aid the inexperienced user, who attempts at installing RPM packages manually. However, history has shown that such dependencies add confusion when library/files are moved from one package to another, when packages get renamed, when one out of multiple alternative packages would suffice, and when versioned explicit dependencies become out-of-date and inaccurate. Additionally, in some cases, old explicit dependencies on package names require unnecessary updates/rebuilds. For example, Fedora packages are only required to retain historical provides for two full release cycles.

Exemplary rationale for a versioned explicit dependency:

  # The automatic dependency on libfubar.so.1 is insufficient,
  # as we strictly need at least the release that fixes two segfaults.
  Requires: libfubar >= 0:1.2.3-7

Packagers should revisit an explicit dependency as appropriate to avoid that it becomes inaccurate and superfluous.