Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two rpm packages wich should not get installed together.

After googling around i assume there is no RequiresNot tag or something similar to specify incompatible packages in a specfile.

What is the best solution to prevent installing them together?

Currently i'm using rhel but i would prefer a solution wich is not rhel/yum related (eq using: exclude=packageA in repo.conf).

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

There is a tag that can be used in a spec file to explicitly disallow two conflicting packages to be installed:

The conflicts Tag

The conflicts tag is the logical complement to the requires tag. It is used to specify which packages conflict with the current package. RPM will not permit conflicting packages to be installed unless overridden with the --nodeps option.

The conflicts tag has the same format as requires. It accepts a real or virtual package name and can optionally include version and release specifications or a serial number.

share|improve this answer
    
This answer is perfect. I did overlook that... –  jgb Jul 3 '13 at 9:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.