rpm 5.2.1

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

- File List
- Globals

Data Structures | Macros | Functions | Variables
rpmts-py.c File Reference
PYTHON-C Language Bindings.
`#include "system.h"`
`#include <rpmio_internal.h>`
`#include <rpmcb.h>`
`#include <rpmpgp.h>`
`#include <rpmtypes.h>`
`#include <rpmtag.h>`
`#include <pkgio.h>`
`#include <rpmdb.h>`
`#include <rpmbuild.h>`
`#include <rpmcli.h>`
`#include <rpmrollback.h>`
`#include "header-py.h"`
`#include "rpmds-py.h"`
`#include "rpmfi-py.h"`
`#include "rpmmi-py.h"`
`#include "rpmps-py.h"`
`#include "rpmte-py.h"`
`#include "spec-py.h"`
`#include "rpmts-py.h"`
`#include "debug.h"`
Include dependency graph for rpmts-py.c:

Go to the source code of this file.

## Data Structures
struct | rpmtsCallbackType_s

## Macros
#define | _RPMPS_INTERNAL /* XXX almost (but not quite) opaque. */
#define | _RPMTS_INTERNAL /* XXX expose rpmtsSetScriptFd */
#define | _RPMROLLBACK_INTERNAL /* XXX IDTX et al */
#define | rpmtsfree() rpmioFreePoolItem()

