Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2007 10:28:16 +0200
From:      Ivan Voras <ivoras@fer.hr>
To:        freebsd-hackers@freebsd.org
Subject:   Re: New FreeBSD package system (a.k.a. Daemon Package System (dps))
Message-ID:  <f219f6$3ls$1@sea.gmane.org>
In-Reply-To: <4643C7DB.6000408@elischer.org>
References:  <200705102105.27271.blackdragon@highveldmail.co.za>	<f20c8u$htp$1@sea.gmane.org> <4643C7DB.6000408@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCFB197788CD94A19B3832926
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Julian Elischer wrote:

> ok, let me give you some words that come from the wisdom of having done=

> this for 30 years.
>=20
> "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.
>=20
> 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 syste=
m

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 syst=
em!

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? :)


--------------enigCFB197788CD94A19B3832926
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGRCklldnAQVacBcgRAu7wAKDmqar0/IgTWOZiJgeIQBadSnJUyACgugn0
KQg5buS7B9Sm6EpJdayAmdQ=
=/r2O
-----END PGP SIGNATURE-----

--------------enigCFB197788CD94A19B3832926--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f219f6$3ls$1>