# reinstall all ports



## Anonymous (Dec 9, 2009)

I upgrade FreeBSD 7.2 to 8.0 with freebsd-install upgrade.
I need to rebuild all ports. What is better: portupgrade -afc or with postmaster, please?

Thanks.


----------



## gilinko (Dec 9, 2009)

What ever you are more comfortable with, as both will do the exact same thing with rebuilding your ports. My personal choice is portmaster.


----------



## Anonymous (Dec 9, 2009)

gilinko said:
			
		

> What ever you are more comfortable with, as both will do the exact same thing with rebuilding your ports. My personal choice is portmaster.



for portmaster is it portmaster -a enough?


----------



## SirDice (Dec 9, 2009)

lumiwa said:
			
		

> for portmaster is it portmaster -a enough?


That will only update ports that need updating. I would use portmaster -fa.


----------



## Anonymous (Dec 9, 2009)

Thank you very much...I ran portmaster.


----------



## ckester (Dec 9, 2009)

FYI, the portmaster manpage has a good example of how to get a list of all your currently-installed ports before deleting them and then use portmaster to reinstall them after an OS upgrade.  

I used that procedure recently when I upgraded to 8.0 and it worked like a charm.   Deleting and then reinstalling your ports is recommended, in order to ensure that everything gets rebuilt to use the upgraded APIs and that no obsolete files get left lying around where they might cause problems.


----------



## zeiz (Dec 10, 2009)

Is it really necessary to rebuild all the ports installed?
When I upgraded 7.2 to 8.0-RC1 I did nothing and only continued to portupgrade when needed (there are almost 1000 packages on that box). Recently I upgraded same box to 8-STABLE and built then openoffice-3-RC (3.2). I'm posting from the box now. 
Also I just upgraded another box to 9-CURRENT and rebuilt nothing but only portupgraded a few things. Again everything looks pretty good.
Yes, very seldom it's necessary to rebuild something what tons of others depend on but such cases are always in UPDATING.
As to portmaster/portupgrade -af...I did it only once and then it sounds a kinda joke to me  Why not at least -afP?
Am I just lucky and something terrible could happen?


----------



## graudeejs (Dec 10, 2009)

I also don't rebuild all ports....
I only rebuild ports that fail to start, and if they don't start after rebuilding.... I rebuild their dependencies.... In the end everything works....

The only exepction was security/gpa. I never managed to get it working after FreeBSD major update


----------



## zeiz (Dec 10, 2009)

Precisely. Although Handbook threatens with consequences but it never really happens while everything is updated with time 
BTW openoffice.org-3-RC (3.2-beta milestone 6) feels great at least Base looks improved a lot. Other stuff also runs faster. It took me ~4 hours max to build (i386) on AthlonX2 4453e with 4Gb ram installed. To compare KDE 4.3.0 took me 2 days and 2 nights


----------



## Dru (Dec 10, 2009)

zeiz said:
			
		

> To compare KDE 4.3.0 took me 2 days and 2 nights



Ouch! I like to think of myself as somewhat patient, but thats awhile.

Since you guys are talking about building all ports, I just had to mention something Ive been pondering, I noticed when running portupgrade -af awhile back, that it was just going through and breaking about as much as it fixed, it seemed.

For example, when first initiated, it starts on (A) port that needs  a higher version (B) port as a dep, well the old version of (B) port hasnt been hit by portupgrade yet, and then (A) port fails, and the whole process keeps breaking all ports dependent on (B) port, till portupgrade gets there.

It seems to me that it should be -afr(or portmaster equivalent), if someone really wanted to build it all working correctly, I would guess that time would be wasted on force rebuilding deps that have been built once already, but I think it would eliminate some issues.

I dunno though, Im just kind of theorizing, you guys know better.


----------

