Adding .db support to pkg_tools

Daniel O'Connor doconnor at gsoft.com.au
Wed May 14 08:44:54 UTC 2008


On Tue, 13 May 2008, Tim Kientzle wrote:
> > I think this is a really bad idea.  The problem with the tools is
> > not with the files.  It is that the files need to be parsed on each
> > run, often recursively, and your solution would not help at all.
>
> Parsing one file isn't expensive; parsing several hundred files
> to find one bit of information is expensive.
>
> > The database(s) should just be a cache of the information stored in
> > the files.
>
> Bingo!  As long as the .db version can be easily recreated
> from scratch from the master data stored in the same files
> as always, it doesn't really matter if the BDB is occasionally
> corrupted, as long as it can be rebuilt fairly quickly.

So long as you can tell it is corrupted..
It's also a drag from a user POV when the tool crashes because the DB is 
hosed (seen in portupgrade a number of times)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080514/1723b1fb/attachment.pgp


More information about the freebsd-hackers mailing list