After I thought I had a decent script for figuring out what packages
Anaconda would install from a Fedora 10 DVD, I decided to test it
against reality. Reality made the script cry like a little girl, so it
was back to the drawing board.
The problem, simply put, was that I had over-estimated the internal
consistency of the data. Here’s what I learned in the process of
producing a 100% match between my script and an actual default install
of Fedora 10:
- Packages listed in comps.xml don't necessarily exist, even if they're marked mandatory (like iprutils).
- Conditional packages in comps.xml often depend on packages that are not themselves listed, but get included during dependency resolution (all of the OpenOffice language packs, for instance).
- Packages often require themselves (more than two-thirds of perl's requirements are met by... perl).
- Some packages specify a requirement for files installed by a package rather than features provided by that package (such as /usr/bin/perl; in an amusing note, this file is required by, but not a feature provided by, perl).
- A few packages require files that are not installed by any package, and that's not considered an error.
- It's not unusual for multiple packages to satisfy the same requirement, and when they do, Anaconda chooses the one with the shortest name. Seriously.
- ...unless it's obsoleted by the other one, as in the case of the synaptics driver.
- RPM doesn't actually care about all this nonsense; when it wants to know what libraries a package depends on, it opens it up and runs ldd on the contents.
- This is required exactly once during a default Fedora 10 install, to discover the fact that totem-mozplugin requires mozplugger. I had to fake that one.
At some point, this knowledge will be put to use upgrading my EEE PC
from Fedora 9, but now that I can declare victory and stop tinkering
with the script for a while, I’m going to go finish the Japanese novel
I’m currently working my way through (60 pages down, 200 to go).