You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Joey Hess 33ded2008e multiply all menu-item-numbers by 100 14 years ago
debian multiply all menu-item-numbers by 100 14 years ago
generators * Improve regexp in 90security to not misfire if the mirror's name or path 15 years ago
README * Strip everything after the first dot from generator names when 16 years ago
TODO shortened and improved wording 15 years ago
apt-setup * Use log-output for commands that produce output if run in the installer. 15 years ago
apt-setup-verify Use correct tag with log-output 15 years ago

README

apt-setup is used to generate an /etc/apt/sources.list for the installed
system. It does this by creating a new sources.list file (commenting out
the previous contents) and then running each program in
/usr/lib/apt-setup/generators/ in turn (run-parts ordering). Each generator
is passed the name of a temporary file that it can write sources.list lines
(and comments) to.

After the generator finishes writing the file, apt-setup-verify will be run
on it to verify that each line of the sources sources works, and it will be
added to the sources.list. Generators can also run apt-setup-verify
themselves and do their own error recovery if it fails. apt-setup-verify
tests each line of the file and comments out lines that do not work, and
exits nonzero if all deb and deb-src lines in the file failed.

Generators should add both "deb" lines and corresponding
deb-src lines to the sources.list. apt-setup-verify will handle commenting
out any deb-src lines for unavailable sources.

Generators can ask configuration questions using debconf. To support
backing up, generators should exit with the special return code of 10 if
the user backs up from their first question. Each generator should provide
a progress bar text template named apt-setup/progress/<generator>, where
<generator> is the script's name with leading numbers removed. Anything
after the first dot (if any) will also be removed when constructing the
progress template name, so that different scripts that share the same
purpose can easily be written.

Note that apt-setup and its generators may be run against some other system
in a chroot. (i.e., when installing Debian.) If apt-setup is running this
way, then ROOT will be set to the root of the chroot that it is acting on
and all sources.list validation will occur inside the chroot.

apt-setup is split into several udebs that contain different generators.
These udebs are installed depending on the type of install; for a install
from CD, cdrom-detect queues apt-cdrom-setup for install, for an install
from the network, choose-mirror queues apt-mirror-setup, etc.