Cleaning up during uninstall and submitting Portfile

Anand Buddhdev anand at buddhdev.name
Thu Apr 2 02:51:20 PDT 2009


2009/4/2 Ryan Schmidt <ryandesign at macports.org>

Hi Ryan,

 Thanks for your help with advice on which openssl to use. So I've
>> created a Portfile for NSD 3.2.1, placed it in a local ports
>> repository, and used it to install the package on my system. The
>> package builds, installs and runs just fine.
>>
>> So when I uninstalled the package, all the installed files were
>> removed. However, the install process created 2 directories in the
>> pre-destroot phase using "xinstall". These 2 directories are not
>> removed during the uninstall phase. Is there any kind of
>> post-uninstall hook to do this kind of cleanup? It would also be
>> useful to remove users and groups created during package installation.
>>
>
> You need to create the directories inside the destroot so they're
> registered to the port.
>
> Instead of:
>
> xinstall -d ${prefix}/somewhere
>
> do:
>
> xinstall -d ${destroot}${prefix}/somewhere


Actually, this is what I'm already doing. However, at run-time, the package
creates files in these directories, so Macports doesn't remove them. That's
why I was asking about something like a post-uninstall hook, which can
remove these (possibly) nonempty directories, and remove the user account
created during package installation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090402/32990328/attachment-0001.html>


More information about the macports-dev mailing list