Opened 16 years ago
Closed 15 years ago
#18273 closed defect (fixed)
post-activate code is not run if you call port activate
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.9.0 |
Component: | base | Version: | 1.7.0 |
Keywords: | registry2.0 | Cc: | dbevans (David B. Evans), raimue (Rainer Müller) |
Port: |
Description
If you "port install
" a port that has a post-activate block, it gets run. For example, wget's post-activate block tells you about a config file you can install (if you haven't already done so):
$ sudo port install wget ---> Fetching wget ---> Verifying checksum(s) for wget ---> Extracting wget ---> Applying patches to wget ---> Configuring wget ---> Building wget ---> Staging wget into destroot ---> Installing wget @1.11.4_1 ---> Activating wget @1.11.4_1 To customize wget, you can copy wgetrc.sample to wgetrc in /opt/local/etc and then make changes. ---> Cleaning wget $
However, if the port is deactivated, and you "port activate
" it, the post-activate block does not run, which is unexpected:
$ sudo port deactivate wget @1.11.4_1 ---> Deactivating wget @1.11.4_1 $ sudo port activate wget @1.11.4_1 ---> Activating wget @1.11.4_1 $
Change History (4)
comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 16 years ago by dbevans (David B. Evans)
Cc: | devans@… added |
---|
Same problem observed with ffmpeg/ffmpeg-devel
comment:3 Changed 16 years ago by raimue (Rainer Müller)
Cc: | raimue@… added |
---|---|
Keywords: | registry2.0 added |
This is a registry problem as registry1.0 does not store any hooks in the receipt. We cannot assure that the Portfile will be still valid or even available at the time of running de-/activate.
I didn't check again, but registry2.0 contains stubs to store pre-/post-uninstall hooks, it should do the same for de-/activate.
The notes issue will be fixed by #421.
comment:4 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
See also #11562, the request to remove the post-activate and post-install blocks and replace them with a "finalize" phase.