Port Function to Handle OS Upgrades

Ryan Schmidt ryandesign at macports.org
Fri Oct 23 13:29:34 PDT 2009


On Oct 23, 2009, at 15:14, Jeremy Lavergne wrote:

>>>>> * remove all build directories
>>>
>>> sudo port clean all
>
> Far inferior to sudo rm -rf ${prefix}/var/macports/build

How is it inferior, aside from being slower?

FYI, that wouldn't remove the "work" symlinks in the port directories.  
That might not be a big deal, but it is a difference.


>>>>> * trash all irrelevant archives
>>>
>>> Define irrelevant.
>
> Not supposed by this architecture or OS version or simply outdated/ 
> replaced by a newer version.

Ok. I don't know how to do that. I don't use archives.


>>>>> * dump a list of what is installed (either to be read in by  
>>>>> another function or simply catted to port)
>>>
>>> port installed > myports.txt
>
> What's with all this "active" stuff listed after it getting in the  
> way of ports parsing that? >_>

I agree, it's not made to be parsed; it's meant to be looked at.


>>>>> * uninstall everything
>>>
>>> sudo port -f uninstall installed
>
> Again, sudo rm -rf $prefix is faster.  Especially on a G4/G5.

And totally not the same thing. "sudo port -f uninstall installed"  
uninstalls your installed ports, while leaving behind MacPorts base  
itself AND any configuration files or databases you may have created.  
This is the key difference. We don't want to advocate a command that  
would cause the user to lose data.

Also, note ports are not necessarily contained within ${prefix}.  
Better let MacPorts uninstall the software correctly from wherever  
it's installed.


> The point being one step to do all this, not "how do I do all this  
> individually and have to tell every users to do this list of steps  
> when they're upgrading"

Scott asked how to do these steps individually, so I showed him how.


>> Well, holy smokes.  Am I blind, aside from immersing myself in a  
>> rather large man page, where would I have learned this commands?
>
> Just irrelevant to the conversation.
>
>> These are each FAQ lines in their own right as far as I can see.  I  
>> very much think I represent the end user to a degree.  Not afraid  
>> to read at all, but man pages often times lack examples, which are  
>> some of the best ways to learn for me.
>
> I'd disagree as I've had to help far too many and deal with far too  
> many tickets that should have dealt with be a knowledgeable user.
>
> Most didn't even read the Migration page.


I'm not sure I understand your responses to Scott here.

Scott's saying we don't have enough documentation on how to use  
MacPorts. You're saying users don't read the documentation we do have.  
Is that right? If that's true, then we either need to publicize the  
available documentation better, or simplify it so it's more  
understandable to end users.





More information about the macports-dev mailing list