Reputation: 21
My product is already installed and i want to upgrade it. Now my upgrade contains only one file where as the actual product contain a directory structure with more number of file.
Now when i am using rpm -Uvh abc.x86_64.rpm
it is removing all the older files and putting this single file which is in new upgrade patch.
Spec file was written with %pre, %post
scripts but is of no use.
I have tried taking backup of old software with %pre
section except the file to be upgrade and after installation with the help of %post
section i am trying to restore the backed up files except the upgraded file.
By doing as above upgrade is not working.
I need help to fix this issue. Any pointers??
Upvotes: 2
Views: 8385
Reputation: 1440
The new (upgraded) version of your RPM should include all the files that the old one contains, plus whatever changes you may have to the files, or file in your case. You should then be bumping the revision number up by one and building the RPM. This will result in a smooth upgrade path where all the old files still exist, but the changes that you need are properly applied. I think you should take a look at Fedora's documentation as you seem to be confused regarding how the RPM upgrade process works.
Upvotes: 2