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

Re: rpmorig/rpmnew




Jeff Johnson wrote:
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".

Hm, maybe I didn't pay enough attention to the set of packages. It seems odd to me that doing an upgrade would install so many new packages. It's also odd that I had so many unowned config files. I would have thought they would be saved as rpmsave files when I uninstalled the package. (I tend to keep away from installing from source or precompiled binaries and such)


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".

That one makes sense to me.


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.

Seems logical.


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".

Well that would explain a lot. All I did was compare file size and contents.


Thanks.





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