Portmaster -a and -af

JazzSinatra

Member

Reaction score: 1
Messages: 29

Is it still bad practice to update installed ports with Portmaster -a or -af? In this Thread 15799 user "phoenix" says, that

Never use the -a option together with -f, that's just asking for trouble. In fact, never use -a, period.

If you want brain-dead simple upgrades, then stick to binary packages.

Otherwise, learn the system.

Update the ports tree: portsnap fetch update
Check for issues: more /usr/ports/UPDATING
Check for security updates: portaudit -Fda
Check for app updates: pkg_version -vIl '<'
Then, and only then, should you consider if things need to be updated. And then you should do small batches of updates, in the order listed in UPDATING.
Is this information still valid? The FreeBSD handbook recommends just to use:

portmaster -a

and if that fails, then:
portmaster -af
 

ShelLuser

Son of Beastie

Reaction score: 1,669
Messages: 3,512

There's nothing wrong with using # portmaster -a. All it does is go over the list of installed packages after which it'll build & (re)install the ones which have a new version. The poster has a point that using -af together can cause some side effects (force compilation of all upgradeable ports and all their dependencies) but other than having to wait a (very?) long time for your builds to finish it won't cause any trouble or something.

I also think context might matter with the quote above. Because I can come up with situations where its use wouldn't be the best of ideas. But generally speaking... no worries.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 6,926
Messages: 28,854

Make sure you read /usr/ports/UPDATING. Sometimes ports need to be rebuild in a specific order and portmaster(8) won't do that automatically. Which is the main reason why portmaster -a would be bad to do.
 
Top