4

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?)

cespinoza
  • 303
  • 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

1 Answers1

1

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.

  • 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