[pacman-dev] Provides/replaces fields and backup files

Allan McRae allan at archlinux.org
Sun May 9 08:53:58 CEST 2010

On 09/05/10 06:32, Xavier Chantry wrote:
> On Sat, May 8, 2010 at 9:21 PM, Nezmer<arch at nezmer.info>  wrote:
>> Hi,
>> Suppose package B replaces package A. Both packages share the same
>> content with minor differences. They both have many backup files with
>> the same initial content.
>> When package B replaces package A. Modified backup files will move to
>> <backupfile.pacsave>.
>> What If pacman could check for initial content of the backup files for
>> both packages and If the content is the same, treat those backup files
>> as If the process is a package upgrade not a package replacement.
>> This is a real-life example. Packages A and B contain files like
>> "/etc/passwd" and "/etc/group". So not moving the files to ".pacsave"
>> adds more than a convenience for the lazy.
>> My C skills are next-to-zero so unfortunately I can't help coding this.
>> Do you consider this a valid minor bug?
> It's not a bug, but it's a valid feature request.
>> Should I report this to flyspray?
> You can, but that won't ensure that someone will work on it either.
> There has been this idea floating around for years that backup
> handling was another area that needed a full rewrite, and the proposal
> was basically to always move backup files to .pacsave on removal, and
> to restore them on upgrade/replace/install, i.e. handle these 3
> different cases in an uniform way.

I remember a patch I wrote a long time ago....  it restored .pacsave 
files on reinstall of a package.  There were issues with problems caused 
by it being a very long time between package removal and install making 
the config file better to be not restored  (which is not the case in the 
replace example).  It is somewhere in the archives here (I think a link 
should be in the bug report).   Note I may have broken some pactests 
with that patch....


More information about the pacman-dev mailing list