New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #4228 (closed enhancement: fixed)

Opened 7 years ago

Last modified 2 years ago

Add A Deactivate Hook

Reported by: matthew.c@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.9.0
Component: base Version:
Keywords: Cc: jjstickel@…, fawkes@…, arno+macports@…
Port:

Description (last modified by jmpp@…) (diff)

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.

Change History

Changed 5 years ago by pipping@…

  • milestone set to MacPorts 1.5

Changed 5 years ago by boeyms@…

This would also be useful for the new docbook ports that I am working on, as they need to add entries to the local XML catalog that should be removed on deactivation (since the entries point to files contained in the activated port).

Changed 5 years ago by nox@…

  • priority changed from Expected to Normal
  • version 1.0 deleted

Changed 4 years ago by jmpp@…

  • description modified (diff)
  • milestone changed from MacPorts 1.5 to MacPorts base enhancements

Changed 3 years ago by jjstickel@…

  • cc jjstickel@… added

Cc Me!

Changed 3 years ago by jjstickel@…

A post-deactivate feature is also needed for the octave-[forge] packages.

Changed 3 years ago by jonas.baehr@…

  • cc jonas.baehr@… added

Cc Me!

Changed 3 years ago by jonas.baehr@…

  • cc jonas.baehr@… removed

Cc Me!

Changed 3 years ago by fawkes@…

  • cc fawkes@… added

Cc Me!

Changed 2 years ago by arno+macports@…

  • cc arno+macports@… added

Cc Me!

Changed 2 years ago by jmr@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from MacPorts Future to MacPorts 1.9.0
Note: See TracTickets for help on using tickets.