Re: [MacPorts] #4228: Add A Deactivate Hook
#4228: Add A Deactivate Hook -----------------------------------+---------------------------------------- Reporter: matthew.c@rogers.com | Owner: macports-tickets@lists.macosforge.org Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts base enhancements Component: base | Version: Resolution: | Keywords: -----------------------------------+---------------------------------------- Changes (by jmpp@macports.org): * milestone: MacPorts 1.5 => MacPorts base enhancements Old description:
We have the post-activate hook availible to do setup tasks after the port has been activated. I've talked to jmpp looking for a similar hook for deactivating, and he tells me there isn't one.
I propose a "pre-deactivate" hook that will allow the ports system to clean up any post install setup its done when the user removes it.
The context in which I am working is libraries for Haskell. GHC maintains a list of package which are installed, what modules they provide, and where they are. Normally the install phase (ie: make install) registers the packages, and make uninstall removes them. Since we're putting them into a dest-root first, and then to additionally confound the system, using the image system, this doesn't work.
I pass configure flags to not perform the registartoin and take care of it in post-activate. For correctness' sake, it would be nice to be able to tear these down. If you'd check out devel/hs-plugins, you'll see an example of what I'm talking about. That first bit where we scrub out any pre existing versions is a horrible hideous kludge and needs to be fixed. We could move that unregistration stuff into the deactivation hook.
New description: We have the post-activate hook availible to do setup tasks after the port has been activated. I've talked to jmpp looking for a similar hook for deactivating, and he tells me there isn't one. I propose a "pre-deactivate" hook that will allow the ports system to clean up any post install setup its done when the user removes it. The context in which I am working is libraries for Haskell. GHC maintains a list of package which are installed, what modules they provide, and where they are. Normally the install phase (ie: make install) registers the packages, and make uninstall removes them. Since we're putting them into a dest-root first, and then to additionally confound the system, using the image system, this doesn't work. I pass configure flags to not perform the registartoin and take care of it in post-activate. For correctness' sake, it would be nice to be able to tear these down. If you'd check out devel/hs-plugins, you'll see an example of what I'm talking about. That first bit where we scrub out any pre existing versions is a horrible hideous kludge and needs to be fixed. We could move that unregistration stuff into the deactivation hook. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/4228#comment:4> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts