I do not like Gentoo
You may have heard of the new cool Linux distribution of the week, Gentoo. You may know someone who uses it, or perhaps you even use it yourself. Everyone loves Gentoo! Well, not quite everyone.
I do not like Gentoo. I think that they have some very bad implementations of a few good ideas. Let’s begin by looking at the build system.
Ebuilds
Gentoo’s build system is largely inspired by the FreeBSD ports collection, the primary difference here being that rather than using make, portage relies on python to build and install packages. And why not? It seems to make sense to use something a bit more powerful than make and a handful of shell scripts to do the complicated conditional dependency work and package creation that the Gentoo ebuild system does. But the problem is that the build scripts aren’t in python, they’re in ebuild. Eh? Ebuild, wonderfully undocumented, seems to be an attempt to add functions to shell scripts. You know, like the ones shell scripts already have. So you declare some variables, write a few functions, toss the letter ‘e’ in front some random words, and the end result is something that looks a whole lot like a Makefile. What was the point? All the dependencies are handled in the top-level emerge script itself, let all of that python be accidentally byte-compile as a module would, so there’s really no great advantage to reinventing the wheel here with ebuild.
$USE
Remember those conditional dependencies I mentioned earlier? I lied. Gentoo developers have created a wonderful system by which you can customize which features you want compiled into your software so that the package maintainers can gleefully ignore it. Does vim really “depend” on cscope? Not at all. But why on earth would you not want it? Does KDE require RPM to run? No, but I’m sure you’re going to make frequent use of the KDE RPM manager from within your RPMless distribution. Gentoo packages give you the software that the maintainer wants, not what you want.
Another gripe I have with USE is that it’s a system wide setting. There is no way to say “I want to use gtk+ with everything except aumix,” without compiling aumix separately each time. One emerge sync ; emerge -u world later, and your software no longer behaves as you wish.
“But you can rewrite the ebuilds!” I can hear you saying. Really? If someone could go back in time about a month and explain to me what I’m doing wrong with trying to use PORTDIR_OVERLAY, I’d greatly appreciate it. Really, I don’t like cscope.
Optimizations
This is always a fun one. I love it when people brag to me about how much faster their system runs after compiling -O29 -magic. Obviously the compiler looks at the CPU and makes everything optimized exactly for your system, otherwise there’d be no point in compiling an entire distribution every time you install it. Compiling your system from scratch may give you a warm fuzzy feeling inside, but thinking that you’re going to save massive amounts of time from everything running so very much faster is probably less than accurate. Besides the time lost to the actual compilation, appreciable speed gains are rare. The compiler can’t rewrite your poor code. And, as shown above, you probably won’t have the advantage of ending up with exactly the system you want, either.
/mnt
What’s with the whole shm init cache thing? Having dependencies in init scripts seems like a good idea (though rewriting the bourne shell yet again does not), but why are they mounted in /mnt/.init.d ? /mnt is where you mount things, not /mnt/other_dir. Unlike other systems that encourage mounting devices in directories like /mnt/floppy, you can’t just ignore this and mount something in /mnt, because it kills the init script system. And if you happen to try this while in the installation environment, you cover up root and bring the whole system down. Yippee skippee! It is possible to change this (svcdir in /sbin/functions.sh), but it’s not documented, and putting configuration files in /sbin isn’t exactly intuitive (or, arguably, correct).
The problems with gentoo seem endless. Will I find my package in the app-admin section or the sys-apps section? Why is app-emacs not in app-editors? Why is /usr/lib/libncurses.so not actually a shared object? Does help output really need to be in color? In the end, Gentoo tries to be a system customized to the user, and it fails. Gentoo is inconsistent, and at its worst, completely broken. It offers all the disadvantages of compiling an entire system from source, yet none of the advantages of a coherent distribution.