Imported Upstream version 0.7.27
[platform/upstream/libsolv.git] / src / knownid.h
1 /*
2  * Copyright (c) 2007-2014, 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 #ifndef LIBSOLV_KNOWNID_H
19 #define LIBSOLV_KNOWNID_H
20
21 #undef KNOWNID
22 #ifdef KNOWNID_INITIALIZE
23 # define KNOWNID(a, b) b
24 static const char *initpool_data[] = {
25 #else
26 # define KNOWNID(a, b) a
27 enum solv_knownid {
28 #endif
29
30 KNOWNID(ID_NULL,                        "<NULL>"),
31 KNOWNID(ID_EMPTY,                       ""),
32
33 /* The following Ids are stored in the solvable and must
34  * come in one block */
35 KNOWNID(SOLVABLE_NAME,                  "solvable:name"),
36 KNOWNID(SOLVABLE_ARCH,                  "solvable:arch"),
37 KNOWNID(SOLVABLE_EVR,                   "solvable:evr"),
38 KNOWNID(SOLVABLE_VENDOR,                "solvable:vendor"),
39 KNOWNID(SOLVABLE_PROVIDES,              "solvable:provides"),
40 KNOWNID(SOLVABLE_OBSOLETES,             "solvable:obsoletes"),
41 KNOWNID(SOLVABLE_CONFLICTS,             "solvable:conflicts"),
42 KNOWNID(SOLVABLE_REQUIRES,              "solvable:requires"),
43 KNOWNID(SOLVABLE_RECOMMENDS,            "solvable:recommends"),
44 KNOWNID(SOLVABLE_SUGGESTS,              "solvable:suggests"),
45 KNOWNID(SOLVABLE_SUPPLEMENTS,           "solvable:supplements"),
46 KNOWNID(SOLVABLE_ENHANCES,              "solvable:enhances"),
47 KNOWNID(RPM_RPMDBID,                    "rpm:dbid"),
48
49 /* normal requires before this, prereqs after this */
50 KNOWNID(SOLVABLE_PREREQMARKER,          "solvable:prereqmarker"),
51 /* normal provides before this, generated file provides after this */
52 KNOWNID(SOLVABLE_FILEMARKER,            "solvable:filemarker"),
53
54 KNOWNID(NAMESPACE_INSTALLED,            "namespace:installed"),
55 KNOWNID(NAMESPACE_MODALIAS,             "namespace:modalias"),
56 KNOWNID(NAMESPACE_SPLITPROVIDES,        "namespace:splitprovides"),
57 KNOWNID(NAMESPACE_LANGUAGE,             "namespace:language"),
58 KNOWNID(NAMESPACE_FILESYSTEM,           "namespace:filesystem"),
59 KNOWNID(NAMESPACE_OTHERPROVIDERS,       "namespace:otherproviders"),
60
61 KNOWNID(SYSTEM_SYSTEM,                  "system:system"),
62
63 /* special solvable architectures */
64 KNOWNID(ARCH_SRC,                       "src"),
65 KNOWNID(ARCH_NOSRC,                     "nosrc"),
66 KNOWNID(ARCH_NOARCH,                    "noarch"),
67 KNOWNID(ARCH_ALL,                       "all"),
68 KNOWNID(ARCH_ANY,                       "any"),
69
70 /* the meta tags used in solv file storage */
71 KNOWNID(REPOSITORY_SOLVABLES,           "repository:solvables"),
72 KNOWNID(REPOSITORY_DELTAINFO,           "repository:deltainfo"),
73
74 /* sub-repository information, they will get loaded on demand */
75 KNOWNID(REPOSITORY_EXTERNAL,            "repository:external"),
76 KNOWNID(REPOSITORY_KEYS,                "repository:keys"),
77 KNOWNID(REPOSITORY_LOCATION,            "repository:location"),
78
79 /* the known data types */
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_DIR,               "repokey:type:dir"),
86 KNOWNID(REPOKEY_TYPE_STR,               "repokey:type:str"),
87 KNOWNID(REPOKEY_TYPE_BINARY,            "repokey:type:binary"),
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_SHA224,            "repokey:type:sha224"),
95 KNOWNID(REPOKEY_TYPE_SHA256,            "repokey:type:sha256"),
96 KNOWNID(REPOKEY_TYPE_SHA384,            "repokey:type:sha384"),
97 KNOWNID(REPOKEY_TYPE_SHA512,            "repokey:type:sha512"),
98 KNOWNID(REPOKEY_TYPE_FIXARRAY,          "repokey:type:fixarray"),
99 KNOWNID(REPOKEY_TYPE_FLEXARRAY,         "repokey:type:flexarray"),
100 KNOWNID(REPOKEY_TYPE_DELETED,           "repokey:type:deleted"),        /* internal only */
101
102 KNOWNID(SOLVABLE_SUMMARY,               "solvable:summary"),
103 KNOWNID(SOLVABLE_DESCRIPTION,           "solvable:description"),
104 KNOWNID(SOLVABLE_DISTRIBUTION,          "solvable:distribution"),
105 KNOWNID(SOLVABLE_AUTHORS,               "solvable:authors"),
106 KNOWNID(SOLVABLE_PACKAGER,              "solvable:packager"),
107 KNOWNID(SOLVABLE_GROUP,                 "solvable:group"),
108 KNOWNID(SOLVABLE_URL,                   "solvable:url"),
109 KNOWNID(SOLVABLE_KEYWORDS,              "solvable:keywords"),
110 KNOWNID(SOLVABLE_LICENSE,               "solvable:license"),
111 KNOWNID(SOLVABLE_BUILDTIME,             "solvable:buildtime"),
112 KNOWNID(SOLVABLE_BUILDHOST,             "solvable:buildhost"),
113 KNOWNID(SOLVABLE_EULA,                  "solvable:eula"),
114 KNOWNID(SOLVABLE_CPEID,                 "solvable:cpeid"),
115 KNOWNID(SOLVABLE_MESSAGEINS,            "solvable:messageins"),
116 KNOWNID(SOLVABLE_MESSAGEDEL,            "solvable:messagedel"),
117 KNOWNID(SOLVABLE_INSTALLSIZE,           "solvable:installsize"),
118 KNOWNID(SOLVABLE_DISKUSAGE,             "solvable:diskusage"),
119 KNOWNID(SOLVABLE_FILELIST,              "solvable:filelist"),
120 KNOWNID(SOLVABLE_INSTALLTIME,           "solvable:installtime"),
121 KNOWNID(SOLVABLE_MEDIADIR,              "solvable:mediadir"),
122 KNOWNID(SOLVABLE_MEDIAFILE,             "solvable:mediafile"),
123 KNOWNID(SOLVABLE_MEDIANR,               "solvable:medianr"),
124 KNOWNID(SOLVABLE_MEDIABASE,             "solvable:mediabase"),  /* <location xml:base=... > */
125 KNOWNID(SOLVABLE_DOWNLOADSIZE,          "solvable:downloadsize"),
126 KNOWNID(SOLVABLE_SOURCEARCH,            "solvable:sourcearch"),
127 KNOWNID(SOLVABLE_SOURCENAME,            "solvable:sourcename"),
128 KNOWNID(SOLVABLE_SOURCEEVR,             "solvable:sourceevr"),
129 KNOWNID(SOLVABLE_ISVISIBLE,             "solvable:isvisible"),
130 KNOWNID(SOLVABLE_TRIGGERS,              "solvable:triggers"),
131 KNOWNID(SOLVABLE_CHECKSUM,              "solvable:checksum"),
132 KNOWNID(SOLVABLE_PKGID,                 "solvable:pkgid"),      /* pkgid: md5sum over header + payload */
133 KNOWNID(SOLVABLE_HDRID,                 "solvable:hdrid"),      /* hdrid: sha1sum over header only */
134 KNOWNID(SOLVABLE_LEADSIGID,             "solvable:leadsigid"),  /* leadsigid: md5sum over lead + sigheader */
135
136 KNOWNID(SOLVABLE_PATCHCATEGORY,         "solvable:patchcategory"),
137 KNOWNID(SOLVABLE_HEADEREND,             "solvable:headerend"),
138 KNOWNID(SOLVABLE_CHANGELOG,             "solvable:changelog"),
139 KNOWNID(SOLVABLE_CHANGELOG_AUTHOR,      "solvable:changelog:author"),
140 KNOWNID(SOLVABLE_CHANGELOG_TIME,        "solvable:changelog:time"),
141 KNOWNID(SOLVABLE_CHANGELOG_TEXT,        "solvable:changelog:text"),
142 KNOWNID(SOLVABLE_INSTALLSTATUS,         "solvable:installstatus"),      /* debian install status */
143 KNOWNID(SOLVABLE_PREREQ_IGNOREINST,     "solvable:prereq_ignoreinst"),  /* ignore these pre-requires for installed packages */
144
145 /* stuff for solvables of type pattern */
146 KNOWNID(SOLVABLE_CATEGORY,              "solvable:category"),
147 KNOWNID(SOLVABLE_INCLUDES,              "solvable:includes"),
148 KNOWNID(SOLVABLE_EXTENDS,               "solvable:extends"),
149 KNOWNID(SOLVABLE_ICON,                  "solvable:icon"),
150 KNOWNID(SOLVABLE_ORDER,                 "solvable:order"),
151
152 /* extra definitions for updates (i.e. patch: solvables) */
153 KNOWNID(UPDATE_REBOOT,                  "update:reboot"),       /* reboot suggested (kernel update) */
154 KNOWNID(UPDATE_RESTART,                 "update:restart"),      /* restart suggested (update stack update) */
155 KNOWNID(UPDATE_RELOGIN,                 "update:relogin"),      /* relogin suggested */
156
157 KNOWNID(UPDATE_MESSAGE,                 "update:message"),      /* informative message */
158 KNOWNID(UPDATE_SEVERITY,                "update:severity"),     /* "Important", ...*/
159 KNOWNID(UPDATE_RIGHTS,                  "update:rights"),       /* copyright */
160
161 /* 'content' of patch, usually list of packages */
162 KNOWNID(UPDATE_COLLECTION,              "update:collection"),          /*  "name evr arch" */
163 KNOWNID(UPDATE_COLLECTION_NAME,         "update:collection:name"),     /*   name */
164 KNOWNID(UPDATE_COLLECTION_EVR,          "update:collection:evr"),      /*   epoch:version-release */
165 KNOWNID(UPDATE_COLLECTION_ARCH,         "update:collection:arch"),     /*   architecture */
166 KNOWNID(UPDATE_COLLECTION_FILENAME,     "update:collection:filename"), /*   filename (of rpm) */
167 KNOWNID(UPDATE_COLLECTION_FLAGS,        "update:collection:flags"),    /*   reboot(1)/restart(2) suggested if this rpm gets updated */
168
169 KNOWNID(UPDATE_REFERENCE,               "update:reference"),            /* external references for the update */
170 KNOWNID(UPDATE_REFERENCE_TYPE,          "update:reference:type"),       /*  type, e.g. 'bugzilla' or 'cve' */
171 KNOWNID(UPDATE_REFERENCE_HREF,          "update:reference:href"),       /*  href, e.g. 'http://bugzilla...' */
172 KNOWNID(UPDATE_REFERENCE_ID,            "update:reference:id"),         /*  id, e.g. bug number */
173 KNOWNID(UPDATE_REFERENCE_TITLE,         "update:reference:title"),      /*  title, e.g. "the bla forz scribs on fuggle" */
174
175 /* extra definitions for products */
176 KNOWNID(PRODUCT_REFERENCEFILE,          "product:referencefile"),       /* installed product only */
177 KNOWNID(PRODUCT_SHORTLABEL,             "product:shortlabel"),          /* not in repomd? */
178 KNOWNID(PRODUCT_DISTPRODUCT,            "product:distproduct"),         /* obsolete */
179 KNOWNID(PRODUCT_DISTVERSION,            "product:distversion"),         /* obsolete */
180 KNOWNID(PRODUCT_TYPE,                   "product:type"),                /* e.g. 'base' */
181 KNOWNID(PRODUCT_URL,                    "product:url"),
182 KNOWNID(PRODUCT_URL_TYPE,               "product:url:type"),
183 KNOWNID(PRODUCT_FLAGS,                  "product:flags"),               /* e.g. 'update', 'no_you' */
184 KNOWNID(PRODUCT_PRODUCTLINE,            "product:productline"),         /* installed product only */
185 KNOWNID(PRODUCT_REGISTER_TARGET,        "product:regtarget"),           /* installed and available product */
186 KNOWNID(PRODUCT_REGISTER_FLAVOR,        "product:regflavor"),           /* installed and available product */
187 KNOWNID(PRODUCT_REGISTER_RELEASE,       "product:regrelease"),          /* installed product only */
188 KNOWNID(PRODUCT_UPDATES_REPOID,         "product:updates:repoid"),
189 KNOWNID(PRODUCT_UPDATES,                "product:updates"),
190 KNOWNID(PRODUCT_ENDOFLIFE,              "product:endoflife"),
191
192 /* argh, should rename to repository and unify with REPOMD */
193 KNOWNID(SUSETAGS_DATADIR,               "susetags:datadir"),
194 KNOWNID(SUSETAGS_DESCRDIR,              "susetags:descrdir"),
195 KNOWNID(SUSETAGS_DEFAULTVENDOR,         "susetags:defaultvendor"),
196 KNOWNID(SUSETAGS_FILE,                  "susetags:file"),
197 KNOWNID(SUSETAGS_FILE_NAME,             "susetags:file:name"),
198 KNOWNID(SUSETAGS_FILE_TYPE,             "susetags:file:type"),
199 KNOWNID(SUSETAGS_FILE_CHECKSUM,         "susetags:file:checksum"),
200 KNOWNID(SUSETAGS_SHARE_NAME,            "susetags:share:name"),
201 KNOWNID(SUSETAGS_SHARE_EVR,             "susetags:share:evr"),
202 KNOWNID(SUSETAGS_SHARE_ARCH,            "susetags:share:arch"),
203
204 KNOWNID(REPOSITORY_ADDEDFILEPROVIDES,   "repository:addedfileprovides"),        /* file provides already added to our solvables */
205 KNOWNID(REPOSITORY_RPMDBCOOKIE,         "repository:rpmdbcookie"),      /* inode of the rpm database for rpm --rebuilddb detection */
206 KNOWNID(REPOSITORY_FILTEREDFILELIST,    "repository:filteredfilelist"), /* filelist in repository is filtered */
207 KNOWNID(REPOSITORY_TIMESTAMP,           "repository:timestamp"),        /* timestamp then the repository was generated */
208 KNOWNID(REPOSITORY_EXPIRE,              "repository:expire"),           /* hint when the metadata could be outdated w/respect to generated timestamp */
209 KNOWNID(REPOSITORY_UPDATES,             "repository:updates"),          /* which things does this repo provides updates for, if it does (array) (obsolete?) */
210 KNOWNID(REPOSITORY_DISTROS,             "repository:distros"),          /* which products this repository is supposed to be for (array) */
211 KNOWNID(REPOSITORY_PRODUCT_LABEL,       "repository:product:label"),
212 KNOWNID(REPOSITORY_PRODUCT_CPEID,       "repository:product:cpeid"),
213 KNOWNID(REPOSITORY_REPOID,              "repository:repoid"),           /* obsolete? */
214 KNOWNID(REPOSITORY_KEYWORDS,            "repository:keywords"),         /* keyword (tags) for this repository */
215 KNOWNID(REPOSITORY_REVISION,            "repository:revision"),         /* revision of the repository. arbitrary string */
216 KNOWNID(REPOSITORY_TOOLVERSION,         "repository:toolversion"),
217
218 KNOWNID(DELTA_PACKAGE_NAME,             "delta:pkgname"),
219 KNOWNID(DELTA_PACKAGE_EVR,              "delta:pkgevr"),
220 KNOWNID(DELTA_PACKAGE_ARCH,             "delta:pkgarch"),
221 KNOWNID(DELTA_LOCATION_DIR,             "delta:locdir"),
222 KNOWNID(DELTA_LOCATION_NAME,            "delta:locname"),
223 KNOWNID(DELTA_LOCATION_EVR,             "delta:locevr"),
224 KNOWNID(DELTA_LOCATION_SUFFIX,          "delta:locsuffix"),
225 KNOWNID(DELTA_DOWNLOADSIZE,             "delta:downloadsize"),
226 KNOWNID(DELTA_CHECKSUM,                 "delta:checksum"),
227 KNOWNID(DELTA_BASE_EVR,                 "delta:baseevr"),
228 KNOWNID(DELTA_SEQ_NAME,                 "delta:seqname"),
229 KNOWNID(DELTA_SEQ_EVR,                  "delta:seqevr"),
230 KNOWNID(DELTA_SEQ_NUM,                  "delta:seqnum"),
231 KNOWNID(DELTA_LOCATION_BASE,            "delta:locbase"),       /* <location xml:base=... > */
232
233 KNOWNID(REPOSITORY_REPOMD,              "repository:repomd"),
234 KNOWNID(REPOSITORY_REPOMD_TYPE,         "repository:repomd:type"),
235 KNOWNID(REPOSITORY_REPOMD_LOCATION,     "repository:repomd:location"),
236 KNOWNID(REPOSITORY_REPOMD_TIMESTAMP,    "repository:repomd:timestamp"),
237 KNOWNID(REPOSITORY_REPOMD_CHECKSUM,     "repository:repomd:checksum"),
238 KNOWNID(REPOSITORY_REPOMD_OPENCHECKSUM, "repository:repomd:openchecksum"),
239 KNOWNID(REPOSITORY_REPOMD_SIZE,         "repository:repomd:size"),
240
241 KNOWNID(PUBKEY_KEYID,                   "pubkey:keyid"),
242 KNOWNID(PUBKEY_FINGERPRINT,             "pubkey:fingerprint"),
243 KNOWNID(PUBKEY_EXPIRES,                 "pubkey:expires"),
244 KNOWNID(PUBKEY_SIGNATURES,              "pubkey:signatures"),
245 KNOWNID(PUBKEY_DATA,                    "pubkey:data"),
246 KNOWNID(PUBKEY_SUBKEYOF,                "pubkey:subkeyof"),
247
248 KNOWNID(SIGNATURE_ISSUER,               "signature:issuer"),
249 KNOWNID(SIGNATURE_TIME,                 "signature:time"),
250 KNOWNID(SIGNATURE_EXPIRES,              "signature:expires"),
251 KNOWNID(SIGNATURE_DATA,                 "signature:data"),
252
253 /* 'content' of patch, usually list of modules */
254 KNOWNID(UPDATE_MODULE,                  "update:module"),               /* "name stream version context arch" */
255 KNOWNID(UPDATE_MODULE_NAME,             "update:module:name"),          /* name */
256 KNOWNID(UPDATE_MODULE_STREAM,           "update:module:stream"),        /* stream */
257 KNOWNID(UPDATE_MODULE_VERSION,          "update:module:version"),       /* version */
258 KNOWNID(UPDATE_MODULE_CONTEXT,          "update:module:context"),       /* context */
259 KNOWNID(UPDATE_MODULE_ARCH,             "update:module:arch"),          /* architecture */
260
261 KNOWNID(SOLVABLE_BUILDVERSION,          "solvable:buildversion"),       /* conda */
262 KNOWNID(SOLVABLE_BUILDFLAVOR,           "solvable:buildflavor"),        /* conda */
263
264 KNOWNID(UPDATE_STATUS,                  "update:status"),               /* "stable", "testing", ...*/
265
266 KNOWNID(LIBSOLV_SELF_DESTRUCT_PKG,      "libsolv-self-destruct-pkg()"), /* this package will self-destruct on installation */
267
268 KNOWNID(SOLVABLE_CONSTRAINS,            "solvable:constrains"),         /* conda */
269 KNOWNID(SOLVABLE_TRACK_FEATURES,        "solvable:track_features"),     /* conda */
270 KNOWNID(SOLVABLE_ISDEFAULT,             "solvable:isdefault"),
271 KNOWNID(SOLVABLE_LANGONLY,              "solvable:langonly"),
272
273 KNOWNID(UPDATE_COLLECTIONLIST,          "update:collectionlist"),       /* list of UPDATE_COLLECTION (actually packages) and UPDATE_MODULE */
274 KNOWNID(SOLVABLE_MULTIARCH,             "solvable:multiarch"),          /* debian multi-arch field */
275 KNOWNID(SOLVABLE_SIGNATUREDATA,         "solvable:signaturedata"),      /* conda */
276
277 KNOWNID(ID_NUM_INTERNAL,                0)
278
279 #ifdef KNOWNID_INITIALIZE
280 };
281 #else
282 };
283 #endif
284
285 #undef KNOWNID
286
287 #endif
288
289