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