Opened 13 years ago

Closed 12 years ago

#31280 closed enhancement (fixed)

fuse4x-kext: move kext unload to pre-deactivate phase

Reported by: anatol (Anatol Pomozov) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: fuse4x-kext

Description

pre-deactivate is better phase for unloading the kext. Kext should be unloaded not only when the port is upgraded but also when the it is uninstalled.

Attachments (1)

move_unload_to_deactivate.diff (2.0 KB) - added by anatol (Anatol Pomozov) 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by anatol (Anatol Pomozov)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dports@… removed
Owner: changed from macports-tickets@… to dports@…

comment:2 Changed 12 years ago by drkp (Dan Ports)

I'm not convinced this is a good idea. If anything, we'd have to do the check in *both* the pre-activate and post-deactivate phases. If we did it only in post-deactivate, the check would never get run on the first update after this change (because the old version didn't have the post-deactivate hook and the new version didn't have the pre-activate hook). Or it might not be possible to unload the kext (because there are running file systems) in post-deactivate, but succeed when activating the new port.

Really, I'm not sure we want to unload the kext when uninstalling the port. We don't, in general, shut down running software when uninstalling a port. Any reason it's especially important to do so here?

comment:3 Changed 12 years ago by anatol (Anatol Pomozov)

We don't, in general, shut down running software when uninstalling a port.

fuse4x kext cannot be unloaded while it is in use. User have to stop filesystems first.

Really, I'm not sure we want to unload the kext when uninstalling the port.

If we uninstall fuse4x-kext then we have to uninstall fuse4x library as well (fuse4x depends on kext). What is the reason to run unused kext if we cannot use it?

I found that this is an issue when I was switching fuse4x from macports <-> fuse4x from sources. So when I do "port uninstall fuse4x" then build and install fuse4x from sources and then run software that uses fuse4x, the library says "version mismatch" as running (and unused) kext from macports has version 0.8.12 but kext version in git repository is 0.8.13-HEAD. So I have to unload fuse4x-kext manually. If macports on uninstall does the real uninstall (with kext unloading) this fixes the problem for me.

because the old version didn't have the post-deactivate hook and the new version didn't have the pre-activate hook

You can insert this check twice for the transition period and later remove the one from pre-activate.

comment:4 Changed 12 years ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

We'll do it in both post-deactivate and post-activate. r86463.

Note: See TracTickets for help on using tickets.