[CMake] RPM package %config noreplace causes conflict

hce jupiter.hce at gmail.com
Fri Aug 24 07:06:34 EDT 2012


Hi,

i use install(FILE ..) to install a configuration file config.txt by both
RPM packages A.rpm and B.rpm, due to the name and version in config.txt, the
config.txt is not exactly the same in A.rpm and B.rpm. Now I've got an file
conflict error when A.rpm was installed, B.rpm failed the installation. I
actually don't mind if the config.txt can be overriten or not as long as it
is there.

The install(FILE ...) actually generates "%config config.txt" in the spec
for not overwriting the file if the file exists. I guess because those two
config.txt are different which causing conflic error. But I actually don't
mind if the config.txt can be overriten or not as long as it is there. I
know I can use --force in rpm command to force installation, but don't want
to tell every body to use extra parameter to install packages.

Is there any function in cmake I can use to force overwriting the
configuration file if it exists? 

Thank you.

Kind regards,

Jupiter





--
View this message in context: http://cmake.3232098.n2.nabble.com/RPM-package-config-noreplace-causes-conflict-tp7581368.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list