# Do I need to upgrade the dependencies of a single port to upgrading it properly ?



## Ievgen (May 16, 2012)

Hi guys,

Please help me to understand because I don't know how it works behind the scenes. What if I want to upgrade a single port, should I upgrade the dependencies as well or not? Or even should I upgrade the packages that rely on it?

I'm using portupgrade, so, for example what is the proper command to upgrade let's say x11-toolkits/gtk30? Which one of:

`portupgrade x11-toolkits/gtk30`
`portupgrade -R x11-toolkits/gtk30`
`portupgrade -r x11-toolkits/gtk30`
`portupgrade -rR x11-toolkits/gtk30`
I'm confused. 

Thanks.


----------



## SirDice (May 16, 2012)

The last one would be the proper one. That updates all dependencies of gtk30, gtk30 itself, and all ports that depend on gtk30.


----------



## Ievgen (May 16, 2012)

Would I achieve the same result If ran simply [cmd=]portupgrade <port>[/cmd] against every dependency manually? And would the sequence of this actions matter?


----------



## SirDice (May 16, 2012)

Supposed PortA needs updating and PortB depends on it. With just a *portuprade PortA* only that port will be updated. Normally with just a few minor changes this isn't a problem for PortB. But, for completeness and consistency PortB should be rebuilt. Usually if PortB depends that heavily on PortA, PortB would get a small version bump when PortA is updated. That pretty much guarantees it gets rebuilt when updating all your ports.


----------



## Ievgen (May 16, 2012)

I see, thanks.


----------



## bbzz (May 16, 2012)

What about *portmaster*?

There's *-r* switch to build all ports that depends on it, but I don't see upward-recursive rebuild command. *-R* is used for something else.


----------



## SirDice (May 16, 2012)

*portmaster -r* is similar to *portupgrade -r*. If I'm not mistaken *portmaster* will always update dependencies (like *portupgrade -R*).


----------



## bbzz (May 16, 2012)

Sorry, I got that wrong; *-r* will go from bottom up (which I always think of as upward-recursive), which makes sense. 

But it will not rebuild packages which are required by given port (as in *portupgrade -R*). Which is ok, since it's not necessary.


----------



## DutchDaemon (May 16, 2012)

*portmaster -f* will rebuild a port and everything that depends on it.


----------

