Updating gentoo: emerge -uD world

Translation of the original in Catalan. Read it in: CatalàCastellano

gentoo.gif

For those of us who use Gentoo, the command in the title sounds very familiar, and even more so the typical effect that follows this command when we have a pile of packages to update and we leave the computer compiling all night, right? or not... well, because often at some point in the process a problem has come up and the compilation has stopped. A lot of time lost because the system was waiting for us to fix a little problem that had come up so it could continue, and the umpteen hundred packages that were to be installed have been left half done.

In this week's Gentoo Weekly News, in the Tips and Tricks section, a script has appeared that without a doubt, if you start using it, you won't be able to live without it. Really useful, because it takes care of exactly the problem I mentioned. That is, if during an update a package gives an error it will keep compiling and at the end it will leave a report inside a file with the problems that have come up during the system's upgrade.

To install the script:

# wget -O /usr/bin/update-world http://countzero.amidal.com/files/update-world
# chmod +x /usr/bin/update-world

To prepare the upgrade:

# update-world --prepare

This creates a list of the packages that will be installed (equivalent to emerge -uD --newuse world). If you want, you can also generate a list with all the system's packages with the command update-world --empty, it would be equivalent to emerge -e world). The list of packages to install you can find it in ~/.update-world/emergelist, so once the package list has been generated you can modify it and then you can launch the update:

# update-world --install

In case a package fails during the package installation/update process (remember that it's equivalent to emerge -uD world), in ~/.update-world/failedlist you'll find a list with the packages that have failed. It will also create a link to ~/.update-world/[date]/log/ to the log with the error that package has given.

As you can see, quite a piece of ingenuity that will simplify the job of administering the Gentoo systems we have.