Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got an RPM that overlays particular files delivered by another package. What I'd like to do is tell RPM "if 'directory/file' exists and you're about to overwrite it, rename it to "filename.backup" first.

It doesn't look like %pre gets to know which %files are delivered by the RPM. Is there a way or keeping backups of original files that I'm missing?

share|improve this question

1 Answer 1

This is a bad idea. What happens when the initial package gets updated? Your changes are likely to get reverted.

I'd try to repackage the initial package with your edits versus trying to fold another package on top of the original.

Sorry if this doesn't answer your question directly but something for you to consider.

See also, config files, noreplace, etc:

http://fedoraproject.org/wiki/PackagingGuidelines#Configuration_files

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.