From owner-freebsd-questions@FreeBSD.ORG Fri Dec 26 23:12:01 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84A38E8A for ; Fri, 26 Dec 2014 23:12:01 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A307661B8 for ; Fri, 26 Dec 2014 23:12:00 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id sBQNBxaw039644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 26 Dec 2014 16:11:59 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id sBQNBxGe039641; Fri, 26 Dec 2014 16:11:59 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 26 Dec 2014 16:11:59 -0700 (MST) From: Warren Block To: Chris Stankevitz Subject: Re: Do I want to switch to the new pkg(8) format? In-Reply-To: Message-ID: References: <7813720d20f4ad81c083db7695df728b.squirrel@ma.sdf.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 26 Dec 2014 16:11:59 -0700 (MST) Cc: cpet@sdf.org, freebsd-questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 23:12:01 -0000 On Fri, 26 Dec 2014, Chris Stankevitz wrote: > On Fri, Dec 26, 2014 at 9:59 AM, Warren Block 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.