Restore .pacsave file if present - WORK IN PROGRESS
Hi,
In continuing to misjudge what would be an easy bug to fix I had an attempt at FS#8645 - Restore pacsaves on install [1]. 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). Cheers, Allan [1] http://bugs.archlinux.org/task/8645 _______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev |
Restore .pacsave file if present - WORK IN PROGRESS
On Jan 13, 2008 6:48 AM, Allan McRae <allan.mcrae@qimr.edu.au> wrote:
> Hi, > > In continuing to misjudge what would be an easy bug to fix I had an > attempt at FS#8645 - Restore pacsaves on install [1]. 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 uninstalled. Perhaps we should actually ask the user, due to that case. _______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev |
Restore .pacsave file if present - WORK IN PROGRESS
Aaron Griffin wrote:
> On Jan 13, 2008 6:48 AM, Allan McRae <allan.mcrae@qimr.edu.au> wrote: > >> Hi, >> >> In continuing to misjudge what would be an easy bug to fix I had an >> attempt at FS#8645 - Restore pacsaves on install [1]. 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 > uninstalled. > > 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. Allan _______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev |
| All times are GMT. The time now is 01:51 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.