anaconda has a lot of sources, and this can be a little intimidating at first. It can be difficult to figure out where to even start looking when you're trying to track a problem down. This guide is meant as a very high-level overview of the various groups of source files and what sorts of things they cover. It's not incredibly detailed, and some source files don't want to fit into categories. Lots of pieces of functionality are spread out across multiple files. The main article about Anaconda describes where to obtain the source code, which is presently maintained in a 'git' repository.
These are the primary UI files for the interfaces supported by anaconda: graphical, text, and command line (which is really just a special form of text). Each is implemented by its own directory. For the graphical installer, the glade interface files are in the same location. For the text installer, this also includes the code required to do line-oriented input/output. There is a well-defined API here allowing for both adding additional interfaces and extending the existing interfaces with new screens.
These files and directories contain code common to all supported interfaces. The first two files contain mostly base classes with code common to both the GUI and TUI. communication.py is a small file containing constants and methods for communicating between objects within the UI.
This file controls setting up VNC for when it is requested during installation. Afterward, installs proceed in graphical mode.
The anaconda GUI makes use of some custom widgets. Everything listed below either implements these widgets or is needed for support.
This directory contains images used by the timezone map widget.
These two directories are support files. The glade subdirectory contains code to help glade understand these new widgets so they can be used in the interface builder. The python subdirectory contains code to allow using the widgets through gobject-introspection in a more native Python manner.
And then this is the code that implements the widgets themselves. There is one header and one source code file per widget class.
All partitioning code is now contained in the python-blivet package, which we also work on.
This file controls configuring and writing out the bootloader to the installed system. Each type of machine has its own bootloader quirks (what types of devices and filesystems are supported by the bootloader, the syntax of the config file, etc). and therefore has its own class. This file additionally handles pulling together kernel command line arguments.
These files hold the configuration settings that are either entered through the interface or through kickstart. To some extent, they affect the installation (for instance, the language and keyboard settings are used in anaconda). However, the main purpose is to write these out to the installed system at the end of an installation.
These files control the installation of files in some format to the system. anaconda allows for multiple installation backends, though the most commonly used are yumpayload.py and livepayload.py. Each backend provides methods for selecting and removing environments, groups, and packages; configuring repos for use during and after installation; reporting progress; and so forth. There is a well-defined API here allowing for adding additional backends.
The anaconda-yum script is used to work around problems with anaconda, yum, urlgrabber, and threads. This script does the actual installation of packages. It is also Python.
Installation classes define settings that form a sort of installation profile. This includes steps to show and skip, product names, installation method, enabled repositories, configuration settings, and so forth. We primarily use it to create a difference between Fedora and RHEL installs. Other projects or ISVs could define their own installation classes for their own defaults.
Kickstart is a way of automating installations by providing anaconda with a file that contains all the data that the user would have to provide via the UI. This file is an interface between the parser in the pykickstart package and the anaconda internals. Now that the UI now constructs a kickstart data object in memory, this file also handles certain execution tasks as well.
These files implement installation from the live CD. They provide some files needed to launch the installer from the live CD's desktop. The actual live installation is handled by the appropriate packaging backend.
These files provide the rescue mode.
These files control all the error reporting for anaconda. errors.py, in combination with the UI, controls displaying errors that the user can do something about or at least that anaconda can anticipate. This is the central location for error messages. exception.py controls a display of errors that anaconda cannot anticipate - basically, this is where unhandled exceptions get handled. This is also where anaconda interfaces with libreport to report issues to Bugzilla.
Installation Control Library
This is a loose collection of important files. install.py actually performs the installation steps, which just consists of calling out to methods throughout kickstart, anaconda, and python-blivet. progress.py provides a way to install.py and the packaging backends to communicate with the UI for moving the progress bar and displaying messages. queue.py is a support file that constructs communications queues, like those used in progress.py and communication.py. Finally, threads.py handles creating and managing threads, which anaconda now extensively uses for running tasks in the background while still allowing the UI to update.
These files provide a variety of miscellaneous methods that are used throughout the installer. These functions include the logging framework, finding the user's location via geolocation, looking up information about attached optical installation media, communicating with NetworkManager, and many other tasks. They also contain methods that just don't fit anywhere else.
The Main Program
This is the main anaconda program that gets called via systemd at the end of system bootup. It handles lots of environment setup, enables updates if they exist, reads any kickstart file, sets up VNC, and other tasks. When all this is done, it hands control over to the UI which in turn drives the rest of the installation.
Someone with a better understanding of things than me (clumens) needs to fill this section in.
Given that anaconda is internally building a kickstart file via the UI and then executing it, certain installation tasks are more easily implemented as kickstart scripts. These do that. interactive-defaults.ks is a kickstart file pulled in at the beginning of an interactive, non-kickstart installation that contains certain default settings for the UI.
The former is a program that monitors memory usage during installation and writes out /tmp/memory.dat with this information. The latter is a gnuplot script that interprets that file and generates a graph. We use this to identify spikes in memory usage.
makeupdates is a tool for creating updates images for testing anaconda fixes. You can call it with reference to a particular tag or commit and it will build an image containing all the changes to the tree since that point.
logpicker is a tool for sending anaconda logs and other useful diagnostic information out of the installation environment in various ways (scp, ftp, Bugzilla...). It has some overlap with the graphical process that lets you submit a bug report when anaconda crashes. It has not been updated since being committed in 2010 and maybe somewhat bitrotten.