Ports question

I just installed FreeBSD 8.2 RELEASE a few weeks ago and I could use some help about keeping the ports up to date. I've been using
Code:
# freebsd-update fetch
# freebsd-update install
to keep the base system up to date with security patches (though there haven't been any after the first couple of days after I first installed).

I was using
Code:
# pkg_version -v
to see what ports needed updating and then
Code:
# portupgrade -a
to update them. The problem was that a lot of packages were not getting updated because of various errors, mostly the "because it is held by user (specify -f to force)" one.

So I decided to try portsnap to see if that would help.
Code:
# portsnap fetch update
# portsnap extract
That took a long time to finish running and when it finished, I ran
Code:
# pkg_version -v
again and it seemed like there are way more ports now than there were before and many more of them needed updating.
Code:
# pkg_version -v | wc -l
     209
Does that seem right or did I do something wrong?

The original problem didn't go away either:
Code:
# portupgrade -a
doesn't update them and when I pick one individually, like say apache for example, it exits with a random build error. The manual is great, but I'm having trouble understanding the ports system.
 
portsnap(8) doesn't update the applications that have been installed from ports, it updates the ports tree (/usr/ports). So when pkg_version(1) compares the installed versions to what's now available in the ports tree, it sees more.

Also, don't use extract every time with portsnap, only do it the first time. It takes a long time.

This article covers the basics: Upgrading FreeBSD Ports.
 
Thanks. Is there a way to get a similar list of ports that need updating that only shows the installed ports?
 
Lido said:
Thanks. Is there a way to get a similar list of ports that need updating that only shows the installed ports?

That's what it's showing already. I prefer the portmaster version shown in the article, though.
 
Back
Top