Do I want to switch to the new pkg(8) format?
Warren Block
wblock at wonkity.com
Fri Dec 26 23:12:01 UTC 2014
On Fri, 26 Dec 2014, Chris Stankevitz wrote:
> On Fri, Dec 26, 2014 at 9:59 AM, Warren Block <wblock at wonkity.com> wrote:
>> No, both binary packages and ports require pkg now. It is the only
>> supported package management tool, and installing ports *is* installing
>> packages.
>
> Warren,
>
> Thank you for your replies. I appreciate how careful you are being
> with your language. Keeping in mind that my FreeBSD vocabulary is not
> up-to-snuff, can you explain how these two statements can both be
> simultaneously true:
>
> "pkg is the only supported package management tool (and installing
> ports *is* installing packages)" -Warren Block
>
> "portmaster is the recommended tool for upgrading installed ports"
> -Handbook section 5.5.3.1
>
>
> If both statement are indeed true, then I must conclude:
>
> 1. Upgrading ports is not a "package management" operation.
It is. A port is compiled and a package created from it. The old
package is deleted and the new package installed.
> 2. There are many different "operations" you can do with ports and packages.
Well, yes, but installing, deinstalling, and updating are in the realm
of package management.
> 3. Each "operation" might use a different tool. Sometimes pkg,
> portmaster, portsnap, make, cvs, pkg_, portsclean, portupgrade, etc.
Well, cvs and pkg_* can be skipped, they are deprecated.
portsnap update the ports tree (/usr/ports), not installed packages.
portsclean similarly works on the ports tree, not installed packages.
portmaster and portupgrade are port upgrade tools. Both are
functionally similar, mostly concerned with upgrading multiple ports
and getting the dependencies in the right order.
portmaster and portupgrade call 'make' to build and do other ports
operations. But the port Makefiles call the package management tools
when it is time to delete or install packages, like after a new version
of a port has been compiled and the make target was "install".
Likewise, 'make deinstall' calls 'pkg delete'.
So the ports operations may not look like package management commands,
but many of them actually are. The whole thing is really pretty
amazing, both for the amount of complexity and the relative simplicity
of the user interface.
More information about the freebsd-questions
mailing list