When you think of Gentoo, you think of bleeding edge, right? The latest, greatest and shiniest? Dag straight! Well, you can also be bleeding, as in losing blood and about to asplode if you don’t get it some first aid right away. I kind of like both versions.
I’ve used Gentoo a lot over the years, and I’ve fixed a lot of old installations. Keeping an old box up and running isn’t necessarily impossible, and I really don’t recommend keeping something longer than a year outdated. I do have one of my desktops that I kind of “snapshot” it. I’ll get it to a point where I like it … and then just leave it there.
What usually happens to trigger me into upgrading is either there’s a new package out there that I want to try and requires a lot of newer libs, or even something more dramatic, I get bored.
This is just a quick howto of how I do it though (and am doing it).
I should mention at this point that this article matches closely the title … making upgrading a box *entertaining* and *fun*. Yee.
Step one: install eix and sync the tree that way.
# emerge eix # eix-sync
Next, tell portage to just keep going and do whatever you have to, and don’t bother me with the little details, and just change as much as you can on your own and I might look in every once in a while if it looks like you’re changing too much:
EMERGE_DEFAULT_OPTS="--keep-going --autounmask --autounmask-write"
Before jumping into world upgrades, always start with the system updates first, but do actually keep close eye on these, especially if gcc needs to be upgraded (like it did in my case). So, pause a moment, see what needs to get up:
# eix -Iuc --system
Get the really important ones out of the way (glibc, binutils, gcc, etc.). Listing the installed system ones seriously takes less than one console screen. At least look at the thing.
Once those are safely out of the way, do a quickpkg on everything that’s installed so you have fancy little tarballs for when (not if) something breaks. As in, breaks for you. I’m pro at this. I’ve broken dozens of systems before .. uh .. yeah (and fixed them, too!).
# quickpkg --include-cfg=y `eix -I# --system`
Actually, while you’re at it, make sure portage is always saving tarballs of your installed packages in make.conf:
Once you’re feeling confident that the very basics are installed so you can do whirl-o-fun, this is where it gets really interesting. Tell portage to do upgrades in a random order, but to be nice, ask you if you want to do that package or not:
# for x in `eix -Iu# | sort -R`; do emerge -uq --ask $x; done;
Then just check in on your box every few whenevers to see how it’s doing, and approve or skip updates. That’s it.
I mean for this post to be kind of stupid and it turned into being somewhat serious, so here’s something even more serious: don’t do this because this is how I do it and the last thing you want is to have to search google for “that one weird gentoo dude who told me how to break my box” because I won’t be there to save you.
To discredit me even more, I’m also that guy who will throw this in his make.conf:
FEATURES="--jobs 4" MAKEOPTS="-j8"
So, yeah, go crazy. But remember, I’ve been breaking stuff much longer than you have … and fixing them too.
Final notes: If you’re determined to get something useful out of this post, here it is:
- Always use “quickpkg” if you think you’re about to do something risky.
- Having “buildpkg” in your make.conf is best practice. Everything goes in “/usr/portage/packages”
- “eix -I#” — display installed packages, name only. Use –system for system, and –world for all.
- If you ask for support from someone, they’re going to tell you to do a new install most likely. Use eix to get you a list of installed packages so you know what to port over.
- I can speak from experience that upgrading boxes even years old is possible … depending on how much patience you have. It’s possible. I really have done it lots of times.