From owner-freebsd-questions@freebsd.org Tue Dec 29 13:31:49 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BACEA54DFE for ; Tue, 29 Dec 2015 13:31:49 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 08CB21180 for ; Tue, 29 Dec 2015 13:31:48 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.2/8.15.2) with ESMTPSA id tBTDVi5E045602 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 29 Dec 2015 13:31:45 GMT (envelope-from matthew@FreeBSD.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.10.3 smtp.infracaninophile.co.uk tBTDVi5E045602 Authentication-Results: smtp.infracaninophile.co.uk/tBTDVi5E045602; dkim=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6] claimed to be liminal.local Subject: Re: remove all installed packages To: freebsd-questions@freebsd.org References: <20151208200303.GA2194@c720-r285885-amd64> <20151228202833.GA2425@c720-r285885-amd64> <56825250.9010900@gmail.com> <20151229100629.GA18472@c720-r285885-amd64> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <56828B40.2090301@FreeBSD.org> Date: Tue, 29 Dec 2015 13:31:44 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20151229100629.GA18472@c720-r285885-amd64> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EUTgxdMWASLqmVk6L1FWffCithwJ7BPT6" X-Virus-Scanned: clamav-milter 0.99 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 13:31:49 -0000 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--