[pacman-dev] [PATCH] db_register: Unlink DbPath/database, if it is not a directory

Xavier shiningxc at gmail.com
Mon Jan 19 17:10:05 EST 2009


On Mon, Jan 19, 2009 at 1:12 PM, Xavier <shiningxc at gmail.com> wrote:
> On Mon, Jan 19, 2009 at 12:57 AM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
>> >From 884155e03bf20f1cca880f39848423091729f6cd Mon Sep 17 00:00:00 2001
>> From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
>> Date: Mon, 19 Jan 2009 00:35:45 +0100
>> Subject: [PATCH] db_register: Unlink DbPath/database, if it is not a directory
>>
>> We had a check for this case, but we didn't handle it at all (neither error,
>> nor fix), we also had a TODO in the code.
>>
>> For example, if user has an "unstable" regular file instead of "unstable"
>> directory (FS#12148), from now on pacman will remove that file (and print
>> a warning message). Before this patch pacman just stopped with "could not
>> register database" error.
>>
>> Signed-off-by: Nagy Gabor <ngaba at bibl.u-szeged.hu>
>
> Signed-off-by: Xavier Chantry <shiningxc at gmail.com>
>

I liked the change made to the check, but I didn't like this check in
the first place (especially the place where it was done).
So I just sent a patch to the ML which moves this code : Delay the
creation of local and sync db dir
So I integrated your changes in there.


More information about the pacman-dev mailing list