Date: Sun, 08 Jun 2014 21:49:38 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-ports@freebsd.org Subject: Re: pkg 2 ng conversion Message-ID: <5394CC62.1060409@FreeBSD.org> In-Reply-To: <5394C0A9.5090903@missouri.edu> References: <5394B89A.4040607@paz.bz> <5394C0A9.5090903@missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8AbpljAPUxxfTcDHEPkD5dOh2aEwATMfj Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/06/2014 20:59, Montgomery-Smith, Stephen wrote: > Why did the change the database structure? The old way had a separate > directory for each port/package built. The new way is to use a modern > relational database. So one advantage is the the new pkg database is > much faster. Maybe there are other advantages too. Yes, absolutely. Speed is one very big reason for switching to sqlite. There are others - reliability. It was depressingly easy to break the old style /var/db/pkg setup. Especially in tracking reverse dependencies: ie. asking what depends on this package? - consistency. The database schema simply makes it impossible to have duplicate versions of the same package in the pkgdb, something that was formerly a frequent problem. - It's a RDBMS with the power of SQL to pull out pretty much whatever information you could want about the packages you have installed. SQL queries are much easier to write than grepping through /var/db/pkg and passing the results through some complicated post-processing pipeline to filter out the useful stuff. Although one word of caution: we do tend to change the database schema quite frequently, and occasionally in quite radical ways. So, by all means feel free to fire up 'pkg shell' and SQL away; just don't make that an essential or even an important part of anything critical to your livelihood. Instead, use the tools like 'pkg query' or 'pkg info' where we aim to provide a consistent API. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --8AbpljAPUxxfTcDHEPkD5dOh2aEwATMfj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJTlMxiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATGEkQAJgIqCBYH1JbzmxBfynHCiLr 06XKJ6Y/zUZfZbIRN/301I7iTj6r2hMlQsq+xSJHMlpFUhLV8mm8GhWWedqjpH0H FozvnOOM+MJqKh94GHiyafPKhlTQ5gIMSOJVqjsOwfR3Tue3+Z8AH2n02/plq4HI zCgRjbzcd8eyRs7598N6FuRXGQK0WyXlAyJ09LPi2kJ3rr747g34CJtgeRTt7X0B b9C/v7NarOfT0Dfk+BAUzmUcdD0uM3ofTNHrCxThiFeuGRmyCDt8vZmjyFwG56es b1AmiZL9NNooVEkhsq6ZFO+Xt4+SbXrd4ydLdSdS6qfbg4X5vh5pK5nEF5cG+zhB BphBkLZ6oon5TqBEWPkTB/dYoPmcd8uhd73Q65GiBoE0yH/QgAVaiMBp84BHH3iM XL2s31fAn76d10mx0BK5u/91+YgsJe/mBbvemzvHC0NbZzPtRiQPypXuZkiQhnff 43MuK0i+B3CDrs5Au8CfO3C/IiwdV6kxGz6m3gMoZr7qwpz7vfNlvnGV/h6xau6R PMtJBBOnNC2O5IIGp2Bekh2DvHpak3RMghgt8/4hJL9LPuBlQ9PbxemmHDXuhxPS EQgtzH7MI3tztvj93R+OOVPtIZBtUTHcLDbv/f8zZXF9WpT7gvy5j9prUcGlCAhG 8ZNet7qK3vPbMzZoPD5a =CnFV -----END PGP SIGNATURE----- --8AbpljAPUxxfTcDHEPkD5dOh2aEwATMfj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5394CC62.1060409>