LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-11-2004, 05:30 AM   #1
charrua
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
preserve configuration files during RPM upgrade (rpm -U)


Original file = X, Current file = Y, New file = Z
Here the original file was modified at some point. The new file is different from both the original and the modified versions of the original file.

RPM is not able to analyze the contents of the files, and determine what is going on. In this instance, it takes the best possible approach. The new file is known to work properly with the rest of the software in the new package — at least the people building the new package should have insured that it does. The modified original file is an unknown: it might work with the new package, it might not. So RPM installs the new file.

BUT… The existing file was definitely modified. Someone made an effort to change the file, for some reason. Perhaps the information contained in the file is still of use. Therefore, RPM saves the modified file, naming it <file>.rpmsave, and prints a warning, so the user knows what happened: warning: /etc/skel/.bashrc saved as /etc/skel/.bashrc.rpmsave




Hi

We have a configuration file (i.e.: <some path>/<some file>) delivered with package <name>-<release_r1>-<build_b1> (let's name it X); after the package installation this file is modified (let's name it Y); thereafter it is brought again (having different contents from X and Y) with <name>-<release_r2>-<build_b2> (let's name it Z)

We perform rpm -i <name>-<release_r1>-<build_b1>; then modify <some path>/<some file> configuration file; finally we execute rpm -U <name>-<release_r2>-<build_b2>



As expected "RPM installs the new file" (Z) , but it does not save the existing file (Y)

Why?
 
Old 03-11-2004, 01:06 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,346

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"As expected "RPM installs the new file" (Z) , but it does not save the existing file (Y)

Why?"

This is not a function of the rpm program per se. rpm is acting on the instructions given to it by the person who built the rpm package. So the question shifts to "Why did the blooming idiot do it that way?" Your guess is as good as mine.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-14-2004, 09:47 AM   #3
charrua
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Hi jailbait,

rpm -U did not save the modified file (Y)
it just deployed the new file (Z)

what am i doing wrong?
please explain.
 
Old 03-14-2004, 01:18 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,346

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"rpm -U did not save the modified file (Y)
it just deployed the new file (Z)

what am i doing wrong?
please explain."

You aren't doing anything wrong. The person who set up the rpm probably should not be deploying the file you call Z. In any case the solution to the mess is for your distributor to create smarter update rpms.

The file Y was originally set up by either your distribution's installer or by your distribution's control program such as YaST2 in SuSE. You can fix up the file by looking at Y and Z and deciding what to do. Perhaps you want to use Y or perhaps you want to merge the information in Y and Z.

Or you can use Z and run your distributions control program to make the necessary changes to Z.

Personally when I run into this situation I almost always just use Y and delete Z but it varies on a case by case basis.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm 4.0.3 upgrade to 4.0.4 under 7.2 rattlesnake0407 Red Hat 1 09-16-2005 08:52 PM
How to upgrade kernel but preserve configuration? Avatar Mandriva 8 12-30-2004 06:33 AM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM
Difference between src.rpm files and source.rpm files ja_nch Red Hat 2 09-06-2003 06:12 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration