PackagingDrafts/ArchSpecificRequires

From FedoraProject

< PackagingDrafts(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Draft}} == Rationale == rpm/yum treat a dependency (Requires) on "foo" as satisfiable by any available foo, regardless of architecture. The consequence of this is that on mult...')
 
Line 2: Line 2:
  
 
== Rationale ==
 
== Rationale ==
rpm/yum treat a dependency (Requires) on "foo" as satisfiable by any available foo, regardless of architecture. The consequence of this is that on multilib systems, when the architecture of a dependency has not been specified (even though it is important), yum can install the wrong architecture build of the dependency--resulting in, most likely, a nonfunctional installation.  This appears to happen when, for some reason, the correct architecture is not available to yum.
+
rpm/yum treat a dependency (Requires) on &ldquo;foo&rdquo; as satisfiable by any available foo, regardless of architecture. The consequence of this is that on multilib systems, when the architecture of a dependency has not been specified (even though it is important), yum can install the wrong architecture build of the dependency&mdash;resulting in, most likely, a nonfunctional installation.  This appears to happen when, for some reason, the correct architecture is not available to yum.
  
 
== Making Requires Arch-Specific ==
 
== Making Requires Arch-Specific ==

Revision as of 07:00, 29 September 2009

Warning (medium size).png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Rationale

rpm/yum treat a dependency (Requires) on “foo” as satisfiable by any available foo, regardless of architecture. The consequence of this is that on multilib systems, when the architecture of a dependency has not been specified (even though it is important), yum can install the wrong architecture build of the dependency—resulting in, most likely, a nonfunctional installation. This appears to happen when, for some reason, the correct architecture is not available to yum.

Making Requires Arch-Specific

Requires can be made arch-specific by appending the macro %{?_isa} to the package name. For instance,

Requires: foo

becomes

Requires: foo%{?_isa}

When To Do It

If a dependency really can be satisfied by a build for any architecture, clearly there's no reason to make the dependency architecture-specific. But it does matter in these scenarios:

  • A library in the dependency is dlopen'd.
  • A non-noarch -devel package depends on another -devel package.
  • A non-noarch subpackage's dependency on its main package.