From owner-freebsd-questions@FreeBSD.ORG Mon Jun 5 00:11:40 2006 Return-Path: X-Original-To: freebsd-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 CCF1316AF57 for ; Mon, 5 Jun 2006 00:11:40 +0000 (UTC) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BE1243D45 for ; Mon, 5 Jun 2006 00:11:40 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 9F71FD69A8A; Sun, 4 Jun 2006 20:11:38 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by frontend3.internal (MEProxy); Sun, 04 Jun 2006 20:11:41 -0400 X-Sasl-enc: B7ZpMo/dgm4NQsDPeh5iHq1JFUpMHhYluTbutqv8ue4z 1149466301 Received: from bb-87-81-140-128.ukonline.co.uk (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mail.messagingengine.com (Postfix) with ESMTP id C64AB87A7; Sun, 4 Jun 2006 20:11:40 -0400 (EDT) From: RW To: freebsd-questions@freebsd.org Date: Mon, 5 Jun 2006 01:11:28 +0100 User-Agent: KMail/1.9.1 References: <447FEE79.2040004@webanoide.org> In-Reply-To: <447FEE79.2040004@webanoide.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606050111.30606.list-freebsd-2004@morbius.sent.com> Cc: Mikhail Goriachev , Jon Falconer 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 00:11:41 -0000 On Friday 02 June 2006 08:53, Mikhail Goriachev wrote: > Jon Falconer wrote: > > Greetings, > > > > I see in the man page for ports the following: > > > > reinstall Use this to restore a port after using > > pkg_delete(1) when you should have used deinstall. > > > > 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? > > Hi, > > This will point you in the right direction: > > http://www.bsdforums.org/forums/archive/index.php/t-29467.html Actually I think that points in wrong direction. There is a lot of misinformation about this that is repeated ad-nauseum. Most ports use the standard deinstall target which calls pkg_delete; there is only one port in the whole tree that defines it own deinstall target, and that one installs its own versions of the pkg_* utilities. The port system uses a series of cookie files to keep track of what has been done. For example if you type "make && make" the port will only build once, because the first make sets the "build cookie". There is also an Install cookie which leads to a problem when you go through the sequence make install pkg_delete make install because pkg_delete doesn't know about the port cookies. The deinstall and reinstall targets both delete the cookie and so using one or the other avoids the problem. In practice this is virtually a non-issue since most people, and all build tools, will do a make clean at some point in the sequence.