1 #include "rpmsystem-py.h"
3 #include <rpm/rpmlib.h> /* rpmMachineScore, rpmReadConfigFiles */
4 #include <rpm/rpmtag.h>
7 #include <rpm/rpmlog.h>
8 #include <rpm/rpmmacro.h>
9 #include <rpm/rpmsign.h>
11 #include "header-py.h"
12 #include "rpmarchive-py.h"
16 #include "rpmfiles-py.h"
17 #include "rpmkeyring-py.h"
21 #include "rpmmacro-py.h"
22 #include "rpmstrpool-py.h"
32 PyObject * pyrpmError;
34 static PyObject * archScore(PyObject * self, PyObject * arg)
38 if (!PyArg_Parse(arg, "s", &arch))
41 return Py_BuildValue("i", rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch));
44 static PyObject * signalCaught(PyObject *self, PyObject *o)
47 if (!PyArg_Parse(o, "i", &signo)) return NULL;
49 return PyBool_FromLong(rpmsqIsCaught(signo));
52 static PyObject * checkSignals(PyObject * self)
54 return Py_BuildValue("i", rpmsqPoll());
57 static PyObject * blockSignals(PyObject * self, PyObject *arg)
60 if (!PyArg_Parse(arg, "p", &block)) return NULL;
62 return Py_BuildValue("i", rpmsqBlock(block ? SIG_BLOCK : SIG_UNBLOCK));
66 static PyObject * setLogFile (PyObject * self, PyObject *arg)
69 int fdno = PyObject_AsFileDescriptor(arg);
72 /* XXX we dont know the mode here.. guessing append for now */
73 fp = fdopen(fdno, "a");
75 PyErr_SetFromErrno(PyExc_IOError);
78 } else if (arg == Py_None) {
81 PyErr_SetString(PyExc_TypeError, "file object or None expected");
85 (void) rpmlogSetFile(fp);
90 setVerbosity (PyObject * self, PyObject * arg)
94 if (!PyArg_Parse(arg, "i", &level))
97 rpmSetVerbosity(level);
103 setEpochPromote (PyObject * self, PyObject * arg)
105 if (!PyArg_Parse(arg, "i", &_rpmds_nopromote))
111 static PyObject * setStats (PyObject * self, PyObject * arg)
113 if (!PyArg_Parse(arg, "i", &_rpmts_stats))
119 static PyObject * doLog(PyObject * self, PyObject * args, PyObject *kwds)
123 char * kwlist[] = {"code", "msg", NULL};
124 if (!PyArg_ParseTupleAndKeywords(args, kwds, "is", kwlist, &code, &msg))
127 rpmlog(code, "%s", msg);
131 static PyObject * reloadConfig(PyObject * self, PyObject * args, PyObject *kwds)
133 const char * target = NULL;
134 char * kwlist[] = { "target", NULL };
137 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s", kwlist, &target))
142 rc = rpmReadConfigFiles(NULL, target) ;
144 return PyBool_FromLong(rc == 0);
147 static PyObject * setInterruptSafety(PyObject * self, PyObject * args, PyObject *kwds)
151 char * kwlist[] = { "on", NULL };
152 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O", kwlist, &obj))
155 on = PyObject_IsTrue(obj);
157 rpmsqSetInterruptSafety(on);
161 static int parseSignArgs(PyObject * args, PyObject *kwds,
162 const char **path, struct rpmSignArgs *sargs)
164 char * kwlist[] = { "path", "keyid", "hashalgo", NULL };
166 memset(sargs, 0, sizeof(*sargs));
167 return PyArg_ParseTupleAndKeywords(args, kwds, "s|si", kwlist,
168 path, &sargs->keyid, &sargs->hashalgo);
171 static PyObject * addSign(PyObject * self, PyObject * args, PyObject *kwds)
173 const char *path = NULL;
174 struct rpmSignArgs sargs;
176 if (!parseSignArgs(args, kwds, &path, &sargs))
179 return PyBool_FromLong(rpmPkgSign(path, &sargs) == 0);
182 static PyObject * delSign(PyObject * self, PyObject * args, PyObject *kwds)
184 const char *path = NULL;
185 struct rpmSignArgs sargs;
187 if (!parseSignArgs(args, kwds, &path, &sargs))
190 return PyBool_FromLong(rpmPkgDelSign(path, &sargs) == 0);
193 static PyMethodDef rpmModuleMethods[] = {
194 { "addMacro", (PyCFunction) rpmmacro_AddMacro, METH_VARARGS|METH_KEYWORDS,
195 "rpmPushMacro(macro, value)\n"
197 { "delMacro", (PyCFunction) rpmmacro_DelMacro, METH_VARARGS|METH_KEYWORDS,
198 "rpmPopMacro(macro)\n"
200 { "expandMacro", (PyCFunction) rpmmacro_ExpandMacro, METH_VARARGS|METH_KEYWORDS,
201 "expandMacro(string, numeric=False) -- expands a string containing macros\n\n"
202 "Returns an int if numeric is True. 'Y' or 'y' returns 1,\n'N' or 'n' returns 0\nAn undefined macro returns 0."},
204 { "archscore", (PyCFunction) archScore, METH_O,
205 "archscore(archname) -- How well does an architecture fit on this machine\n\n"
206 "0 for non matching arch names\n1 for best arch\nhigher numbers for less fitting arches\n(e.g. 2 for \"i586\" on an i686 machine)" },
208 { "signalCaught", (PyCFunction) signalCaught, METH_O,
209 "signalCaught(signo) -- Returns True if signal was caught." },
210 { "checkSignals", (PyCFunction) checkSignals, METH_NOARGS,
211 "checkSignals() -- Check for and exit on termination signals."},
212 { "blockSignals", (PyCFunction) blockSignals, METH_O,
213 "blocksignals(True/False) -- Block/unblock signals, refcounted."},
215 { "mergeHeaderListFromFD", (PyCFunction) rpmMergeHeadersFromFD, METH_VARARGS|METH_KEYWORDS,
218 { "log", (PyCFunction) doLog, METH_VARARGS|METH_KEYWORDS,
219 "log(level, msg) -- Write msg to log if level is selected to be logged.\n\n"
220 "level must be one of the RPMLOG_* constants."},
221 { "setLogFile", (PyCFunction) setLogFile, METH_O,
222 "setLogFile(file) -- set file to write log messages to or None." },
224 { "versionCompare", (PyCFunction) versionCompare, METH_VARARGS|METH_KEYWORDS,
225 "versionCompare(version0, version1) -- compares two version strings\n\n"
226 "Returns 1 if version0 > version1\n"
227 "Returns 0 if version0 == version1\n"
228 "Returns -1 if version0 < version1\n"},
229 { "labelCompare", (PyCFunction) labelCompare, METH_VARARGS|METH_KEYWORDS,
230 "labelCompare(version0, version1) -- as versionCompare()\n\n"
231 "but arguments are tuples of of strings for (epoch, version, release)"},
232 { "setVerbosity", (PyCFunction) setVerbosity, METH_O,
233 "setVerbosity(level) -- Set log level. See RPMLOG_* constants." },
234 { "setEpochPromote", (PyCFunction) setEpochPromote, METH_O,
235 "setEpochPromote(bool) -- Set if no epoch shall be treated as epoch 0" },
236 { "setStats", (PyCFunction) setStats, METH_O,
237 "setStats(bool) -- Set if timing stats are printed after a transaction."},
238 { "reloadConfig", (PyCFunction) reloadConfig, METH_VARARGS|METH_KEYWORDS,
239 "reloadConfig(target=None) -- Reload config from files.\n\n"
240 "Set all macros and settings accordingly."},
242 { "setInterruptSafety", (PyCFunction) setInterruptSafety,
243 METH_VARARGS|METH_KEYWORDS,
244 "setInterruptSafety(on=True) -- Set if various signals get intercepted.\n\n"
245 "By default, librpm will trap various unix signals (like SIGINT and\n"
246 "SIGTERM), in order to avoid process exit while locks are held or\n"
247 "a transaction is being performed.\n\n"
248 "If this is not the desired behaviour it's recommended to call this\n"
249 "once only at process startup because currently signal handlers will\n"
250 "not be retroactively applied if a database is open."
252 { "addSign", (PyCFunction) addSign, METH_VARARGS|METH_KEYWORDS, NULL },
253 { "delSign", (PyCFunction) delSign, METH_VARARGS|METH_KEYWORDS, NULL },
257 static char rpm__doc__[] = "";
260 * Add rpm tag dictionaries to the module
262 static void addRpmTags(PyObject *module)
264 PyObject *pyval, *pyname, *dict = PyDict_New();
265 rpmtd names = rpmtdNew();
266 rpmTagGetNames(names, 1);
267 const char *tagname, *shortname;
270 while ((tagname = rpmtdNextString(names))) {
271 shortname = tagname + strlen("RPMTAG_");
272 tagval = rpmTagGetValue(shortname);
274 PyModule_AddIntConstant(module, tagname, tagval);
275 pyval = PyLong_FromLong(tagval);
276 pyname = utf8FromString(shortname);
277 PyDict_SetItem(dict, pyval, pyname);
281 PyModule_AddObject(module, "tagnames", dict);
286 Do any common preliminary work before python 2 vs python 3 module creation:
288 static int prepareInitModule(void)
290 if (PyType_Ready(&hdr_Type) < 0) return 0;
291 if (PyType_Ready(&rpmarchive_Type) < 0) return 0;
292 if (PyType_Ready(&rpmds_Type) < 0) return 0;
293 if (PyType_Ready(&rpmfd_Type) < 0) return 0;
294 if (PyType_Ready(&rpmfi_Type) < 0) return 0;
295 if (PyType_Ready(&rpmfile_Type) < 0) return 0;
296 if (PyType_Ready(&rpmfiles_Type) < 0) return 0;
297 if (PyType_Ready(&rpmKeyring_Type) < 0) return 0;
298 if (PyType_Ready(&rpmmi_Type) < 0) return 0;
299 if (PyType_Ready(&rpmii_Type) < 0) return 0;
300 if (PyType_Ready(&rpmProblem_Type) < 0) return 0;
301 if (PyType_Ready(&rpmPubkey_Type) < 0) return 0;
302 if (PyType_Ready(&rpmstrPool_Type) < 0) return 0;
304 if (PyType_Ready(&rpmtd_Type) < 0) return 0;
306 if (PyType_Ready(&rpmte_Type) < 0) return 0;
307 if (PyType_Ready(&rpmts_Type) < 0) return 0;
308 if (PyType_Ready(&spec_Type) < 0) return 0;
309 if (PyType_Ready(&specPkg_Type) < 0) return 0;
313 static int initModule(PyObject *m);
315 #if PY_MAJOR_VERSION >= 3
316 static int rpmModuleTraverse(PyObject *m, visitproc visit, void *arg) {
317 Py_VISIT(pyrpmError);
321 static int rpmModuleClear(PyObject *m) {
322 Py_CLEAR(pyrpmError);
326 static struct PyModuleDef moduledef = {
327 PyModuleDef_HEAD_INIT,
329 rpm__doc__, /* m_doc */
345 if (!prepareInitModule()) return NULL;
346 m = PyModule_Create(&moduledef);
351 void init_rpm(void); /* XXX eliminate gcc warning */
356 if (!prepareInitModule()) return;
357 m = Py_InitModule3("_rpm", rpmModuleMethods, rpm__doc__);
364 /* Shared python2/3 module initialization: */
365 static int initModule(PyObject *m)
369 /* failure to initialize rpm (crypto and all) is rather fatal too... */
370 if (rpmReadConfigFiles(NULL, NULL) == -1)
373 d = PyModule_GetDict(m);
375 pyrpmError = PyErr_NewException("_rpm.error", NULL, NULL);
376 if (pyrpmError != NULL)
377 PyDict_SetItemString(d, "error", pyrpmError);
379 Py_INCREF(&hdr_Type);
380 PyModule_AddObject(m, "hdr", (PyObject *) &hdr_Type);
382 Py_INCREF(&rpmarchive_Type);
383 PyModule_AddObject(m, "archive", (PyObject *) &rpmarchive_Type);
385 Py_INCREF(&rpmds_Type);
386 PyModule_AddObject(m, "ds", (PyObject *) &rpmds_Type);
388 Py_INCREF(&rpmfd_Type);
389 PyModule_AddObject(m, "fd", (PyObject *) &rpmfd_Type);
391 Py_INCREF(&rpmfi_Type);
392 PyModule_AddObject(m, "fi", (PyObject *) &rpmfi_Type);
394 Py_INCREF(&rpmfile_Type);
395 PyModule_AddObject(m, "file", (PyObject *) &rpmfile_Type);
397 Py_INCREF(&rpmfiles_Type);
398 PyModule_AddObject(m, "files", (PyObject *) &rpmfiles_Type);
400 Py_INCREF(&rpmKeyring_Type);
401 PyModule_AddObject(m, "keyring", (PyObject *) &rpmKeyring_Type);
403 Py_INCREF(&rpmmi_Type);
404 PyModule_AddObject(m, "mi", (PyObject *) &rpmmi_Type);
406 Py_INCREF(&rpmii_Type);
407 PyModule_AddObject(m, "ii", (PyObject *) &rpmii_Type);
409 Py_INCREF(&rpmProblem_Type);
410 PyModule_AddObject(m, "prob", (PyObject *) &rpmProblem_Type);
412 Py_INCREF(&rpmPubkey_Type);
413 PyModule_AddObject(m, "pubkey", (PyObject *) &rpmPubkey_Type);
415 Py_INCREF(&rpmstrPool_Type);
416 PyModule_AddObject(m, "strpool", (PyObject *) &rpmstrPool_Type);
419 Py_INCREF(&rpmtd_Type);
420 PyModule_AddObject(m, "td", (PyObject *) &rpmtd_Type);
423 Py_INCREF(&rpmte_Type);
424 PyModule_AddObject(m, "te", (PyObject *) &rpmte_Type);
426 Py_INCREF(&rpmts_Type);
427 PyModule_AddObject(m, "ts", (PyObject *) &rpmts_Type);
429 Py_INCREF(&spec_Type);
430 PyModule_AddObject(m, "spec", (PyObject *) &spec_Type);
432 Py_INCREF(&specPkg_Type);
433 PyModule_AddObject(m, "specPkg", (PyObject *) &specPkg_Type);
437 PyModule_AddStringConstant(m, "__version__", RPMVERSION);
439 PyModule_AddObject(m, "header_magic",
440 PyBytes_FromStringAndSize((const char *)rpm_header_magic, 8));
442 #define REGISTER_ENUM(val) PyModule_AddIntConstant(m, #val, val)
444 REGISTER_ENUM(RPMTAG_NOT_FOUND);
446 REGISTER_ENUM(RPMRC_OK);
447 REGISTER_ENUM(RPMRC_NOTFOUND);
448 REGISTER_ENUM(RPMRC_FAIL);
449 REGISTER_ENUM(RPMRC_NOTTRUSTED);
450 REGISTER_ENUM(RPMRC_NOKEY);
452 REGISTER_ENUM(RPMFILE_STATE_NORMAL);
453 REGISTER_ENUM(RPMFILE_STATE_REPLACED);
454 REGISTER_ENUM(RPMFILE_STATE_NOTINSTALLED);
455 REGISTER_ENUM(RPMFILE_STATE_NETSHARED);
456 REGISTER_ENUM(RPMFILE_STATE_WRONGCOLOR);
458 REGISTER_ENUM(RPMFILE_CONFIG);
459 REGISTER_ENUM(RPMFILE_DOC);
460 REGISTER_ENUM(RPMFILE_ICON);
461 REGISTER_ENUM(RPMFILE_MISSINGOK);
462 REGISTER_ENUM(RPMFILE_NOREPLACE);
463 REGISTER_ENUM(RPMFILE_SPECFILE);
464 REGISTER_ENUM(RPMFILE_GHOST);
465 REGISTER_ENUM(RPMFILE_LICENSE);
466 REGISTER_ENUM(RPMFILE_README);
467 REGISTER_ENUM(RPMFILE_PUBKEY);
468 REGISTER_ENUM(RPMFILE_ARTIFACT);
470 REGISTER_ENUM(RPMDEP_SENSE_REQUIRES);
471 REGISTER_ENUM(RPMDEP_SENSE_CONFLICTS);
473 REGISTER_ENUM(RPMSENSE_ANY);
474 REGISTER_ENUM(RPMSENSE_LESS);
475 REGISTER_ENUM(RPMSENSE_GREATER);
476 REGISTER_ENUM(RPMSENSE_EQUAL);
477 REGISTER_ENUM(RPMSENSE_POSTTRANS);
478 REGISTER_ENUM(RPMSENSE_PREREQ);
479 REGISTER_ENUM(RPMSENSE_PRETRANS);
480 REGISTER_ENUM(RPMSENSE_INTERP);
481 REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
482 REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
483 REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
484 REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
485 REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
486 REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
487 REGISTER_ENUM(RPMSENSE_FIND_PROVIDES);
488 REGISTER_ENUM(RPMSENSE_TRIGGERIN);
489 REGISTER_ENUM(RPMSENSE_TRIGGERUN);
490 REGISTER_ENUM(RPMSENSE_TRIGGERPOSTUN);
491 REGISTER_ENUM(RPMSENSE_RPMLIB);
492 REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
493 REGISTER_ENUM(RPMSENSE_KEYRING);
494 REGISTER_ENUM(RPMSENSE_STRONG);
495 REGISTER_ENUM(RPMSENSE_CONFIG);
496 REGISTER_ENUM(RPMSENSE_MISSINGOK);
498 REGISTER_ENUM(RPMTRANS_FLAG_TEST);
499 REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS);
500 REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS);
501 REGISTER_ENUM(RPMTRANS_FLAG_JUSTDB);
502 REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERS);
503 REGISTER_ENUM(RPMTRANS_FLAG_NODOCS);
504 REGISTER_ENUM(RPMTRANS_FLAG_ALLFILES);
505 REGISTER_ENUM(RPMTRANS_FLAG_NOPLUGINS);
506 REGISTER_ENUM(RPMTRANS_FLAG_KEEPOBSOLETE);
507 REGISTER_ENUM(RPMTRANS_FLAG_NOCONTEXTS);
508 REGISTER_ENUM(RPMTRANS_FLAG_NOCAPS);
509 REGISTER_ENUM(RPMTRANS_FLAG_REPACKAGE);
510 REGISTER_ENUM(RPMTRANS_FLAG_REVERSE);
511 REGISTER_ENUM(RPMTRANS_FLAG_NOPRE);
512 REGISTER_ENUM(RPMTRANS_FLAG_NOPOST);
513 REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPREIN);
514 REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERIN);
515 REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERUN);
516 REGISTER_ENUM(RPMTRANS_FLAG_NOPREUN);
517 REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTUN);
518 REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPOSTUN);
519 REGISTER_ENUM(RPMTRANS_FLAG_NOPRETRANS);
520 REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTTRANS);
521 REGISTER_ENUM(RPMTRANS_FLAG_NOMD5);
522 REGISTER_ENUM(RPMTRANS_FLAG_NOFILEDIGEST);
523 REGISTER_ENUM(RPMTRANS_FLAG_NOSUGGEST);
524 REGISTER_ENUM(RPMTRANS_FLAG_ADDINDEPS);
525 REGISTER_ENUM(RPMTRANS_FLAG_NOCONFIGS);
526 REGISTER_ENUM(RPMTRANS_FLAG_DEPLOOPS);
528 REGISTER_ENUM(RPMPROB_FILTER_IGNOREOS);
529 REGISTER_ENUM(RPMPROB_FILTER_IGNOREARCH);
530 REGISTER_ENUM(RPMPROB_FILTER_REPLACEPKG);
531 REGISTER_ENUM(RPMPROB_FILTER_FORCERELOCATE);
532 REGISTER_ENUM(RPMPROB_FILTER_REPLACENEWFILES);
533 REGISTER_ENUM(RPMPROB_FILTER_REPLACEOLDFILES);
534 REGISTER_ENUM(RPMPROB_FILTER_OLDPACKAGE);
535 REGISTER_ENUM(RPMPROB_FILTER_DISKSPACE);
536 REGISTER_ENUM(RPMPROB_FILTER_DISKNODES);
538 REGISTER_ENUM(RPMCALLBACK_UNKNOWN);
539 REGISTER_ENUM(RPMCALLBACK_INST_PROGRESS);
540 REGISTER_ENUM(RPMCALLBACK_INST_START);
541 REGISTER_ENUM(RPMCALLBACK_INST_OPEN_FILE);
542 REGISTER_ENUM(RPMCALLBACK_INST_CLOSE_FILE);
543 REGISTER_ENUM(RPMCALLBACK_TRANS_PROGRESS);
544 REGISTER_ENUM(RPMCALLBACK_TRANS_START);
545 REGISTER_ENUM(RPMCALLBACK_TRANS_STOP);
546 REGISTER_ENUM(RPMCALLBACK_UNINST_PROGRESS);
547 REGISTER_ENUM(RPMCALLBACK_UNINST_START);
548 REGISTER_ENUM(RPMCALLBACK_UNINST_STOP);
549 REGISTER_ENUM(RPMCALLBACK_REPACKAGE_PROGRESS);
550 REGISTER_ENUM(RPMCALLBACK_REPACKAGE_START);
551 REGISTER_ENUM(RPMCALLBACK_REPACKAGE_STOP);
552 REGISTER_ENUM(RPMCALLBACK_UNPACK_ERROR);
553 REGISTER_ENUM(RPMCALLBACK_CPIO_ERROR);
554 REGISTER_ENUM(RPMCALLBACK_SCRIPT_ERROR);
555 REGISTER_ENUM(RPMCALLBACK_SCRIPT_START);
556 REGISTER_ENUM(RPMCALLBACK_SCRIPT_STOP);
557 REGISTER_ENUM(RPMCALLBACK_INST_STOP);
558 REGISTER_ENUM(RPMCALLBACK_ELEM_PROGRESS);
560 REGISTER_ENUM(RPMPROB_BADARCH);
561 REGISTER_ENUM(RPMPROB_BADOS);
562 REGISTER_ENUM(RPMPROB_PKG_INSTALLED);
563 REGISTER_ENUM(RPMPROB_BADRELOCATE);
564 REGISTER_ENUM(RPMPROB_REQUIRES);
565 REGISTER_ENUM(RPMPROB_CONFLICT);
566 REGISTER_ENUM(RPMPROB_NEW_FILE_CONFLICT);
567 REGISTER_ENUM(RPMPROB_FILE_CONFLICT);
568 REGISTER_ENUM(RPMPROB_OLDPACKAGE);
569 REGISTER_ENUM(RPMPROB_DISKSPACE);
570 REGISTER_ENUM(RPMPROB_DISKNODES);
571 REGISTER_ENUM(RPMPROB_OBSOLETES);
573 REGISTER_ENUM(VERIFY_DIGEST);
574 REGISTER_ENUM(VERIFY_SIGNATURE);
576 REGISTER_ENUM(RPMLOG_EMERG);
577 REGISTER_ENUM(RPMLOG_ALERT);
578 REGISTER_ENUM(RPMLOG_CRIT);
579 REGISTER_ENUM(RPMLOG_ERR);
580 REGISTER_ENUM(RPMLOG_WARNING);
581 REGISTER_ENUM(RPMLOG_NOTICE);
582 REGISTER_ENUM(RPMLOG_INFO);
583 REGISTER_ENUM(RPMLOG_DEBUG);
585 REGISTER_ENUM(RPMMIRE_DEFAULT);
586 REGISTER_ENUM(RPMMIRE_STRCMP);
587 REGISTER_ENUM(RPMMIRE_REGEX);
588 REGISTER_ENUM(RPMMIRE_GLOB);
590 REGISTER_ENUM(RPMVSF_DEFAULT);
591 REGISTER_ENUM(RPMVSF_NOHDRCHK);
592 REGISTER_ENUM(RPMVSF_NEEDPAYLOAD);
593 REGISTER_ENUM(RPMVSF_NOSHA1HEADER);
594 REGISTER_ENUM(RPMVSF_NOSHA256HEADER);
595 REGISTER_ENUM(RPMVSF_NODSAHEADER);
596 REGISTER_ENUM(RPMVSF_NORSAHEADER);
597 REGISTER_ENUM(RPMVSF_NOPAYLOAD);
598 REGISTER_ENUM(RPMVSF_NOMD5);
599 REGISTER_ENUM(RPMVSF_NODSA);
600 REGISTER_ENUM(RPMVSF_NORSA);
601 REGISTER_ENUM(_RPMVSF_NODIGESTS);
602 REGISTER_ENUM(_RPMVSF_NOSIGNATURES);
603 REGISTER_ENUM(_RPMVSF_NOHEADER);
604 REGISTER_ENUM(_RPMVSF_NOPAYLOAD);
606 REGISTER_ENUM(TR_ADDED);
607 REGISTER_ENUM(TR_REMOVED);
609 REGISTER_ENUM(RPMDBI_PACKAGES);
610 REGISTER_ENUM(RPMDBI_LABEL);
611 REGISTER_ENUM(RPMDBI_INSTFILENAMES);
612 REGISTER_ENUM(RPMDBI_NAME);
613 REGISTER_ENUM(RPMDBI_BASENAMES);
614 REGISTER_ENUM(RPMDBI_GROUP);
615 REGISTER_ENUM(RPMDBI_REQUIRENAME);
616 REGISTER_ENUM(RPMDBI_PROVIDENAME);
617 REGISTER_ENUM(RPMDBI_CONFLICTNAME);
618 REGISTER_ENUM(RPMDBI_OBSOLETENAME);
619 REGISTER_ENUM(RPMDBI_TRIGGERNAME);
620 REGISTER_ENUM(RPMDBI_DIRNAMES);
621 REGISTER_ENUM(RPMDBI_INSTALLTID);
622 REGISTER_ENUM(RPMDBI_SIGMD5);
623 REGISTER_ENUM(RPMDBI_SHA1HEADER);
625 REGISTER_ENUM(HEADERCONV_EXPANDFILELIST);
626 REGISTER_ENUM(HEADERCONV_COMPRESSFILELIST);
627 REGISTER_ENUM(HEADERCONV_RETROFIT_V3);
629 REGISTER_ENUM(RPMVERIFY_NONE);
630 REGISTER_ENUM(RPMVERIFY_FILEDIGEST);
631 REGISTER_ENUM(RPMVERIFY_FILESIZE);
632 REGISTER_ENUM(RPMVERIFY_LINKTO);
633 REGISTER_ENUM(RPMVERIFY_USER);
634 REGISTER_ENUM(RPMVERIFY_GROUP);
635 REGISTER_ENUM(RPMVERIFY_MTIME);
636 REGISTER_ENUM(RPMVERIFY_MODE);
637 REGISTER_ENUM(RPMVERIFY_RDEV);
638 REGISTER_ENUM(RPMVERIFY_CAPS);
639 REGISTER_ENUM(RPMVERIFY_READLINKFAIL);
640 REGISTER_ENUM(RPMVERIFY_READFAIL);
641 REGISTER_ENUM(RPMVERIFY_LSTATFAIL);
643 REGISTER_ENUM(RPMBUILD_ISSOURCE);
644 REGISTER_ENUM(RPMBUILD_ISPATCH);
645 REGISTER_ENUM(RPMBUILD_ISICON);
646 REGISTER_ENUM(RPMBUILD_ISNO);
648 REGISTER_ENUM(RPMBUILD_NONE);
649 REGISTER_ENUM(RPMBUILD_PREP);
650 REGISTER_ENUM(RPMBUILD_BUILD);
651 REGISTER_ENUM(RPMBUILD_INSTALL);
652 REGISTER_ENUM(RPMBUILD_CHECK);
653 REGISTER_ENUM(RPMBUILD_CLEAN);
654 REGISTER_ENUM(RPMBUILD_FILECHECK);
655 REGISTER_ENUM(RPMBUILD_PACKAGESOURCE);
656 REGISTER_ENUM(RPMBUILD_PACKAGEBINARY);
657 REGISTER_ENUM(RPMBUILD_RMSOURCE);
658 REGISTER_ENUM(RPMBUILD_RMBUILD);
659 REGISTER_ENUM(RPMBUILD_RMSPEC);
661 REGISTER_ENUM(RPMBUILD_PKG_NONE);
662 REGISTER_ENUM(RPMBUILD_PKG_NODIRTOKENS);
664 REGISTER_ENUM(RPMSPEC_NONE);
665 REGISTER_ENUM(RPMSPEC_ANYARCH);
666 REGISTER_ENUM(RPMSPEC_FORCE);
667 REGISTER_ENUM(RPMSPEC_NOLANG);