Date: Tue, 29 Dec 2015 13:31:44 +0000 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: remove all installed packages Message-ID: <56828B40.2090301@FreeBSD.org> In-Reply-To: <20151229100629.GA18472@c720-r285885-amd64> References: <20151208200303.GA2194@c720-r285885-amd64> <CA%2BtpaK2mfqRUE5_z_waKqK0hgkG_WNL36qV_fotREamCE3KcdQ@mail.gmail.com> <20151228202833.GA2425@c720-r285885-amd64> <56825250.9010900@gmail.com> <20151229100629.GA18472@c720-r285885-amd64>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EUTgxdMWASLqmVk6L1FWffCithwJ7BPT6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 29/12/2015 10:06, Matthias Apitz wrote: > While we are at this, I was asking me how the package pkg itself is > installed as the first package using the ports collection ports-mgmt/pk= g; > it looks like that it uses directly work/pkg*/src/pkg-static =20 > or how this works? Yes -- exactly that. In fact, if you install pkg by compiling from the ports, it gets installed and registered very much in the same way as any other port, /except/ that it uses a copy of pkg-static from the port's ${WRKDIR} rather than the more usual copy found in ${LOCALBASE}/sbin/pkg-static. The bootstrap performed by pkg(7) is also essentially the same: most of what '/usr/sbin/pkg bootstrap' does directly for itself is downloading the pkg.txz tarball, verifying the signature on it and extracting a temporary copy of the pkg-static binary from it. All of the rest happens through running that copy of pkg-static(8). pkg(8) or pkg-static(8) will automatically create anything it needs under /var/db/pkg any time you invoke it when that content isn't already there. ie. it will initialise an empty local.sqlite database and create the database schema within it, amongst other actions. Cheers, Matthew --EUTgxdMWASLqmVk6L1FWffCithwJ7BPT6 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 iQJ8BAEBCgBmBQJWgotAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATpWMP/jwNpSr5JCK4vesKLg7ScuHa 3oedYZVwPMxSfHol75HYcEu2GsJRJ7e/S1KgE35VVfdlr/nklTmlloOeJAeIMdJz LWl6BgizcQh30uMx2xQhw2GJU2c5v2i4ro26QSAwAncBhv97GHRQLaqHWpiKuVFr SiK1FBRz/No/Di37wwZqsPqdrg2SJbogFaqgTH1IN+7WrIrSpcUcisY/NBBYJgY1 OmXgSDqwQodlqY/OoikkGv3fZYbUSMjd/RwZC4Cdd8aoWXqwEQqMux+GrP33MWsV 4zeU7gCU+BlxhCjIHG18VPYsj6Cn/ausGY8K7NBzAhzW7xBaB3AningV/D4arARk q1xwSCuEYuXFF/89tR6rI3HMuoQZy0UlJ2JkAurpTHX/O+tCPg33wC/C2IaoFP4b vYT8EXb9l0pot8g8PJ17EpxP5ZnTzCHVDTzTqQbeMKatsEdio2DisGahvm09iTf1 xrR3kRgplTmwzPCsZL36IdRzz662KKSOAAEk8tCQtk+IZwnqBGPTpwy34ZKnGrco MHIQFiOKiK+Og2/ENJBf/5I0u7mSBZeJb4CS7+DkKaXM0KcKakyLjJCGMZoD/XMV nDlah2kAfwkPN9iebgvh8dohiF3OT11FFN+ZJcEMypxsJtjegXZZi/Meg2rDweDv d2ixomG9QHG6E578AbTc =BioG -----END PGP SIGNATURE----- --EUTgxdMWASLqmVk6L1FWffCithwJ7BPT6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56828B40.2090301>