How to make "sudo port install" run a post-activate script with only user permission?

Jeremy Lavergne jeremy at lavergne.gotdns.org
Thu Oct 4 07:13:54 PDT 2012


> Is it possible to tell the port command (normally called with sudo) that it should run a post-activate script with the permissions of the installing user (i.e. not user macports or root)?

Perhaps we could add that. 

We could use $SUDO_USER or logname, but I'm not sure how fragile an assumption those will be. I imagine it'd be messy if they're wrong and end up installing a bunch of files and directories with the wrong owner.

Perhaps if we can't detect the proper owner (ID > 500?) then we simply print out the commands for what would have been done?



More information about the macports-dev mailing list