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.


16 years ago
  1. apt-setup is used to generate an /etc/apt/sources.list for the installed
  2. system. It does this by creating a new sources.list file (commenting out
  3. the previous contents) and then running each program in
  4. /usr/lib/apt-setup/generators/ in turn (run-parts ordering). Each generator
  5. is passed the name of a temporary file that it can write sources.list lines
  6. (and comments) to.
  7. After the generator finishes writing the file, apt-setup-verify will be run
  8. on it to verify that each line of the sources works, and it will be
  9. added to the sources.list. Generators can also run apt-setup-verify
  10. themselves and do their own error recovery if it fails. apt-setup-verify
  11. tests each line of the file and comments out lines that do not work, and
  12. exits zero if all deb and deb-src lines in the file are ok, 30 if the
  13. verification process was canceled, and otherwise nonzero on error.
  14. Generators should add both "deb" lines and corresponding
  15. deb-src lines to the sources.list. apt-setup-verify will handle commenting
  16. out any deb-src lines for unavailable sources.
  17. Generators can ask configuration questions using debconf. To support
  18. backing up, generators should exit with the special return code of 10 if
  19. the user backs up from their first question. Each generator should provide
  20. a progress bar text template named apt-setup/progress/<generator>, where
  21. <generator> is the script's name with leading numbers removed. Anything
  22. after the first dot (if any) will also be removed when constructing the
  23. progress template name, so that different scripts that share the same
  24. purpose can easily be written.
  25. Generators can advance the progress bar from PROGRESS_FROM up to
  26. PROGRESS_TO, or it will be moved to the next step before the next
  27. generator is started.
  28. apt-setup-verify runs apt-get update inside debconf-apt-progress, to update
  29. the progress bar with apt progress information. By default the progress bar
  30. will not be moved. Use --from and --to options to override this. The values
  31. of these options will be used as start and end points for the progress bar;
  32. each source line to be tested will get an equal share. The resulting values
  33. are passed on to debconf-apt-progress.
  34. For example:
  35. apt-setup-verify --from 1 --to 100 <file>
  36. Note that apt-setup and its generators may be run against some other system
  37. in a chroot (i.e., when installing Debian). If apt-setup is running this
  38. way, then ROOT will be set to the root of the chroot that it is acting on
  39. and all sources.list validation will occur inside the chroot.
  40. apt-setup is split into several udebs that contain different generators.
  41. These udebs are installed depending on the type of install; for a install
  42. from CD, cdrom-detect queues apt-cdrom-setup for install, for an install
  43. from the network, choose-mirror queues apt-mirror-setup, etc.