To explain:

-n prevents rebuilding ports that the ports being upgraded (works with install 
too I suppose, but there should be no need for that) depend on; it may cause 
failure if they're not already installed and up-to-date

--force forces upgrading even of a port that's current; but without the -n, 
that would apply to everything it depends on too, which is slow and might cause 
more problems (esp. if there are issues with any of the build tools used)

--no-rev-upgrade because while the check for broken ports is usually good, it 
might get in the way in this sort of situation; and because one might be 
repeating the command one port at a time for more than one port (separate 
commands so it tries them all even if one fails), and since the check is a bit 
slow, that saves time

This is rather far down the list of what one should try, because normally -n is 
not a good idea (although it can make sense to limit --force), and because 
ideally one would just do "port upgrade" and let it sort out what needs doing. 
But clearly it helps sometimes when things aren't right and you don't want to 
do more than necessary.

> On Mar 27, 2024, at 11:21, Riccardo Mottola <riccardo.mott...@libero.it> 
> wrote:
> 
> Hi Richard,
> 
> Richard L. Hamilton wrote:
>> port -n upgrade --force --no-rev-upgrade crankyport
>> 
>> It might not work if crankyport needs the latest of something it depends on 
>> and that isn't already up-to-date. But a lot of times, it does work.
> 
> this is a good one.. appears to work for stubborn libgdk, it just rebuilt
> 
> I prefer it to build/uninstall/install because upgrade preserves the
> automatic status and variants automagically.
> 
> Riccardo
> 

Reply via email to