- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# python/rpmmodule.c

Go to the documentation of this file.

    00001
    00005 #include "system.h"
    00006
    00007 #include <rpmio_internal.h>
    00008 #include <rpmsq.h>
    00009 #define _RPMTAG_INTERNAL
    00010 #include <rpmtag.h>
    00011 #define _RPMEVR_INTERNAL
    00012 #include <rpmevr.h>
    00013 #include <rpmdb.h>
    00014 #include <rpmcli.h>     /* XXX for rpmCheckSig */
    00015
    00016 #include "legacy.h"
    00017 #include "misc.h"
    00018
    00019 #include "header-py.h"
    00020 #include "rpmal-py.h"
    00021 #include "rpmds-py.h"
    00022 #include "rpmfd-py.h"
    00023 #include "rpmfts-py.h"
    00024 #include "rpmfi-py.h"
    00025 #include "rpmmacro-py.h"
    00026 #include "rpmmi-py.h"
    00027 #include "rpmps-py.h"
    00028 #include "rpmte-py.h"
    00029 #include "rpmts-py.h"
    00030 #include "spec-py.h"
    00031
    00032 #include "debug.h"
    00033
    00034 #ifdef __LCLINT__
    00035 #undef  PyObject_HEAD
    00036 #define PyObject_HEAD   int _PyObjectHead
    00037 #endif
    00038
    00043
    00046 PyObject * pyrpmError;
    00047
    00048 extern sigset_t rpmsqCaught;
    00049
    00050 #if PY_VERSION_HEX < 0x02050000
    00051 typedef int Py_ssize_t;
    00052 #endif
    00053
    00056 static PyObject * archScore(PyObject * self, PyObject * args, PyObject * kwds)
    00057 {
    00058     char * arch;
    00059     char * platform;
    00060     int score;
    00061     char * kwlist[] = {"arch", NULL};
    00062
    00063     if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch))
    00064         return NULL;
    00065
    00066     platform = rpmExpand(arch, "-", "%{_vendor}", "-", "%{_os}", NULL);
    00067     score = rpmPlatformScore(platform, NULL, 0);
    00068     platform = _free(platform);
    00069
    00070     return Py_BuildValue("i", score);
    00071 }
    00072
    00075 static PyObject * platformScore(PyObject * self, PyObject * args, PyObject * kwds)
    00076 {
    00077     char * platform;
    00078     int score;
    00079     char * kwlist[] = {"platform", NULL};
    00080
    00081     if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &platform))
    00082         return NULL;
    00083
    00084     score = rpmPlatformScore(platform, NULL, 0);
    00085
    00086     return Py_BuildValue("i", score);
    00087 }
    00088
    00091 static PyObject * signalsCaught(PyObject * self, PyObject * check)
    00092 {
    00093     PyObject *caught, *o;
    00094     Py_ssize_t llen;
    00095     int signum, i;
    00096     sigset_t newMask, oldMask;
    00097
    00098     if (!PyList_Check(check)) {
    00099         PyErr_SetString(PyExc_TypeError, "list expected");
    00100         return NULL;
    00101     }
    00102
    00103     llen = PyList_Size(check);
    00104     caught = PyList_New(0);
    00105
    00106     /* block signals while checking for them */
    00107     (void) sigfillset(&newMask);
    00108     (void) sigprocmask(SIG_BLOCK, &newMask, &oldMask);
    00109
    00110     for (i = 0; i < llen; i++) {
    00111         o = PyList_GetItem(check, i);
    00112         signum = PyInt_AsLong(o);
    00113         if (sigismember(&rpmsqCaught, signum)) {
    00114             PyList_Append(caught, o);
    00115         }
    00116     }
    00117     (void) sigprocmask(SIG_SETMASK, &oldMask, NULL);
    00118
    00119     return caught;
    00120 }
    00121
    00124 static PyObject * checkSignals(PyObject * self, PyObject * args)
    00125 {
    00126     if (!PyArg_ParseTuple(args, ":checkSignals")) return NULL;
    00127     rpmdbCheckSignals();
    00128     Py_INCREF(Py_None);
    00129     return Py_None;
    00130 }
    00131
    00134 static PyObject * setLogFile (PyObject * self, PyObject * args, PyObject *kwds)
    00135 {
    00136     PyObject * fop = NULL;
    00137     FILE * fp = NULL;
    00138     char * kwlist[] = {"fileObject", NULL};
    00139
    00140     if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:logSetFile", kwlist, &fop))
    00141         return NULL;
    00142
    00143     if (fop) {
    00144         if (!PyFile_Check(fop)) {
    00145             PyErr_SetString(pyrpmError, "requires file object");
    00146             return NULL;
    00147         }
    00148         fp = PyFile_AsFile(fop);
    00149     }
    00150
    00151     (void) rpmlogSetFile(fp);
    00152
    00153     Py_INCREF(Py_None);
    00154     return (PyObject *) Py_None;
    00155 }
    00156
    00159 static PyObject *
    00160 setVerbosity (PyObject * self, PyObject * args, PyObject *kwds)
    00161 {
    00162     int level;
    00163     char * kwlist[] = {"level", NULL};
    00164
    00165     if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &level))
    00166         return NULL;
    00167
    00168     rpmSetVerbosity(level);
    00169
    00170     Py_INCREF(Py_None);
    00171     return (PyObject *) Py_None;
    00172 }
    00173
    00176 static PyObject *
    00177 setEpochPromote (PyObject * self, PyObject * args, PyObject * kwds)
    00178 {
    00179     char * kwlist[] = {"promote", NULL};
    00180
    00181     if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist,
    00182             &_rpmds_nopromote))
    00183         return NULL;
    00184
    00185     Py_INCREF(Py_None);
    00186     return (PyObject *) Py_None;
    00187 }
    00188
    00191 static PyObject * setStats (PyObject * self, PyObject * args, PyObject * kwds)
    00192 {
    00193     char * kwlist[] = {"stats", NULL};
    00194
    00195     if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &_rpmts_stats))
    00196         return NULL;
    00197
    00198     Py_INCREF(Py_None);
    00199     return (PyObject *) Py_None;
    00200 }
    00205 static PyMethodDef rpmModuleMethods[] = {
    00206     { "TransactionSet", (PyCFunction) rpmts_Create, METH_VARARGS|METH_KEYWORDS,
    00207 "rpm.TransactionSet([rootDir, [db]]) -> ts\n\
    00208 - Create a transaction set.\n" },
    00209
    00210     { "addMacro", (PyCFunction) rpmmacro_AddMacro, METH_VARARGS|METH_KEYWORDS,
    00211         NULL },
    00212     { "delMacro", (PyCFunction) rpmmacro_DelMacro, METH_VARARGS|METH_KEYWORDS,
    00213         NULL },
    00214     { "expandMacro", (PyCFunction)rpmmacro_ExpandMacro, METH_VARARGS|METH_KEYWORDS,
    00215         NULL },
    00216     { "getMacros", (PyCFunction) rpmmacro_GetMacros, METH_VARARGS|METH_KEYWORDS,
    00217         NULL },
    00218
    00219     { "archscore", (PyCFunction) archScore, METH_VARARGS|METH_KEYWORDS,
    00220         NULL },
    00221     { "platformscore", (PyCFunction) platformScore, METH_VARARGS|METH_KEYWORDS,
    00222         NULL },
    00223
    00224     { "signalsCaught", (PyCFunction) signalsCaught, METH_O,
    00225         NULL },
    00226     { "checkSignals", (PyCFunction) checkSignals, METH_VARARGS,
    00227         NULL },
    00228
    00229     { "headerLoad", (PyCFunction) hdrLoad, METH_VARARGS|METH_KEYWORDS,
    00230         NULL },
    00231
    00232     { "readHeaderListFromFD", (PyCFunction) rpmHeaderFromFD, METH_VARARGS|METH_KEYWORDS,
    00233         NULL },
    00234     { "readHeaderListFromFile", (PyCFunction) rpmHeaderFromFile, METH_VARARGS|METH_KEYWORDS,
    00235         NULL },
    00236     { "readHeaderFromFD", (PyCFunction) rpmSingleHeaderFromFD, METH_VARARGS|METH_KEYWORDS,
    00237         NULL },
    00238
    00239     { "setLogFile", (PyCFunction) setLogFile, METH_VARARGS|METH_KEYWORDS,
    00240         NULL },
    00241
    00242     { "versionCompare", (PyCFunction) versionCompare, METH_VARARGS|METH_KEYWORDS,
    00243         NULL },
    00244     { "labelCompare", (PyCFunction) labelCompare, METH_VARARGS|METH_KEYWORDS,
    00245         NULL },
    00246     { "setVerbosity", (PyCFunction) setVerbosity, METH_VARARGS|METH_KEYWORDS,
    00247         NULL },
    00248     { "setEpochPromote", (PyCFunction) setEpochPromote, METH_VARARGS|METH_KEYWORDS,
    00249         NULL },
    00250     { "setStats", (PyCFunction) setStats, METH_VARARGS|METH_KEYWORDS,
    00251         NULL },
    00252
    00253     { "dsSingle", (PyCFunction) rpmds_Single, METH_VARARGS|METH_KEYWORDS,
    00254 "rpm.dsSingle(TagN, N, [EVR, [Flags]] -> ds\n\
    00255 - Create a single element dependency set.\n" },
    00256     { NULL }
    00257 } ;
    00258
    00259 /*
    00260  * Force clean up of open iterators and dbs on exit.
    00261  */
    00262 static void rpm_exithook(void)
    00263 {
    00264    rpmdbCheckTerminate(1);
    00265 }
    00266
    00269 static char rpm__doc__[] =
    00270 "";
    00271
    00272 void init_rpm(void);    /* XXX eliminate gcc warning */
    00275 void init_rpm(void)
    00276 {
    00277     PyObject * d, *o, * dict;
    00278     PyObject * m;
    00279
    00280 #if Py_TPFLAGS_HAVE_ITER        /* XXX backport to python-1.5.2 */
    00281     if (PyType_Ready(&hdr_Type) < 0) return;
    00282     if (PyType_Ready(&rpmal_Type) < 0) return;
    00283     if (PyType_Ready(&rpmds_Type) < 0) return;
    00284     if (PyType_Ready(&rpmfd_Type) < 0) return;
    00285     if (PyType_Ready(&rpmfts_Type) < 0) return;
    00286     if (PyType_Ready(&rpmfi_Type) < 0) return;
    00287     if (PyType_Ready(&rpmmi_Type) < 0) return;
    00288     if (PyType_Ready(&rpmps_Type) < 0) return;
    00289
    00290     if (PyType_Ready(&rpmte_Type) < 0) return;
    00291     if (PyType_Ready(&rpmts_Type) < 0) return;
    00292     if (PyType_Ready(&spec_Type) < 0) return;
    00293 #endif
    00294
    00295     m = Py_InitModule3("_rpm", rpmModuleMethods, rpm__doc__);
    00296     if (m == NULL)
    00297         return;
    00298
    00299     /*
    00300      * treat error to register rpm cleanup hook as fatal, tracebacks
    00301      * can and will leave stale locks around if we can't clean up
    00302      */
    00303     if (Py_AtExit(rpm_exithook) == -1)
    00304         return;
    00305
    00306     rpmReadConfigFiles(NULL, NULL);
    00307
    00308     d = PyModule_GetDict(m);
    00309
    00310 #ifdef  HACK
    00311     pyrpmError = PyString_FromString("_rpm.error");
    00312     PyDict_SetItemString(d, "error", pyrpmError);
    00313     Py_DECREF(pyrpmError);
    00314 #else
    00315     pyrpmError = PyErr_NewException("_rpm.error", NULL, NULL);
    00316     if (pyrpmError != NULL)
    00317         PyDict_SetItemString(d, "error", pyrpmError);
    00318 #endif
    00319
    00320 #if Py_TPFLAGS_HAVE_ITER        /* XXX backport to python-1.5.2 */
    00321     Py_INCREF(&hdr_Type);
    00322     PyModule_AddObject(m, "hdr", (PyObject *) &hdr_Type);
    00323
    00324     Py_INCREF(&rpmal_Type);
    00325     PyModule_AddObject(m, "al", (PyObject *) &rpmal_Type);
    00326
    00327     Py_INCREF(&rpmds_Type);
    00328     PyModule_AddObject(m, "ds", (PyObject *) &rpmds_Type);
    00329
    00330     Py_INCREF(&rpmfd_Type);
    00331     PyModule_AddObject(m, "fd", (PyObject *) &rpmfd_Type);
    00332
    00333     Py_INCREF(&rpmfts_Type);
    00334     PyModule_AddObject(m, "fts", (PyObject *) &rpmfts_Type);
    00335
    00336     Py_INCREF(&rpmfi_Type);
    00337     PyModule_AddObject(m, "fi", (PyObject *) &rpmfi_Type);
    00338
    00339     Py_INCREF(&rpmmi_Type);
    00340     PyModule_AddObject(m, "mi", (PyObject *) &rpmmi_Type);
    00341
    00342     Py_INCREF(&rpmps_Type);
    00343     PyModule_AddObject(m, "ps", (PyObject *) &rpmps_Type);
    00344
    00345     Py_INCREF(&rpmte_Type);
    00346     PyModule_AddObject(m, "te", (PyObject *) &rpmte_Type);
    00347
    00348     Py_INCREF(&rpmts_Type);
    00349     PyModule_AddObject(m, "ts", (PyObject *) &rpmts_Type);
    00350
    00351     Py_INCREF(&spec_Type);
    00352     PyModule_AddObject(m, "spec", (PyObject *) &spec_Type);
    00353 #else
    00354     hdr_Type.ob_type = &PyType_Type;
    00355     rpmal_Type.ob_type = &PyType_Type;
    00356     rpmds_Type.ob_type = &PyType_Type;
    00357     rpmfd_Type.ob_type = &PyType_Type;
    00358     rpmfts_Type.ob_type = &PyType_Type;
    00359     rpmfi_Type.ob_type = &PyType_Type;
    00360     rpmmi_Type.ob_type = &PyType_Type;
    00361     rpmps_Type.ob_type = &PyType_Type;
    00362     rpmte_Type.ob_type = &PyType_Type;
    00363     rpmts_Type.ob_type = &PyType_Type;
    00364     spec_Type.ob_type =  &PyType_Type;
    00365 #endif
    00366
    00367     dict = PyDict_New();
    00368
    00369  {  const struct headerTagTableEntry_s * t;
    00370     PyObject * to;
    00371     for (t = rpmTagTable; t && t->name; t++) {
    00372         PyDict_SetItemString(d, (char *) t->name, to=PyInt_FromLong(t->val));
    00373         Py_DECREF(to);
    00374         PyDict_SetItem(dict, to, o=PyString_FromString(t->name + 7));
    00375         Py_DECREF(o);
    00376     }
    00377  }
    00378
    00379  {  headerSprintfExtension exts = rpmHeaderFormats;
    00380     headerSprintfExtension ext;
    00381     PyObject * to;
    00382     int extNum;
    00383     for (ext = exts, extNum = 0; ext != NULL && ext->type != HEADER_EXT_LAST;
    00384         ext = (ext->type == HEADER_EXT_MORE ? *ext->u.more : ext+1), extNum++)
    00385     {
    00386         if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
    00387             continue;
    00388         PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
    00389         Py_DECREF(to);
    00390         PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
    00391         Py_DECREF(o);
    00392     }
    00393  }
    00394
    00395     PyDict_SetItemString(d, "tagnames", dict);
    00396     Py_DECREF(dict);
    00397
    00398 #define REGISTER_ENUM(val) \
    00399     PyDict_SetItemString(d, #val, o=PyInt_FromLong( val )); \
    00400     Py_DECREF(o);
    00401
    00402     REGISTER_ENUM(RPMFILE_STATE_NORMAL);
    00403     REGISTER_ENUM(RPMFILE_STATE_REPLACED);
    00404     REGISTER_ENUM(RPMFILE_STATE_NOTINSTALLED);
    00405     REGISTER_ENUM(RPMFILE_STATE_NETSHARED);
    00406     REGISTER_ENUM(RPMFILE_STATE_WRONGCOLOR);
    00407
    00408     REGISTER_ENUM(RPMFILE_CONFIG);
    00409     REGISTER_ENUM(RPMFILE_DOC);
    00410     REGISTER_ENUM(RPMFILE_ICON);
    00411     REGISTER_ENUM(RPMFILE_MISSINGOK);
    00412     REGISTER_ENUM(RPMFILE_NOREPLACE);
    00413     REGISTER_ENUM(RPMFILE_GHOST);
    00414     REGISTER_ENUM(RPMFILE_LICENSE);
    00415     REGISTER_ENUM(RPMFILE_README);
    00416     REGISTER_ENUM(RPMFILE_EXCLUDE);
    00417     REGISTER_ENUM(RPMFILE_UNPATCHED);
    00418     REGISTER_ENUM(RPMFILE_PUBKEY);
    00419
    00420     REGISTER_ENUM(RPMDEP_SENSE_REQUIRES);
    00421     REGISTER_ENUM(RPMDEP_SENSE_CONFLICTS);
    00422
    00423     REGISTER_ENUM(RPMSENSE_LESS);
    00424     REGISTER_ENUM(RPMSENSE_GREATER);
    00425     REGISTER_ENUM(RPMSENSE_EQUAL);
    00426     REGISTER_ENUM(RPMSENSE_NOTEQUAL);
    00427     REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
    00428
    00429     REGISTER_ENUM(RPMDEPS_FLAG_NOUPGRADE);
    00430     REGISTER_ENUM(RPMDEPS_FLAG_NOREQUIRES);
    00431     REGISTER_ENUM(RPMDEPS_FLAG_NOCONFLICTS);
    00432     REGISTER_ENUM(RPMDEPS_FLAG_NOOBSOLETES);
    00433     REGISTER_ENUM(RPMDEPS_FLAG_NOPARENTDIRS);
    00434     REGISTER_ENUM(RPMDEPS_FLAG_NOLINKTOS);
    00435     REGISTER_ENUM(RPMDEPS_FLAG_ANACONDA);
    00436     REGISTER_ENUM(RPMDEPS_FLAG_NOSUGGEST);
    00437     REGISTER_ENUM(RPMDEPS_FLAG_ADDINDEPS);
    00438     REGISTER_ENUM(RPMDEPS_FLAG_DEPLOOPS);
    00439
    00440     REGISTER_ENUM(RPMTRANS_FLAG_TEST);
    00441     REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS);
    00442     REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS);
    00443     REGISTER_ENUM(RPMTRANS_FLAG_JUSTDB);
    00444     REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERS);
    00445     REGISTER_ENUM(RPMTRANS_FLAG_NODOCS);
    00446     REGISTER_ENUM(RPMTRANS_FLAG_ALLFILES);
    00447     REGISTER_ENUM(RPMTRANS_FLAG_KEEPOBSOLETE);
    00448     REGISTER_ENUM(RPMTRANS_FLAG_REPACKAGE);
    00449     REGISTER_ENUM(RPMTRANS_FLAG_NOPRE);
    00450     REGISTER_ENUM(RPMTRANS_FLAG_NOPOST);
    00451     REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPREIN);
    00452     REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERIN);
    00453     REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERUN);
    00454     REGISTER_ENUM(RPMTRANS_FLAG_NOPREUN);
    00455     REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTUN);
    00456     REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPOSTUN);
    00457     REGISTER_ENUM(RPMTRANS_FLAG_NOFDIGESTS);
    00458     REGISTER_ENUM(RPMTRANS_FLAG_NOCONFIGS);
    00459
    00460     REGISTER_ENUM(RPMPROB_FILTER_IGNOREOS);
    00461     REGISTER_ENUM(RPMPROB_FILTER_IGNOREARCH);
    00462     REGISTER_ENUM(RPMPROB_FILTER_REPLACEPKG);
    00463     REGISTER_ENUM(RPMPROB_FILTER_FORCERELOCATE);
    00464     REGISTER_ENUM(RPMPROB_FILTER_REPLACENEWFILES);
    00465     REGISTER_ENUM(RPMPROB_FILTER_REPLACEOLDFILES);
    00466     REGISTER_ENUM(RPMPROB_FILTER_OLDPACKAGE);
    00467     REGISTER_ENUM(RPMPROB_FILTER_DISKSPACE);
    00468     REGISTER_ENUM(RPMPROB_FILTER_DISKNODES);
    00469
    00470     REGISTER_ENUM(RPMCALLBACK_UNKNOWN);
    00471     REGISTER_ENUM(RPMCALLBACK_INST_PROGRESS);
    00472     REGISTER_ENUM(RPMCALLBACK_INST_START);
    00473     REGISTER_ENUM(RPMCALLBACK_INST_OPEN_FILE);
    00474     REGISTER_ENUM(RPMCALLBACK_INST_CLOSE_FILE);
    00475     REGISTER_ENUM(RPMCALLBACK_TRANS_PROGRESS);
    00476     REGISTER_ENUM(RPMCALLBACK_TRANS_START);
    00477     REGISTER_ENUM(RPMCALLBACK_TRANS_STOP);
    00478     REGISTER_ENUM(RPMCALLBACK_UNINST_PROGRESS);
    00479     REGISTER_ENUM(RPMCALLBACK_UNINST_START);
    00480     REGISTER_ENUM(RPMCALLBACK_UNINST_STOP);
    00481     REGISTER_ENUM(RPMCALLBACK_REPACKAGE_PROGRESS);
    00482     REGISTER_ENUM(RPMCALLBACK_REPACKAGE_START);
    00483     REGISTER_ENUM(RPMCALLBACK_REPACKAGE_STOP);
    00484     REGISTER_ENUM(RPMCALLBACK_UNPACK_ERROR);
    00485     REGISTER_ENUM(RPMCALLBACK_CPIO_ERROR);
    00486     REGISTER_ENUM(RPMCALLBACK_SCRIPT_ERROR);
    00487
    00488     REGISTER_ENUM(RPMPROB_BADARCH);
    00489     REGISTER_ENUM(RPMPROB_BADOS);
    00490     REGISTER_ENUM(RPMPROB_PKG_INSTALLED);
    00491     REGISTER_ENUM(RPMPROB_BADRELOCATE);
    00492     REGISTER_ENUM(RPMPROB_REQUIRES);
    00493     REGISTER_ENUM(RPMPROB_CONFLICT);
    00494     REGISTER_ENUM(RPMPROB_NEW_FILE_CONFLICT);
    00495     REGISTER_ENUM(RPMPROB_FILE_CONFLICT);
    00496     REGISTER_ENUM(RPMPROB_OLDPACKAGE);
    00497     REGISTER_ENUM(RPMPROB_DISKSPACE);
    00498     REGISTER_ENUM(RPMPROB_DISKNODES);
    00499     REGISTER_ENUM(RPMPROB_BADPRETRANS);
    00500
    00501     REGISTER_ENUM(VERIFY_DIGEST);
    00502     REGISTER_ENUM(VERIFY_SIGNATURE);
    00503
    00504     REGISTER_ENUM(RPMLOG_EMERG);
    00505     REGISTER_ENUM(RPMLOG_ALERT);
    00506     REGISTER_ENUM(RPMLOG_CRIT);
    00507     REGISTER_ENUM(RPMLOG_ERR);
    00508     REGISTER_ENUM(RPMLOG_WARNING);
    00509     REGISTER_ENUM(RPMLOG_NOTICE);
    00510     REGISTER_ENUM(RPMLOG_INFO);
    00511     REGISTER_ENUM(RPMLOG_DEBUG);
    00512
    00513     REGISTER_ENUM(RPMMIRE_DEFAULT);
    00514     REGISTER_ENUM(RPMMIRE_STRCMP);
    00515     REGISTER_ENUM(RPMMIRE_REGEX);
    00516     REGISTER_ENUM(RPMMIRE_GLOB);
    00517
    00518     REGISTER_ENUM(RPMVSF_DEFAULT);
    00519     REGISTER_ENUM(RPMVSF_NOHDRCHK);
    00520     REGISTER_ENUM(RPMVSF_NEEDPAYLOAD);
    00521     REGISTER_ENUM(RPMVSF_NOSHA1HEADER);
    00522     REGISTER_ENUM(RPMVSF_NOMD5HEADER);
    00523     REGISTER_ENUM(RPMVSF_NODSAHEADER);
    00524     REGISTER_ENUM(RPMVSF_NORSAHEADER);
    00525     REGISTER_ENUM(RPMVSF_NOSHA1);
    00526     REGISTER_ENUM(RPMVSF_NOMD5);
    00527     REGISTER_ENUM(RPMVSF_NODSA);
    00528     REGISTER_ENUM(RPMVSF_NORSA);
    00529     REGISTER_ENUM(_RPMVSF_NODIGESTS);
    00530     REGISTER_ENUM(_RPMVSF_NOSIGNATURES);
    00531     REGISTER_ENUM(_RPMVSF_NOHEADER);
    00532     REGISTER_ENUM(_RPMVSF_NOPAYLOAD);
    00533
    00534     REGISTER_ENUM(TR_ADDED);
    00535     REGISTER_ENUM(TR_REMOVED);
    00536
    00537     REGISTER_ENUM(RPMDBI_PACKAGES);
    00538
    00539     REGISTER_ENUM((int)RPMAL_NOMATCH);
    00540 }