Handling configuration files is a pretty well understood process and  
there's good code in all of the modern open source package managers.   
For example, if you use rpm then it compares MD5 checksums of the  
ostensible original file, the current file, and the new file.  See for  
instance http://www.rpm.org/max-rpm/ch-rpm-upgrade.html

In the case of a collision (original!=current!=new), RPM's approach is

> 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:

I believe this is the best approach even if you aren't using RPM (or  
apt or smart or whatever)

[personally, I think DSpace should be available as a .rpm.  Let's get  
over the NIH mentality.]

JQ Johnson
Director, Scholarly Communications and Instructional Support
University of Oregon Libraries
1299 University of Oregon               T: 541-346-1746; F: -3485
Eugene, OR  97403-1299          email: [EMAIL PROTECTED]
http://libweb.uoregon.edu               office: 115F Knight Library


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to