[MacPorts] #48327: malformed registry
MacPorts
noreply at macports.org
Tue Jul 14 02:21:42 PDT 2015
#48327: malformed registry
--------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: base | Version:
Resolution: invalid | Keywords:
Port: |
--------------------------+--------------------------------
Comment (by rjvbertin@…):
Replying to [comment:3 cal@…]:
> I would expect such features to be the point of a database,
Yes, though I've come to expect issues with sqlite. IIRC, the phpbb forum
software is based on it too, and I've witnessed enough board crashes
because of db corruption...
> and I would expect SQLite to provide this safety. Since it clearly
doesn't
> (you didn't disable the journaling, right?),
No, I wouldn't even know how. I also didn't knowingly remove the registry
.db-journal file.
> we should probably make a copy, yes. Patches are very welcome on this
one. Note that we cannot copy the database reliably after we've opened the
database, so the copy must be done before opening.
I'm guessing this should best be done in src/cregistry/registry.c, but
should it be in reg_attach()/reg_detach() or rather in
reg_open()/reg_close()? If I'm interpreting the function names correctly,
the latter would provide the finer-grained safety (at the expense of
adding a member to reg_registry). I'm not sure if there's a point to that
though, nor how to handle cases like an existing backup file when a new
backup is to be made. Should that be handled through reg_throw()?
--
Ticket URL: <https://trac.macports.org/ticket/48327#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list