New FreeBSD package system (a.k.a. Daemon Package System (dps))

Ivan Voras ivoras at fer.hr
Fri May 11 08:28:31 UTC 2007


Julian Elischer wrote:

> ok, let me give you some words that come from the wisdom of having done
> this for 30 years.
> 
> "Use an SQL DB file for this over my dead body"..

:)

I certainly won't be going on a campaign for it, but...

> Now having said that, I need to modify it a bit and explain.
> 
> Explanation:
> The number of times I've gone into /var/db/pkg to read the files to
> figure out what the "fsck" is going on, is very large.
> It is also possible to delete files and edit them.
> This is very important to me in this imperfect world when the pkg system

You can inspect s sqlite database with the provided utility. Unless the
database gets corrupted (which it tries to avoid by respecting ACID), I
think you can always get more sensible data (and quicker) out of a SQL
db then out of a text file. I've seen both the pkg tree (dir of text
files) and pkgdb (BDB database) corrupted before, during NORMAL
operation (i.e. no power outages & similar disruptive events), so I
still vote for a transaction-safe way of doing this.

I see it as a choice between annoying many (and I mean a lot of!) users
with slow operation and clumsiness vs a little convenience during
disaster recovery (e.g. learning basics of SQL).

> gets things wrong (oh no, don't tell me that the new pkg system never
> gets things wrong.. like including a file in 2 packages).

This could be caught by a UNIQUE constraint on a table.

> Modification:
> Now, I have no objection to a DB file of some sort IF (and only if)
> it is somehow rebuildable from a text base which is kept somewhere,

That's precisely why the current system is so clumsy - there are at
least two places this information is kept, and the "text base" is the
limiting factor: slow and not transaction-safe. I don't think it can
remain as the primary data store in a modern system.

> like the password database is done. but PLEASE, NO SQL in the base system!

Maybe the other way around would satisfy you - the ability to rebuild
the text db from binary db?

Perhaps this is a good time I should mention that I think sqlite would
also be good for the password and login databases? :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070511/d6c31674/signature.pgp


More information about the freebsd-hackers mailing list