Wednesday, December 24 2008

You know what Anaconda really needs?

An Unselect All button, so you don’t have to manually click on dozenshundreds of “optional” packages that are installed by default. It’s pretty sad that the easiest way to reduce the amount of cruft in a Fedora/Redhat/CentOS install is to ignore the GUI package selector, install once, save the resulting Kickstart config, load it into a text editor, strip out everything you’re sure you won’t need, re-install with that template, and then see if you ended up with a bootable system.

This still installs a lot of stuff that you’ll never need or want, but at least the resulting package list is smaller, and after a few iterations you can build a decent server or netbook install.

[Update: If my script is correct (package selection from comps.xml and dependencies from primary.sqlite), installing Fedora 10 without changing the default list of packages will install 1099 1109 1116 1070 RPMs out of 2218 total; stripping out the default-but-optional packages brings that down to 510 514 522 505, which still includes a working Gnome desktop environment. A typical offender is a2ps, which pulls in texlive, imagemagick, ghostscript, ncurses, groff, and plenty of others (even libthai!).]

I’d also like a Really, Really Unselect Everything That Isn’t Necessary For This Locale button; “core” and “base” still have a fair amount of cruft in them.

Note: this is not a Linux-versus-{Windows,Mac,whateverdude} posting; it’s just about the difficulty of overriding the decision to include every precious snowflake’s package in the standard install. The decision to enable every compile-time option doesn’t help, either, since you end up pulling in half a dozen other packages on the off chance that the user is in an environment where one of them might matter.

Why do I care? Because about six weeks ago, I did an update on my EEE PC running Fedora 9, and there were so many updated packages that I didn’t have enough free disk space on the 4 GB flash drive to download them all, much less unpack and install. I had to symlink the yum directory to a loopback-mounted ext2 image on another flash drive (because the drive itself was FAT32, which wasn’t good enough).

[note on the twice-updated RPM counts: my script wasn’t handling conditional packages correctly. I was processing conditionals before resolving all dependencies, so it missed cases where the package in the condition was added by a dependency, not by another group. A good example is language packs for OpenOffice: you select the packages for each application, all of which depend on the -core package; when you add support for a language, it adds the office language packs if it sees -core.]

[Update: Okay, I had to completely redo the dependency resolution, because multiple non-conflicting packages supply the same requirements. Anaconda chooses exactly one of them, apparently based on the length of the package name (shortest wins). My script now produces exactly the same results as a default install of F10, so the numbers should finally stop changing.]