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.
 
 
 
 

61 lines
1.3 KiB

  1. /*
  2. * Data structure for representing http, https, and ftp mirror information.
  3. * Contains essentially the same information as Mirrors.masterlist,
  4. * but only as much information as is necessary.
  5. */
  6. struct mirror_t {
  7. char *site;
  8. char *country; /* NULL for GeoDNS */
  9. char *root;
  10. };
  11. #define DEBCONF_BASE "mirror/"
  12. /*
  13. * The string defined below must match the string used in the templates
  14. * (http, https, and ftp) for this option.
  15. */
  16. #define MANUAL_ENTRY "manual"
  17. /*
  18. * Allow to read the full Architectures: line from Release file,
  19. * which is up to 123 bytes long at time of writing.
  20. */
  21. #define BUFFER_LENGTH 256
  22. #define SUITE_LENGTH 32
  23. /* Stack of suites */
  24. static const char suites[][SUITE_LENGTH] = {
  25. /* higher preference */
  26. "oldstable",
  27. "stable",
  28. "testing",
  29. "unstable"
  30. /* lower preference */
  31. };
  32. /*
  33. * Allow for two more releases than the number of suites:
  34. * - all suites
  35. * - default release (if not in suites)
  36. * - NULL list terminator
  37. */
  38. #define MAXRELEASES (sizeof(suites)/SUITE_LENGTH + 2)
  39. /*
  40. * Data structure containing information on releases supported by a mirror
  41. */
  42. struct release_t {
  43. char *name;
  44. char *suite;
  45. char *archs;
  46. int status;
  47. };
  48. /* Values for status field in release_t */
  49. #define IS_VALID 0x1
  50. #define IS_DEFAULT 0x2
  51. #define GET_SUITE 0x4
  52. #define GET_CODENAME 0x8