[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cap_mkdb writing wrong files
In article <rmizjxq3r6h.fsf%fnord.ir.bbn.com@localhost>,
Greg Troxel <gdt%ir.bbn.com@localhost> wrote:
>I have the impression that while writing the db in a separate file
>avoids part of the issue, there is still a problem where the old db can
>be read as the source file is parsed. So I think this means either:
> 1) Remove the db before writing, which can result in no db
> 2) Add a source-only flag to cgetnext, to ignore the binary databases.
>2 involves ABI changes
>1 has the downside that if the db creation fails, we can be left with no
>binary db. But presumably cap_mkdb is being run because the source file
>is newer, and it seems better to end up with the correct answer more
>slowly than to get the wrong answer.
>So basically I suggest unlinking the capdb file foo.db as the first
>thing, just before opening foo.db.tmp for writing.
This is what I ended up doing anyway.
Main Index |
Thread Index |