remove all installed packages
Matthew Seaman
matthew at FreeBSD.org
Tue Dec 29 13:31:49 UTC 2015
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/pkg;
> it looks like that it uses directly work/pkg*/src/pkg-static
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 957 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20151229/4d477dbd/attachment.sig>
More information about the freebsd-questions
mailing list