Hi, I want to overwrite a file from another package during the installation of another RPM I am building. I'm trying to overwrite the other package's file without associating the new version with the new RPM. It's essentially a 'patch' that neither RPM cares too much about, but I want to include it with my RPM.
I don't want to have to use the force option when installing the rpm.
I've tried using this:
Code:
%install
...
install -b -m 755 $RPM_BUILD_DIR/%{name}-%{version}/replacement.file $RPM_BUILD_ROOT/fileto.replace
Which reports a conflict, and...
Code:
%install
...
cp -f $RPM_BUILD_DIR/%{name}-%{version}/replacement.file $RPM_BUILD_ROOT/fileto.replace
which also reports a conflict, and...
Code:
%post
...
cp -f $RPM_BUILD_DIR/%{name}-%{version}/replacement.file $RPM_BUILD_ROOT/fileto.replace
Which doesn't work because at this point it's not using the RPM build directories.
I have done this before by installing the new file to a different location and then overwriting the other package's file in the post install script, but I would prefer to simply replace it outright during the install if possible.
Suggestions?
Thanks,
-rockfx01