[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpmorig/rpmnew



On Tue, May 27, 2003 at 05:40:02PM -0500, Justin Georgeson wrote:
> I'm curious about how RPM determines when to write an rpmorig or rpmnew 
> file. I recently upgraded from Psyche to shrike (using apt from 
> freshrpms) and was left with a bunch of rpmorig and rpmnew files. What I 
> found irritating about it was that the vast majority of them were 
> identical to the existing files in question. Wouldn't it make sense to 
> not create these files when there's no change?

The .rpmorig suffix is added if a file to be installed that is marked
with "%config" is found on the file system but is not "owned" by any package.
Basically the original file "foo" is renamed to "foo.rpmorig".

The .rpmnew suffix is added if a file to be installed is marked with
"%config(noreplace)" and the local file is modified wrto the original
md5sum. Basically the incoming file is installed as "foo.rpmnew" rather
than "foo".

There's also the .rpmsave suffix, added to the original file file if
modified, owned by package, and marked "%config". Basically, the
local mods to a package file "foo" are saved in "foo.rpmsave".

All but .rpmorig about involve explcict detection of local modifications.
There's no way (in general) to detect modifications to an unowned
file because there is no unambiguous reference point to identify "modified".
The file is renamed just in case.

Note that more than md5sum is involved, there's also mtime, user, group,
perms, and other stat(2) info that is involved in detecting "modified".

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []