From owner-freebsd-questions@FreeBSD.ORG Mon Jun 5 15:37:16 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DD7B16A7BD for ; Mon, 5 Jun 2006 15:37:16 +0000 (UTC) (envelope-from yontege@hal.rescomp.berkeley.edu) Received: from rescomp.berkeley.edu (keyserver.Rescomp.Berkeley.EDU [169.229.70.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADD6743D53 for ; Mon, 5 Jun 2006 15:37:12 +0000 (GMT) (envelope-from yontege@hal.rescomp.berkeley.edu) Received: by rescomp.berkeley.edu (Postfix, from userid 1032) id 868005B773; Mon, 5 Jun 2006 08:37:10 -0700 (PDT) Date: Mon, 5 Jun 2006 08:37:10 -0700 From: "Ian A. Tegebo" To: Jon Falconer Message-ID: <20060605153710.GE21463@rescomp.berkeley.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Cc: questions@freebsd.org Subject: Re: difference between deinstall and pkg_delete? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 15:37:19 -0000 On Thu, Jun 01, 2006 at 11:08:14AM -0700, Jon Falconer wrote: > So I'm wondering what is the difference between pkg_delete and using "make > deinstall" from within the ports directory? What does "make deinstall" do > that pkg_delete does not do? What does pkg_delete do that "make deinstall" > does not do? After spending some time with /usr/ports/Mk/bsd.port.mk and the man page for pkg_delete, I think I'm just as confused as you are. As you mention, the man page for ports seems to imply that pkg_delete is a bad thing and that you should use 'make deinstall'. My analysis of 'make deinstall' in bsd.port.mk concludes that the deinstall target calls 'pkg_delete -f' on the package names supplied by pkg_info. I'm not entirely sure what implications this has for the installation cookies. If you were to only use pkg_delete, some things might go wrong. For example in the Technical Details section, it mentions the 'require' and the 'deinstall' scripts that can fail during a pkg_delete. A 'pkg_delete -f' would force the issue (and that's what 'make deinstall' does). Getting back to the 'make reinstall' target, it appears that all it does is 'rm -f' the installation and package cookies before running install. My conclusion is confusion. I'm not sure what the man page author meant by Use this to restore a port after using pkg_delete(1) when you should have used deinstall. Can someone with more experience give examples that might clarify the situation? -- Ian Tegebo Residential Computing University of California Berkeley