Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2008 14:43:08 +0200
From:      Joerg Sonnenberger <joerg@britannica.bec.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Adding .db support to pkg_tools
Message-ID:  <20080509124308.GA596@britannica.bec.de>
In-Reply-To: <op.uavxx8ip2n4ijf@duckjen.nextgentel.no>
References:  <op.uavxx8ip2n4ijf@duckjen.nextgentel.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 09, 2008 at 01:52:46PM +0200, Anders Nore wrote:
> I'm working on adding .db support to the pkg_tools( i.e. pkg_add, pkg_info, 
> etc. ) as part of SoC 2008. The database api used is BerkeleyDB that comes 
> with the base system (/usr/src/include/db.h). BerkeleyDB is not you're 
> typical relational db, and can only save key/value pairs. The way I'm 
> thinking of storing information to the .db is to name the keys as the 
> directory names in /var/db/pkg. And save the +* files in the directories to 
> the value element in the db, separated with a special character or similar.

As one of the persons hacking on pkg_install in pkgsrc/NetBSD, I would
*strongly* advisy you against storing the files only in a bdb file.
The change of major and complete corruption with bdb185 is high,
consider pulling the plug in the middle of a long update.

Secondly, I would also advisy against just storing all meta data in a
single key/value pair. For example, +CONTENTS can be extremely large.
Check texmf for a good example.

Joerg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080509124308.GA596>