LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   RPM file conflict when installing a set of files to the same directory as another RPM package (https://www.linuxquestions.org/questions/red-hat-31/rpm-file-conflict-when-installing-a-set-of-files-to-the-same-directory-as-another-rpm-package-4175564067/)

brigitor 01-15-2016 06:26 PM

RPM file conflict when installing a set of files to the same directory as another RPM package
 
I've started developing on my product's existing RPM package. Recently, we ran into an issue where our installs fail on RH7.x when we have another one of our products is installed.

Example:
rpm -ivh ProductA.x86_64.rpm
Preparing... ################################# [100%]
file /opt/tivoli/tsm/client/ba/bin from install of ProductA.x86_64 conflicts with file from package ProductB.x86_64
file /opt/tivoli/tsm/client/ba/bin/plugins from install of ProductA.x86_64 conflicts with file from package ProductB.x86_64

The ProductB.x86_64 package has installed files in "/Product/bin/plugins" but its contents are different from the directory in ProductA.x86_64. This is intentional and it has worked for both of our products in earlier versions of RH.

I am aware that we can use --replacefiles to resolve this but this method is not preferred.

Why is RPM erroring out in RH7.x?

Keruskerfuerst 01-16-2016 10:57 AM

Can you post the content of both packages?

brigitor 01-19-2016 11:54 AM

Here are the contents of the directories relevant to the issue:

Product A:
/opt/tivoli/tsm/client/ba/bin/plugins/libBA64.so

Product B:
/opt/tivoli/tsm/client/ba/bin/plugins/libPiDOM64.so

unSpawn 01-19-2016 03:19 PM

...not completely. There's already a load of TSM packages installed that own leading directories in /opt/tivoli/tsm/client. Furthermore there's multiple plugins (Vcloud, NetApp) that use /opt/tivoli/tsm/client/ba/bin/plugins or subdirs. So you can not have any of your own .spec or RPM files own "/opt/tivoli/tsm/client/ba/bin/plugins" in your %dir list. If you build a package per plugin then I'd think something like:
Code:

%define _datadir /opt/tivoli/tsm/client/ba/bin/plugins

%files
%{_datadir}/*

should work as it only includes the file and not the leading directories. If that doesn't work you'll have to post your complete .spec file.

brigitor 01-19-2016 06:51 PM

Fortunately, this works! Thanks!


All times are GMT -5. The time now is 12:53 PM.