[Fedora-packaging] Arch-specific Requires

Tom "spot" Callaway tcallawa at redhat.com
Wed Jul 7 13:28:53 UTC 2010


On 07/06/2010 10:56 PM, Braden McDaniel wrote:
> Actually... Wouldn't "Requires: foo" be satisfied by either "Provides:
> foo.i386" or "Provides: foo.x86_64"?  Or am I mistaken about this?

If you have:

Requires: foo

In modern Fedora, packages generate autoprovides like this:

foo-1.2-3.i686.rpm
======================
foo = 1.2-3
foo(x86-32) = 1.2-3

foo-1.2-3.x86_64.rpm
======================
foo = 1.2-3
foo(x86-64) = 1.2-3

This means that either package will satisfy that Requires. If the
package has:

Requires: foo%{?_isa}

At build time, %{?_isa} is evaluated to match the architecture and
bitsize, so, on i386, it evaluates to:

Requires: foo(x86-32)

and on x86_64, it evaluates to:

Requires: foo(x86-64)

In this situation, only the foo package which exactly matches the
architecture will have the matching provides, so there is no chance for
a mismatch.

~spot


More information about the packaging mailing list