[MacPorts] #19176: patch to fixup existing uninstall implementation

MacPorts noreply at macports.org
Wed May 27 07:15:25 PDT 2009


#19176: patch to fixup existing uninstall implementation
----------------------------------------+-----------------------------------
 Reporter:  david.osguthorpe@…          |       Owner:  macports-tickets@…                   
     Type:  enhancement                 |      Status:  new                                  
 Priority:  Normal                      |   Milestone:  MacPorts Future                      
Component:  base                        |     Version:  1.7.0                                
 Keywords:                              |        Port:                                       
----------------------------------------+-----------------------------------

Comment(by david.osguthorpe@…):

 > Right, I didn't find any Portfiles which actually define pkg_uninstall.
 >
 of course as the current implementation does not work its not surprising
 its not used

 >
 > True, and having a pre/post-deactivate and uninstall step is definitely
 something which would be useful, but I'm not sure if this is the way to do
 it.  It's correct that ${destroot} wouldn't be useful during uninstall,
 but what other bits may be?  I think the better solution is to allow
 deactivate and uninstall hooks in the Portfile and they can be run by port
 just like with other, similar steps.  I think my primary issue with it is
 that this method is so different than the rest of the way Portfiles work,
 though it does have the advantage of being implemented...

 I dont know what the basis of the original programmers implementation was
 - but it is consistent with the rest of the current uninstall proc which
 also totally ignores Portfile  - it deletes files based on whats in the
 registry - and its executed directly

 ah - I think Ive just figured out a good reason for this approach -
 suppose you deactivate a port - this still leaves the files in the
 registry - now you update the Portfile and change versions etc. and if it
 had an uninstall phase you change that - now how do you uninstall that
 older deactivated version correctly? (which of course you were leaving
 around in case your new version didnt work) - also explains the current
 uninstall approach of deleting files based only on whats in the registry
 and why its independent of the whole Portfile fetch-install phases

-- 
Ticket URL: <http://trac.macports.org/ticket/19176#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list