Cleaning up during uninstall and submitting Portfile

Rainer Müller raimue at macports.org
Thu Apr 2 08:55:22 PDT 2009


On 2009-04-02 16:34, David Osguthorpe wrote:
> On Thu, Apr 02, 2009 at 04:11:14AM -0600, Ryan Schmidt wrote:
>> On Apr 2, 2009, at 04:51, Anand Buddhdev wrote:
>>
>> Oh yes, understood. But sorry, no, there is no post-uninstall hook.  
>> There are several ports where this would be useful, but nobody has  
>> written it yet.
>>
> 
> what about the pkg_uninstall hook - this has existed for a long while
> - although I see in registry2.0 somebody has commented this section

registry2.0 is not used at the moment, as the original author
Chris Pickel (sfiera@) got MIA and we don't know much about the current
state. So we will have to figure out how much is working already before
it can be included as default.

> # pkg_uninstall isn't used anywhere as far as I can tell and I intend to add
> 
> of course it isnt used anywhere - you need to define a pkg_uninstall procedure
> in the Portfile
> 
> the other fixup needed is an encoding of the procedure as defined in the Portfile
> before it can be stored in the registry file so that it works after reading from the registry
> - I needed a fixup to the proc_disasm procedure to map \n to \\n in the procedure body
> to get this to work
> 
> append p [string map { \n \\n } [info body $pname] ]
> 
> with this I have had pkg_uninstall working for a few years - unfortunately the name change
> from darwinports to macports made life difficult for me (running on Panther at the time
> and only recently upgrading to Tiger because of features I needed that only worked
> in Panther) and hence had no desire to upgrade that system
> - only now with a new machine did I install the new macports

Would you still care to send a patch? :-)

Rainer


More information about the macports-dev mailing list