How can I use the RPM Boolean Dependencies like if ${_arch} == "x86_64"

Solution Unverified - Updated -

Issue

  • The RPM Boolean Dependencies was introduced in Red Hat Enterprise Linux 8.
  • I wanted to apply a dependency for a specific architecture.
  • %ifarch and %endif can be used for the purpose, but it's written in multiple lines.
  • I wanted to write it in one line simply with the RPM Boolean Dependencies.
  • I used the following statement for a weak dependency, but it didn't work.
Recommend: <dependency> if ${_arch} == "x86_64"

Environment

Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content