tagfile-order.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* In this file is the order defined in which e.g. apt-ftparchive will write stanzas in.
  2. Other commands might or might not use this. 'apt-cache show' e.g. does NOT!
  3. The order we chose here is inspired by both dpkg and dak.
  4. The testcase test/integration/test-apt-tagfile-fields-order intends to ensure that
  5. this file isn't lacking (too far) behind dpkg over time. */
  6. static const char *iTFRewritePackageOrder[] = {
  7. "Package",
  8. "Package-Type",
  9. "Architecture",
  10. "Subarchitecture", // Used only by d-i
  11. "Version",
  12. "Revision", // Obsolete (warning in dpkg)
  13. "Package-Revision", // Obsolete (warning in dpkg)
  14. "Package_Revision", // Obsolete (warning in dpkg)
  15. "Kernel-Version", // Used only by d-i
  16. "Built-Using",
  17. "Built-For-Profiles",
  18. "Multi-Arch",
  19. "Status",
  20. "Priority",
  21. "Class", // dpkg nickname for Priority
  22. "Essential",
  23. "Installer-Menu-Item", // Used only by d-i
  24. "Section",
  25. "Source",
  26. "Origin",
  27. "Maintainer",
  28. "Original-Maintainer", // unknown in dpkg order
  29. "Bugs",
  30. "Config-Version", // Internal of dpkg
  31. "Conffiles",
  32. "Triggers-Awaited",
  33. "Triggers-Pending",
  34. "Installed-Size",
  35. "Provides",
  36. "Pre-Depends",
  37. "Depends",
  38. "Recommends",
  39. "Recommended", // dpkg nickname for Recommends
  40. "Suggests",
  41. "Optional", // dpkg nickname for Suggests
  42. "Conflicts",
  43. "Breaks",
  44. "Replaces",
  45. "Enhances",
  46. "Filename",
  47. "MSDOS-Filename", // Obsolete (used by dselect)
  48. "Size",
  49. "MD5sum",
  50. "SHA1",
  51. "SHA256",
  52. "SHA512",
  53. "Homepage",
  54. "Description",
  55. "Tag",
  56. "Task",
  57. 0
  58. };
  59. static const char *iTFRewriteSourceOrder[] = {
  60. "Package",
  61. "Source", // dsc file, renamed to Package in Sources
  62. "Format",
  63. "Binary",
  64. "Architecture",
  65. "Version",
  66. "Priority",
  67. "Class", // dpkg nickname for Priority
  68. "Section",
  69. "Origin",
  70. "Maintainer",
  71. "Original-Maintainer", // unknown in dpkg order
  72. "Uploaders",
  73. "Dm-Upload-Allowed", // Obsolete (ignored by dak)
  74. "Standards-Version",
  75. "Build-Depends",
  76. "Build-Depends-Arch",
  77. "Build-Depends-Indep",
  78. "Build-Conflicts",
  79. "Build-Conflicts-Arch",
  80. "Build-Conflicts-Indep",
  81. "Testsuite",
  82. "Testsuite-Triggers",
  83. "Homepage",
  84. "Vcs-Browser",
  85. "Vcs-Browse", // dak only (nickname?)
  86. "Vcs-Arch",
  87. "Vcs-Bzr",
  88. "Vcs-Cvs",
  89. "Vcs-Darcs",
  90. "Vcs-Git",
  91. "Vcs-Hg",
  92. "Vcs-Mtn",
  93. "Vcs-Svn",
  94. "Directory",
  95. "Package-List",
  96. "Files",
  97. "Checksums-Md5",
  98. "Checksums-Sha1",
  99. "Checksums-Sha256",
  100. "Checksums-Sha512",
  101. 0
  102. };
  103. /* Two levels of initialization are used because gcc will set the symbol
  104. size of an array to the length of the array, causing dynamic relinking
  105. errors. Doing this makes the symbol size constant */
  106. const char **TFRewritePackageOrder = iTFRewritePackageOrder;
  107. const char **TFRewriteSourceOrder = iTFRewriteSourceOrder;