Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2014 16:11:59 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Chris Stankevitz <chrisstankevitz@gmail.com>
Cc:        cpet@sdf.org, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Do I want to switch to the new pkg(8) format?
Message-ID:  <alpine.BSF.2.11.1412261559270.26354@wonkity.com>
In-Reply-To: <CAPi0psvo6UOefnJczRkeQ5SpR2k0nSQ6h9Wq2cNyh5Jzr7xB2Q@mail.gmail.com>
References:  <CAPi0psuei36LjMFT_B7DF3dWhTz=RK28r-kxKdyeNJx1YSapdg@mail.gmail.com> <7813720d20f4ad81c083db7695df728b.squirrel@ma.sdf.org> <alpine.BSF.2.11.1412261056240.60313@wonkity.com> <CAPi0psvo6UOefnJczRkeQ5SpR2k0nSQ6h9Wq2cNyh5Jzr7xB2Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Dec 2014, Chris Stankevitz wrote:

> On Fri, Dec 26, 2014 at 9:59 AM, Warren Block <wblock@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1412261559270.26354>