[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-questions
Subject:    Re: remove all installed packages
From:       Matthew Seaman <matthew () FreeBSD ! org>
Date:       2015-12-29 13:31:44
Message-ID: 56828B40.2090301 () FreeBSD ! org
[Download RAW message or body]


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


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic