5

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).

jgb
  • 103
  • 7

1 Answers1

6

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.

dawud
  • 14,918
  • 3
  • 41
  • 61