- add repomd.xml data sections to meta data
[platform/upstream/libsolv.git] / src / knownid.h
1 /*
2  * Copyright (c) 2007, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 /*
9  * knownid.h
10  *
11  */
12
13 /*
14  * Warning: you're free to append new entries, but insert/delete breaks
15  * the ABI!
16  */
17
18 #undef KNOWNID
19 #ifdef KNOWNID_INITIALIZE
20 # define KNOWNID(a, b) b
21 static const char *initpool_data[] = {
22 #else
23 # define KNOWNID(a, b) a
24 enum sat_knownid {
25 #endif
26
27 KNOWNID(ID_NULL,                        "<NULL>"),
28 KNOWNID(ID_EMPTY,                       ""),
29
30 /* The following Ids are stored in the solvable and must
31  * come in one block */
32 KNOWNID(SOLVABLE_NAME,                  "solvable:name"),
33 KNOWNID(SOLVABLE_ARCH,                  "solvable:arch"),
34 KNOWNID(SOLVABLE_EVR,                   "solvable:evr"),
35 KNOWNID(SOLVABLE_VENDOR,                "solvable:vendor"),
36 KNOWNID(SOLVABLE_PROVIDES,              "solvable:provides"),
37 KNOWNID(SOLVABLE_OBSOLETES,             "solvable:obsoletes"),
38 KNOWNID(SOLVABLE_CONFLICTS,             "solvable:conflicts"),
39 KNOWNID(SOLVABLE_REQUIRES,              "solvable:requires"),
40 KNOWNID(SOLVABLE_RECOMMENDS,            "solvable:recommends"),
41 KNOWNID(SOLVABLE_SUGGESTS,              "solvable:suggests"),
42 KNOWNID(SOLVABLE_SUPPLEMENTS,           "solvable:supplements"),
43 KNOWNID(SOLVABLE_ENHANCES,              "solvable:enhances"),
44 KNOWNID(RPM_RPMDBID,                    "rpm:dbid"),
45
46 /* normal requires before this, prereqs after this */
47 KNOWNID(SOLVABLE_PREREQMARKER,          "solvable:prereqmarker"),
48 /* normal provides before this, generated file provides after this */
49 KNOWNID(SOLVABLE_FILEMARKER,            "solvable:filemarker"),
50 KNOWNID(NAMESPACE_INSTALLED,            "namespace:installed"),
51 KNOWNID(NAMESPACE_MODALIAS,             "namespace:modalias"),
52 KNOWNID(NAMESPACE_SPLITPROVIDES,        "namespace:splitprovides"),
53 KNOWNID(NAMESPACE_LANGUAGE,             "namespace:language"),
54 KNOWNID(NAMESPACE_FILESYSTEM,           "namespace:filesystem"),
55 KNOWNID(NAMESPACE_OTHERPROVIDERS,       "namespace:otherproviders"),
56 KNOWNID(SYSTEM_SYSTEM,                  "system:system"),
57 KNOWNID(ARCH_SRC,                       "src"),
58 KNOWNID(ARCH_NOSRC,                     "nosrc"),
59 KNOWNID(ARCH_NOARCH,                    "noarch"),
60
61 KNOWNID(REPOSITORY_SOLVABLES,           "repository:solvables"),
62 KNOWNID(REPOSITORY_DELTAINFO,           "repository:deltainfo"),
63
64 /* sub-repository information, they will get loaded on demand */
65 KNOWNID(REPOSITORY_EXTERNAL,            "repository:external"),
66 KNOWNID(REPOSITORY_KEYS,                "repository:keys"),
67 KNOWNID(REPOSITORY_LOCATION,            "repository:location"),
68
69 /* file provides already added to our solvables */
70 KNOWNID(REPOSITORY_ADDEDFILEPROVIDES,   "repository:addedfileprovides"),
71 /* inode of the rpm database for rpm --rebuilddb detection */
72 KNOWNID(REPOSITORY_RPMDBCOOKIE,         "repository:rpmdbcookie"),
73
74 /* The void type is usable to encode one-valued attributes, they have
75    no associated data.  This is useful to encode values which many solvables
76    have in common, and whose overall set is relatively limited.  A prime
77    example would be the media number.  The actual value is encoded in the
78    SIZE member of the key structure.  Be warned: careless use of this
79    leads to combinatoric explosion of number of schemas.  */
80 KNOWNID(REPOKEY_TYPE_VOID,              "repokey:type:void"),
81 KNOWNID(REPOKEY_TYPE_CONSTANT,          "repokey:type:constant"),
82 KNOWNID(REPOKEY_TYPE_CONSTANTID,        "repokey:type:constantid"),
83 KNOWNID(REPOKEY_TYPE_ID,                "repokey:type:id"),
84 KNOWNID(REPOKEY_TYPE_NUM,               "repokey:type:num"),
85 KNOWNID(REPOKEY_TYPE_U32,               "repokey:type:num32"),
86 KNOWNID(REPOKEY_TYPE_DIR,               "repokey:type:dir"),
87 KNOWNID(REPOKEY_TYPE_STR,               "repokey:type:str"),
88 KNOWNID(REPOKEY_TYPE_IDARRAY,           "repokey:type:idarray"),
89 KNOWNID(REPOKEY_TYPE_REL_IDARRAY,       "repokey:type:relidarray"),
90 KNOWNID(REPOKEY_TYPE_DIRSTRARRAY,       "repokey:type:dirstrarray"),
91 KNOWNID(REPOKEY_TYPE_DIRNUMNUMARRAY,    "repokey:type:dirnumnumarray"),
92 KNOWNID(REPOKEY_TYPE_MD5,               "repokey:type:md5"),
93 KNOWNID(REPOKEY_TYPE_SHA1,              "repokey:type:sha1"),
94 KNOWNID(REPOKEY_TYPE_SHA256,            "repokey:type:sha256"),
95 KNOWNID(REPOKEY_TYPE_FIXARRAY,          "repokey:type:fixarray"),
96 KNOWNID(REPOKEY_TYPE_FLEXARRAY,         "repokey:type:flexarray"),
97
98 KNOWNID(SOLVABLE_SUMMARY,               "solvable:summary"),
99 KNOWNID(SOLVABLE_DESCRIPTION,           "solvable:description"),
100 KNOWNID(SOLVABLE_DISTRIBUTION,          "solvable:distribution"),
101 KNOWNID(SOLVABLE_AUTHORS,               "solvable:authors"),
102 KNOWNID(SOLVABLE_PACKAGER,              "solvable:packager"),
103 KNOWNID(SOLVABLE_GROUP,                 "solvable:group"),
104 KNOWNID(SOLVABLE_URL,                   "solvable:url"),
105 KNOWNID(SOLVABLE_KEYWORDS,              "solvable:keywords"),
106 KNOWNID(SOLVABLE_LICENSE,               "solvable:license"),
107 KNOWNID(SOLVABLE_BUILDTIME,             "solvable:buildtime"),
108 KNOWNID(SOLVABLE_BUILDHOST,             "solvable:buildhost"),
109 KNOWNID(SOLVABLE_EULA,                  "solvable:eula"),
110 KNOWNID(SOLVABLE_CPE_ID,                "solvable:cpeid"),
111 KNOWNID(SOLVABLE_MESSAGEINS,            "solvable:messageins"),
112 KNOWNID(SOLVABLE_MESSAGEDEL,            "solvable:messagedel"),
113 KNOWNID(SOLVABLE_INSTALLSIZE,           "solvable:installsize"),
114 KNOWNID(SOLVABLE_DISKUSAGE,             "solvable:diskusage"),
115 KNOWNID(SOLVABLE_FILELIST,              "solvable:filelist"),
116 KNOWNID(SOLVABLE_INSTALLTIME,           "solvable:installtime"),
117 KNOWNID(SOLVABLE_MEDIADIR,              "solvable:mediadir"),
118 KNOWNID(SOLVABLE_MEDIAFILE,             "solvable:mediafile"),
119 KNOWNID(SOLVABLE_MEDIANR,               "solvable:medianr"),
120 KNOWNID(SOLVABLE_DOWNLOADSIZE,          "solvable:downloadsize"),
121 KNOWNID(SOLVABLE_SOURCEARCH,            "solvable:sourcearch"),
122 KNOWNID(SOLVABLE_SOURCENAME,            "solvable:sourcename"),
123 KNOWNID(SOLVABLE_SOURCEEVR,             "solvable:sourceevr"),
124 KNOWNID(SOLVABLE_ISVISIBLE,             "solvable:isvisible"),
125 KNOWNID(SOLVABLE_CHECKSUM,              "solvable:checksum"),
126 KNOWNID(SOLVABLE_PKGID,                 "solvable:pkgid"),      /* pkgid: md5sum over header + payload */
127 KNOWNID(SOLVABLE_HDRID,                 "solvable:hdrid"),      /* hdrid: sha1sum over header only */
128 KNOWNID(SOLVABLE_LEADSIGID,             "solvable:leadsigid"),  /* leadsigid: md5sum over lead + sigheader */
129
130 KNOWNID(SOLVABLE_PATCHCATEGORY,         "solvable:patchcategory"),
131 KNOWNID(SOLVABLE_HEADEREND,             "solvable:headerend"),
132
133 /* stuff for solvables of type pattern */
134 KNOWNID(SOLVABLE_CATEGORY,              "solvable:category"),
135 KNOWNID(SOLVABLE_INCLUDES,              "solvable:includes"),
136 KNOWNID(SOLVABLE_EXTENDS,               "solvable:extends"),
137 KNOWNID(SOLVABLE_ICON,                  "solvable:icon"),
138 KNOWNID(SOLVABLE_ORDER,                 "solvable:order"),
139
140 KNOWNID(UPDATE_REBOOT,                  "update:reboot"),       /* reboot suggested (kernel update) */
141 KNOWNID(UPDATE_RESTART,                 "update:restart"),      /* restart suggested (update stack update) */
142 KNOWNID(UPDATE_RELOGIN,                 "update:relogin"),      /* restart suggested (update stack update) */
143
144 KNOWNID(UPDATE_MESSAGE,                 "update:message"),      /* restart suggested (update stack update) */
145                                                                        /* 'content' of patch, usually list of packages */
146 KNOWNID(UPDATE_COLLECTION,              "update:collection"),          /*  "name evr arch" */
147 KNOWNID(UPDATE_COLLECTION_NAME,         "update:collection:name"),     /*   name */
148 KNOWNID(UPDATE_COLLECTION_EVR,          "update:collection:evr"),      /*   epoch:version-release */
149 KNOWNID(UPDATE_COLLECTION_ARCH,         "update:collection:arch"),     /*   architecture */
150 KNOWNID(UPDATE_COLLECTION_FILENAME,     "update:collection:filename"), /*   filename (of rpm) */
151 KNOWNID(UPDATE_COLLECTION_FLAGS,        "update:collection:flags"),    /*   reboot(1)/restart(2) suggested if this rpm gets updated */
152
153 KNOWNID(UPDATE_REFERENCE,               "update:reference"),            /* external references for the update */
154 KNOWNID(UPDATE_REFERENCE_TYPE,          "update:reference:type"),       /*  type, e.g. 'bugzilla' or 'cve' */
155 KNOWNID(UPDATE_REFERENCE_HREF,          "update:reference:href"),       /*  href, e.g. 'http://bugzilla...' */
156 KNOWNID(UPDATE_REFERENCE_ID,            "update:reference:id"),         /*  id, e.g. bug number */
157 KNOWNID(UPDATE_REFERENCE_TITLE,         "update:reference:title"),      /*  title, e.g. "the bla forz scribs on fuggle" */
158
159 /* name */
160 KNOWNID(PRODUCT_REFERENCEFILE,          "product:referencefile"),
161 KNOWNID(PRODUCT_SHORTLABEL,             "product:shortlabel"),
162 KNOWNID(PRODUCT_DISTPRODUCT,            "product:distproduct"),
163 KNOWNID(PRODUCT_DISTVERSION,            "product:distversion"),
164 KNOWNID(PRODUCT_TYPE,                   "product:type"),
165 KNOWNID(PRODUCT_URL,                    "product:url"),
166 KNOWNID(PRODUCT_URL_TYPE,               "product:url:type"),
167 KNOWNID(PRODUCT_FLAGS,                  "product:flags"),
168 KNOWNID(PRODUCT_PRODUCTLINE,            "product:productline"),
169 KNOWNID(PRODUCT_REGISTER_TARGET,        "product:regtarget"),
170 KNOWNID(PRODUCT_REGISTER_RELEASE,       "product:regrelease"),
171
172 /* argh */
173 KNOWNID(SUSETAGS_DATADIR,               "susetags:datadir"),
174
175 /* timestamp then the repository was generated */
176 KNOWNID(REPOSITORY_TIMESTAMP,           "repository:timestamp"),
177 /* hint when the metadata could be outdated
178    w/respect to generated timestamp */
179 KNOWNID(REPOSITORY_EXPIRE,              "repository:expire"),
180
181 /* which things does this repo provides updates for, if it does (array) */
182 KNOWNID(REPOSITORY_UPDATES,             "repository:updates"),
183 /* for the repository:update label and cpeid, use the repository:product
184    sub attributes */
185
186 /* which products this repository is supposed to be for (array) */
187 KNOWNID(REPOSITORY_DISTROS,             "repository:distros"),
188 KNOWNID(REPOSITORY_PRODUCT_LABEL,       "repository:product:label"),
189 KNOWNID(REPOSITORY_PRODUCT_CPEID,       "repository:product:cpeid"),
190
191 /* keyword (tags) for this repository */
192 KNOWNID(REPOSITORY_KEYWORDS,            "repository:keywords"),
193 /* revision of the repository. arbitrary string */
194 KNOWNID(REPOSITORY_REVISION,            "repository:revision"),
195
196 KNOWNID(DELTA_PACKAGE_NAME,             "delta:pkgname"),
197 KNOWNID(DELTA_PACKAGE_EVR,              "delta:pkgevr"),
198 KNOWNID(DELTA_PACKAGE_ARCH,             "delta:pkgarch"),
199 KNOWNID(DELTA_LOCATION_DIR,             "delta:locdir"),
200 KNOWNID(DELTA_LOCATION_NAME,            "delta:locname"),
201 KNOWNID(DELTA_LOCATION_EVR,             "delta:locevr"),
202 KNOWNID(DELTA_LOCATION_SUFFIX,          "delta:locsuffix"),
203 KNOWNID(DELTA_DOWNLOADSIZE,             "delta:downloadsize"),
204 KNOWNID(DELTA_CHECKSUM,                 "delta:checksum"),
205 KNOWNID(DELTA_BASE_EVR,                 "delta:baseevr"),
206 KNOWNID(DELTA_SEQ_NAME,                 "delta:seqname"),
207 KNOWNID(DELTA_SEQ_EVR,                  "delta:seqevr"),
208 KNOWNID(DELTA_SEQ_NUM,                  "delta:seqnum"),
209
210 KNOWNID(NAMESPACE_PRODUCTBUDDY,         "namespace:productbuddy"),
211
212 KNOWNID(REPOSITORY_REPOMD,              "repository:repomd"),
213 KNOWNID(REPOSITORY_REPOMD_TYPE,         "repository:repomd:type"),
214 KNOWNID(REPOSITORY_REPOMD_LOCATION,     "repository:repomd:location"),
215 KNOWNID(REPOSITORY_REPOMD_TIMESTAMP,    "repository:repomd:timestamp"),
216 KNOWNID(REPOSITORY_REPOMD_CHECKSUM,     "repository:repomd:checksum"),
217 KNOWNID(REPOSITORY_REPOMD_OPENCHECKSUM, "repository:repomd:openchecksum"),
218
219 KNOWNID(ID_NUM_INTERNAL,                0)
220
221 #ifdef KNOWNID_INITIALIZE
222 };
223 #else
224 };
225 #endif
226
227 #undef KNOWNID
228