Date: Mon, 5 Jun 2006 08:37:10 -0700 From: "Ian A. Tegebo" <yontege@rescomp.berkeley.edu> To: Jon Falconer <jfalconer@puc.edu> Cc: questions@freebsd.org Subject: Re: difference between deinstall and pkg_delete? Message-ID: <20060605153710.GE21463@rescomp.berkeley.edu> In-Reply-To: <Pine.BSI.4.05L.10606011103000.6635-100000@ecf2.puc.edu> References: <Pine.BSI.4.05L.10606011103000.6635-100000@ecf2.puc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060605153710.GE21463>
