Uninstall phase

Ryan Schmidt ryandesign at macports.org
Wed Nov 3 06:45:58 PDT 2010


On Nov 3, 2010, at 08:30, Norman Heino wrote:

> On 03.11.2010, at 11:30, Ryan Schmidt wrote:
> 
>> On Nov 3, 2010, at 03:42, Norman Heino wrote:
>> 
>>> in my Portfile I copy a few files and create symlinks in the destroot phase (using "file mkdir", "file copy" etc.). When uninstalling that port those files are not deleted automatically. Is there an uninstall phase where such things can be done?
>> 
>> You must mkdir, copy, etc. into directories whose paths begin with ${destroot} (generally ${destroot}${prefix}), so that they get registered to the port and uninstalled during the uninstall phase.
> 
> What about files outside ${destroot}? I create a (symlinked) launchd item in /Library/LaunchDaemons since I need WorkingDirectory to be set for my port.

Create it in ${destroot}/Library/LaunchDaemons.

By the time the activate phase is done, it will end up in /Library/LaunchDaemons, but registered to the port so that it can be uninstalled later. That is the purpose of the destroot.




More information about the macports-dev mailing list