Restore .pacsave file if present - WORK IN PROGRESS
Aaron Griffin wrote:
> On Jan 13, 2008 6:48 AM, Allan McRae <firstname.lastname@example.org> wrote:
>> In continuing to misjudge what would be an easy bug to fix I had an
>> attempt at FS#8645 - Restore pacsaves on install . The attached patch
>> is a definite work in progress.
>> I have two queries:
>> 1) Would it be better to notify the user of the restore or to query
>> them. Either way they will get a notification about the new file being
>> installed to .pacsave. I'm leaning on query here because that would
>> allow the user to stop really old files being restored.
>> 2) Should I worry about the case where a file used to be backed up but
>> is not now. This seems an edge case but would result in the file being
>> restored then overwritten (I think.... I need to look at that further).
> Hrm, what happens if, I install foo-1.0, uninstall it, then later
> reinstall foo-2.0 which has a totally different config format. We
> wouldn't be storing the OLD md5sum for the config file if a package is
> Perhaps we should actually ask the user, due to that case.
Yes, thats what I was getting at in 1). For 2) I meant files that used
to be in the backup array and no longer are were getting overwritten.
Anyway, I have reworked this so that the user gets queried to restore a
pacsave file and the file to be extracted now always gets saved as
.pacnew. I will probably finish tiding this up at the weekend once I
have tested it some more.
pacman-dev mailing list