Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Let's assume I have two RPM packages named 1.rpm and 2.rpm. Both of them want to put a file test into /usr/bin, but both of them use a different version of test. Of course I would like to have both RPMs installed on the same machine.

What would be official behavior of RedHat (let it be RHEL5) in described situation?

share|improve this question

migrated from serverfault.com Sep 25 '13 at 13:49

This question came from our site for professional system and network administrators.

    
The first package will install fine, the second will complain that it's trying to modify a file owned by another package. If you try to install them together, the installation should complain that a file is owned by both packages, and neither should install. –  MadHatter Sep 23 '13 at 9:22

1 Answer 1

up vote 6 down vote accepted

Assuming these are home-brewed RPMs, rewrite your spec files to install the executables under a versioned name, say test-1.2 and test-2.1, and use the update-alternatives(8) system to configure one of them for system-wide usage.

This is the policy followed by RHEL for the java executables, for example.

share|improve this answer

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.