Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here's what I want: I want to install RELEASE-8.2, and want to keep the system and packages up to date with security patches only. I want to avoid ports b/c I do not want my machines to start compiling large packages and their dependencies when it has a high load; also, I do not want to deal with broken ports.

Keeping the core system seems simple enough with freebsd-update fetch and freebsd-update install.

How should I keep packages up to date with the latest available from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.1-release/Latest/? The portupgrade man page says that the -PP flag may be what I want-- however, it says I need an updated ports tree. That's fine, but what happens if I have Foo-1.0 installed, the ports tree says Foo-1.2 is the newest version, but only Foo-1.1 is available as a package? Will it recognize Foo-1.1 as a higher version? If so, why does it need an updated ports tree?

Is this enough?:

portsnap fetch update
portupgrade -a -PP

(I'm assuming you don't need -r or -R when you have -a, right?)

share|improve this question
    
Running just those commands you'll end up with a ton of "package not found" errors as Foo-1.2 will commonly not be available. –  Chris S Jul 15 '11 at 20:36
1  
This happens because the updated ports collection is looking for packages from either STABLE or CURRENT (I think it's STABLE), but portupgrade is using the PACKAGESITE for 8.1-release, so it finds the older packages. If he changes the PACKAGESITE url to ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/ and runs the commands, it will upgrade the packages to match the updated ports collection, but he'll no longer be following RELEASE, instead STABLE. In a nutshell, to get the latest binary packaes, you need to change the repo from RELEASE to STABLE or CURRENT. –  Joe Internet Jul 15 '11 at 21:30
1  
You might want to throw a pkgdb -F in there before running portupgrade, just as a precaution. –  Joe Internet Jul 15 '11 at 21:32
    
Just as a note, -a makes portupgrade check all packages, but it won't upgrade dependencies/dependents without the appropriate -r or -R flags. Not sure about upgrading with packages, but you may need to upgrade like a pirate (-arR) to cover all the bases... –  voretaq7 Jul 25 '11 at 16:43
add comment

1 Answer

As I understand the workings of portupgrade, it uses the ports tree (specifically, the index) to populate its own database of available ports and determine which installed packages are out of date. I have not personally tried using it with binary packages, but I suspect that in the case of an available package being older than the in-tree port, portupgrade would not find the package.

share|improve this answer
    
Your understanding is essentially correct: -PP will work if it can find the appropriate version of a package (matching the version in the local ports tree) on the server. If not it will complain that it couldn't find a package. –  voretaq7 Jul 25 '11 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.