sudo port upgrade all

Ryan Schmidt ryandesign at macports.org
Fri Nov 28 11:37:48 PST 2008


On Nov 28, 2008, at 02:49, Keith J. Schultz wrote:

> Am 28.11.2008 um 02:47 schrieb Ryan Schmidt:
>
>> Preventing this from happening in the future by keeping people  
>> from using the "all" pseudo-port with the "upgrade" or "install"  
>> targets would be good, but I don't think it's that  
>> straightforward, since AFAIK MacPorts *first* expands the pseudo- 
>> port to a list of ports, and *then* hands that list to the  
>> "upgrade" or "install" target; the targets do not see a difference  
>> between you typing "all" and you typing the names of all 5163  
>> ports. One possible remedy would be to have a sanity check for  
>> "install" and "upgrade" (any other targets?) to have it bail out  
>> if more than n ports are requested, where n is, I don't know, 100?  
>> 200? I have over 300 ports installed, but not many of those need  
>> upgrading; one would use "sudo port upgrade outdated" to upgrade  
>> only the outdated ports; "sudo port upgrade installed" wouldn't be  
>> a good thing to run. Comments on this strategy, or suggestions for  
>> other strategies to prevent this situation?
>
> Well if it is just a matter of a pseudo-port expansion then
> I would suggest renaming it to Everything!!
>
> Sure "all" is nice, but it would help some of the "normal"
> users to use everything instead of all. Yeh, the power users
> will scream. Though it would be an easy programming task!

I don't see any benefit in renaming "all" to "everything". In the  
current case we have users who think "I want to upgrade all ports I  
installed!" so they use "port upgrade all" and have a problem. If we  
rename "all" to "everything", then we have users who think "I want to  
upgrade everything I installed!" so they use "port upgrade  
everything". Same problem.


> I do not know how port is programmed to parse its command line
> arguements, but when it checks the port-command we could check the
> arguments of the command involved. Isn't this done already?

I'm not really familiar with those particular internals of MacPorts  
but you're welcome to look at the sources. They're in the repository:

http://trac.macports.org/browser/trunk/base/

Maybe someone who's already familiar with MacPorts command line  
argument parsing can chime in.


P.S: Don't forget to Reply All so your message goes to the list too,  
not just to me.



More information about the macports-users mailing list