## Functions
static void | rpmts_dealloc (rpmtsObject *s)
static PyObject * | rpmts_getattro (PyObject *o, PyObject *n)
static int | rpmts_setattro (PyObject *o, PyObject *n, PyObject *v)
static int | rpmts_init (rpmtsObject *s, PyObject *args, PyObject *kwds)
static void | rpmts_free (rpmtsObject *s)
static PyObject * | rpmts_alloc (PyTypeObject *subtype, int nitems)
static PyObject * | rpmts_new (PyTypeObject *subtype, PyObject *args, PyObject *kwds)
PyObject * | rpmts_Create (PyObject *s, PyObject *args, PyObject *kwds)
Class: Rpmts
static void | rpmts_Die (PyObject *cb)
static int | rpmts_SolveCallback (rpmts ts, rpmds ds, const void *data)
static void * | rpmtsCallback (const void *hd, const rpmCallbackType what, const rpmuint64_t amount, const rpmuint64_t total, fnpyKey pkgKey, rpmCallbackData data)
static PyObject * | rpmts_iter (rpmtsObject *s)
static PyObject * | rpmts_iternext (rpmtsObject *s)
static PyObject * | rpmts_Debug (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_AddInstall (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_AddErase (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_Check (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_Order (rpmtsObject *s)
static PyObject * | rpmts_Clean (rpmtsObject *s)
static PyObject * | rpmts_IDTXload (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_IDTXglob (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_Rollback (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_OpenDB (rpmtsObject *s)
static PyObject * | rpmts_CloseDB (rpmtsObject *s)
static PyObject * | rpmts_InitDB (rpmtsObject *s)
static PyObject * | rpmts_RebuildDB (rpmtsObject *s)
static PyObject * | rpmts_VerifyDB (rpmtsObject *s)
static PyObject * | rpmts_HdrFromFdno (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_HdrCheck (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_GetVSFlags (rpmtsObject *s)
static PyObject * | rpmts_SetVSFlags (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_SetColor (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_PgpPrtPkts (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_PgpImportPubkey (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_SetFlags (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_SetDFlags (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_SetProbFilter (rpmtsObject *s, PyObject *args, PyObject *kwds)
static rpmpsObject * | rpmts_Problems (rpmtsObject *s)
static PyObject * | rpmts_Run (rpmtsObject *s, PyObject *args, PyObject *kwds)
static PyObject * | rpmts_Next (rpmtsObject *s)
static specObject * | spec_Parse (rpmtsObject *s, PyObject *args, PyObject *kwds)
static rpmmiObject * | rpmts_Match (rpmtsObject *s, PyObject *args, PyObject *kwds)

## Variables
int | _rpmts_debug
static struct PyMethodDef | rpmts_methods []
static char | rpmts_doc []
PyTypeObject | rpmts_Type

## Macro Definition Documentation

#define _RPMPS_INTERNAL /* XXX almost (but not quite) opaque. */

Definition at line 10 of file rpmts-py.c.

#define _RPMROLLBACK_INTERNAL /* XXX IDTX et al */

Definition at line 22 of file rpmts-py.c.

#define _RPMTS_INTERNAL /* XXX expose rpmtsSetScriptFd */

Definition at line 18 of file rpmts-py.c.

#define rpmtsfree | ( |  | ) | rpmioFreePoolItem()

Definition at line 37 of file rpmts-py.c.

## Function Documentation

static PyObject* rpmts_AddErase | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Todo:
  Permit finer control (i.e. not just –allmatches) of deleted elments.

Definition at line 457 of file rpmts-py.c.

References _rpmts_debug, pyrpmError, RPMDBI_LABEL, RPMDBI_PACKAGES, rpmmiCount(), rpmmiFree(), rpmmiInstance(), rpmmiNext(), rpmtsAddEraseElement(), rpmtsInitIterator(), and rpmtsObject_s::ts.

static PyObject* rpmts_AddInstall | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 412 of file rpmts-py.c.

References _rpmts_debug, hdr_Type, hdrGetHeader(), rpmtsObject_s::keyList, rpmtsAddInstallElement(), and rpmtsObject_s::ts.

static PyObject* rpmts_Check | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 519 of file rpmts-py.c.

References _free(), _rpmts_debug, rpmtsCallbackType_s::_save, rpmtsCallbackType_s::cb, rpmtsCallbackType_s::dso, RPMDEP_SENSE_CONFLICTS, RPMDEP_SENSE_REQUIRES, RPMPROB_BADRELOCATE, rpmProblemGetAltNEVR(), rpmProblemGetPkgNEVR(), rpmProblemGetType(), rpmProblemKey(), rpmpsFree(), rpmpsFreeIterator(), rpmpsInitIterator(), rpmpsNextIterator(), rpmpsProblem(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, rpmts_SolveCallback(), rpmtsCheck(), rpmtsProblems(), rpmtsSetSolveCallback(), rpmtsSolve(), rpmtsObject_s::ts, rpmtsCallbackType_s::tso, and xstrdup().

static PyObject* rpmts_Clean | ( | rpmtsObject * | s | ) |
| static

Definition at line 662 of file rpmts-py.c.

References _rpmts_debug, rpmtsClean(), and rpmtsObject_s::ts.

static PyObject* rpmts_CloseDB | ( | rpmtsObject * | s | ) |
| static

Definition at line 838 of file rpmts-py.c.

References _rpmts_debug, rpmtsCloseDB(), rpmtsSetDBMode(), and rpmtsObject_s::ts.

static PyObject* rpmts_Debug | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 391 of file rpmts-py.c.

References _rpmts_debug, and rpmtsObject_s::ts.

static void rpmts_Die | ( | PyObject * | cb | ) |
| static

Definition at line 184 of file rpmts-py.c.

References _, EXIT_FAILURE, rpmdbCheckTerminate(), rpmlog(), and RPMLOG_ERR.

Referenced by rpmts_SolveCallback(), and rpmtsCallback().

static PyObject* rpmts_getattro | ( | PyObject * | o,
|  | PyObject * | n
| ) |  |
| static

Definition at line 1537 of file rpmts-py.c.

static PyObject* rpmts_GetVSFlags | ( | rpmtsObject * | s | ) |
| static

Definition at line 1032 of file rpmts-py.c.

References rpmtsVSFlags(), and rpmtsObject_s::ts.

static PyObject* rpmts_HdrCheck | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 970 of file rpmts-py.c.

References _free(), _rpmts_debug, headerCheck(), pgpDigFree(), pgpDigNew(), pyrpmError, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmtsVSFlags(), and rpmtsObject_s::ts.

static PyObject* rpmts_HdrFromFdno | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 916 of file rpmts-py.c.

References _rpmts_debug, Fclose(), fdDup(), hdr_Wrap(), headerFree(), pyrpmError, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), and rpmtsObject_s::ts.

static PyObject* rpmts_IDTXglob | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 729 of file rpmts-py.c.

References _free(), _rpmts_debug, hdr_Wrap(), IDTXfree(), IDTXglob(), rpmExpand(), RPMTAG_REMOVETID, and rpmtsObject_s::ts.

static PyObject* rpmts_IDTXload | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 679 of file rpmts-py.c.

References _rpmts_debug, hdr_Wrap(), IDTXfree(), IDTXload(), RPMTAG_INSTALLTID, and rpmtsObject_s::ts.

static PyObject* rpmts_InitDB | ( | rpmtsObject * | s | ) |
| static

Definition at line 856 of file rpmts-py.c.

References _rpmts_debug, rpmtsCloseDB(), rpmtsInitDB(), and rpmtsObject_s::ts.

static PyObject* rpmts_iter | ( | rpmtsObject * | s | ) |
| static

Definition at line 336 of file rpmts-py.c.

References _rpmts_debug, and rpmtsObject_s::ts.

static PyObject* rpmts_iternext | ( | rpmtsObject * | s | ) |
| static

Todo:
  Add TR_ADDED filter to iterator.

Definition at line 352 of file rpmts-py.c.

References _rpmts_debug, rpmte_Wrap(), rpmtsiFree(), rpmtsiInit(), rpmtsiNext(), rpmtsObject_s::ts, rpmtsObject_s::tsi, and rpmtsObject_s::tsiFilter.

Referenced by rpmts_Next().

static rpmmiObject* rpmts_Match | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1361 of file rpmts-py.c.

References _rpmts_debug, RPMDBI_PACKAGES, rpmmi_Wrap(), rpmtsGetRdb(), rpmtsInitIterator(), rpmtsOpenDB(), tagNumFromPyObject(), and rpmtsObject_s::ts.

static PyObject* rpmts_Next | ( | rpmtsObject * | s | ) |
| static

Todo:
  Add TR_ADDED filter to iterator.

Definition at line 1307 of file rpmts-py.c.

References _rpmts_debug, rpmts_iternext(), and rpmtsObject_s::ts.

static PyObject* rpmts_OpenDB | ( | rpmtsObject * | s | ) |
| static

Definition at line 820 of file rpmts-py.c.

References _rpmts_debug, rpmtsDBMode(), rpmtsOpenDB(), rpmtsSetDBMode(), and rpmtsObject_s::ts.

static PyObject* rpmts_Order | ( | rpmtsObject * | s | ) |
| static

Definition at line 642 of file rpmts-py.c.

References _rpmts_debug, rpmtsOrder(), and rpmtsObject_s::ts.

static PyObject* rpmts_PgpImportPubkey | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1122 of file rpmts-py.c.

References _rpmts_debug, pyrpmError, rpmcliImportPubkey(), and rpmtsObject_s::ts.

static PyObject* rpmts_PgpPrtPkts | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1086 of file rpmts-py.c.

References _rpmts_debug, pgpPrtPkts(), pyrpmError, and rpmtsObject_s::ts.

static rpmpsObject* rpmts_Problems | ( | rpmtsObject * | s | ) |
| static

Definition at line 1226 of file rpmts-py.c.

References _rpmts_debug, rpmps_Wrap(), rpmtsProblems(), and rpmtsObject_s::ts.

static PyObject* rpmts_RebuildDB | ( | rpmtsObject * | s | ) |
| static

Definition at line 876 of file rpmts-py.c.

References _rpmts_debug, rpmtsRebuildDB(), and rpmtsObject_s::ts.

static PyObject* rpmts_Rollback | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 782 of file rpmts-py.c.

References _rpmts_debug, alloca(), INSTALL_FRESHEN, INSTALL_INSTALL, INSTALL_UPGRADE, rpmQVKArguments_s::installInterfaceFlags, rpmQVKArguments_s::probFilter, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::rbtid, rpmQVKArguments_s::relocations, RPMPROB_FILTER_OLDPACKAGE, rpmRollback(), RPMTRANS_FLAG_NOFDIGESTS, rpmtsSetFlags(), rpmQVKArguments_s::transFlags, rpmtsObject_s::ts, VERIFY_DIGEST, VERIFY_HDRCHK, and VERIFY_SIGNATURE.

static PyObject* rpmts_Run | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1239 of file rpmts-py.c.

References _rpmts_debug, rpmtsCallbackType_s::_save, rpmtsCallbackType_s::cb, rpmtsCallbackType_s::data, rpmtsCallbackType_s::dso, rpmtsObject_s::ignoreSet, rpmProblemGetDiskNeed(), rpmProblemGetStr(), rpmProblemGetType(), rpmProblemString(), rpmpsFree(), rpmpsFreeIterator(), rpmpsInitIterator(), rpmpsNextIterator(), rpmpsProblem(), rpmtsCallback(), rpmtsProblems(), rpmtsRun(), rpmtsSetNotifyCallback(), rpmtsObject_s::ts, and rpmtsCallbackType_s::tso.

static PyObject* rpmts_SetColor | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1064 of file rpmts-py.c.

References _rpmts_debug, rpmtsSetColor(), and rpmtsObject_s::ts.

static PyObject* rpmts_SetDFlags | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1180 of file rpmts-py.c.

References _rpmts_debug, rpmtsSetDFlags(), and rpmtsObject_s::ts.

static PyObject* rpmts_SetFlags | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1158 of file rpmts-py.c.

References _rpmts_debug, rpmtsSetFlags(), and rpmtsObject_s::ts.

static PyObject* rpmts_SetVSFlags | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1041 of file rpmts-py.c.

References _rpmts_debug, rpmtsSetVSFlags(), rpmtsObject_s::ts, and vsflags.

static int rpmts_SolveCallback | ( | rpmts | ts,
|  | rpmds | ds,
|  | const void * | data
| ) |  |
| static

Definition at line 200 of file rpmts-py.c.

References _rpmts_debug, rpmtsCallbackType_s::_save, rpmtsCallbackType_s::cb, rpmtsCallbackType_s::dso, rpmds_Wrap(), rpmdsDNEVR(), rpmts_Die(), and rpmtsCallbackType_s::tso.

Referenced by rpmts_Check().

static PyObject* rpmts_VerifyDB | ( | rpmtsObject * | s | ) |
| static

Definition at line 896 of file rpmts-py.c.

References _rpmts_debug, rpmtsVerifyDB(), and rpmtsObject_s::ts.

static void* rpmtsCallback | ( | const void * | hd,
|  | const rpmCallbackType | what,
|  | const rpmuint64_t | amount,
|  | const rpmuint64_t | total,
|  | fnpyKey | pkgKey,
|  | rpmCallbackData | data
| ) |  |
| static

Definition at line 240 of file rpmts-py.c.

References _free(), _rpmts_debug, rpmtsCallbackType_s::_save, alloca(), rpmtsCallbackType_s::cb, rpmtsCallbackType_s::data, Fclose(), fdDup(), fdSetOpen(), Fileno(), headerGet(), _HE_s::p, rpmDataType_u::ptr, RPMCALLBACK_INST_CLOSE_FILE, RPMCALLBACK_INST_OPEN_FILE, RPMTAG_NAME, rpmts_Die(), rpmDataType_u::str, and _HE_s::tag.

Referenced by rpmts_Run().

static specObject* spec_Parse | ( | rpmtsObject * | s,
|  | PyObject * | args,
|  | PyObject * | kwds
| ) |  |
| static

Definition at line 1330 of file rpmts-py.c.

References parseSpec(), pyrpmError, rpmtsSpec(), spec_Wrap(), and rpmtsObject_s::ts.

## Variable Documentation

int _rpmts_debug

Definition at line 83 of file rpmts.c.

char rpmts_doc[]
| static

Initial value:
=
""

Definition at line 1651 of file rpmts-py.c.