Niraj Nandane
Niraj Nandane

Reputation: 1458

Dynamic Requires section in RPM based on installation environment

On my setup, where RPM will be installed, will have a file below:

#cat /etc/setup-details
environment=QA
#

Now, if environment is QA, i want below Requires:

Requires: my-qa-rpm

If environment is dev, i want below Requires:

Requires: my-dev-rpm

How to achieve dynamic Requires in RPM based on environment?

Upvotes: 1

Views: 75

Answers (1)

Danila Vershinin
Danila Vershinin

Reputation: 9855

There isn't such a thing as dynamic requires that you are requesting. The only workaround is creating two packages (each with proper Requres:) then install the correct package by checking the value in the file (via bash script).

Upvotes: 2

Related Questions