summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile-order.c
blob: a7625b501913db6f45c643faea5878b48c686cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* In this file is the order defined in which e.g. apt-ftparchive will write stanzas in.
   Other commands might or might not use this. 'apt-cache show' e.g. does NOT!

   The order we chose here is inspired by both dpkg and dak.
   The testcase test/integration/test-apt-tagfile-fields-order intends to ensure that
   this file isn't lacking (too far) behind dpkg over time. */

static const char *iTFRewritePackageOrder[] = {
   "Package",
   "Package-Type",
   "Architecture",
   "Subarchitecture", // Used only by d-i
   "Version",
   "Revision",         // Obsolete (warning in dpkg)
   "Package-Revision", // Obsolete (warning in dpkg)
   "Package_Revision", // Obsolete (warning in dpkg)
   "Kernel-Version", // Used only by d-i
   "Built-Using",
   "Built-For-Profiles",
   "Multi-Arch",
   "Status",
   "Priority",
   "Class", // dpkg nickname for Priority
   "Essential",
   "Installer-Menu-Item", // Used only by d-i
   "Section",
   "Source",
   "Origin",
   "Maintainer",
   "Original-Maintainer", // unknown in dpkg order
   "Bugs",
   "Config-Version", // Internal of dpkg
   "Conffiles",
   "Triggers-Awaited",
   "Triggers-Pending",
   "Installed-Size",
   "Provides",
   "Pre-Depends",
   "Depends",
   "Recommends",
   "Recommended", // dpkg nickname for Recommends
   "Suggests",
   "Optional", // dpkg nickname for Suggests
   "Conflicts",
   "Breaks",
   "Replaces",
   "Enhances",
   "Filename",
   "MSDOS-Filename", // Obsolete (used by dselect)
   "Size",
   "MD5sum",
   "SHA1",
   "SHA256",
   "SHA512",
   "Homepage",
   "Description",
   "Tag",
   "Task",
   0
};
static const char *iTFRewriteSourceOrder[] = {
   "Package",
   "Source", // dsc file, renamed to Package in Sources
   "Format",
   "Binary",
   "Architecture",
   "Version",
   "Priority",
   "Class", // dpkg nickname for Priority
   "Section",
   "Origin",
   "Maintainer",
   "Original-Maintainer", // unknown in dpkg order
   "Uploaders",
   "Dm-Upload-Allowed", // Obsolete (ignored by dak)
   "Standards-Version",
   "Build-Depends",
   "Build-Depends-Arch",
   "Build-Depends-Indep",
   "Build-Conflicts",
   "Build-Conflicts-Arch",
   "Build-Conflicts-Indep",
   "Testsuite",
   "Testsuite-Triggers",
   "Homepage",
   "Vcs-Browser",
   "Vcs-Browse", // dak only (nickname?)
   "Vcs-Arch",
   "Vcs-Bzr",
   "Vcs-Cvs",
   "Vcs-Darcs",
   "Vcs-Git",
   "Vcs-Hg",
   "Vcs-Mtn",
   "Vcs-Svn",
   "Directory",
   "Package-List",
   "Files",
   "Checksums-Md5",
   "Checksums-Sha1",
   "Checksums-Sha256",
   "Checksums-Sha512",
   0
};

/* Two levels of initialization are used because gcc will set the symbol
   size of an array to the length of the array, causing dynamic relinking
   errors. Doing this makes the symbol size constant */
const char **TFRewritePackageOrder = iTFRewritePackageOrder;
const char **TFRewriteSourceOrder = iTFRewriteSourceOrder;