# python/rpmts-py.c File Reference

`#include "system.h"`
`#include <rpmio_internal.h>`
`#include <rpmcli.h>`
`#include <rpmpgp.h>`
`#include <rpmdb.h>`
`#include <pkgio.h>`
`#include <rpmbuild.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

## Defines

#define | _RPMPS_INTERNAL

## 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)
rpmtsObject * | rpmts_Create (PyObject *self, PyObject *args, PyObject *kwds)
Class: Rpmts
static int | rpmts_SolveCallback (rpmts ts, rpmds ds, const void *data)
static void * | rpmtsCallback (const void *hd, const rpmCallbackType what, const uint64_t amount, const uint64_t total, const void *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

## Detailed Description

Definition in file rpmts-py.c.

## Define Documentation

#define _RPMPS_INTERNAL

Definition at line 9 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 436 of file rpmts-py.c.

References _rpmts_debug, pyrpmError, rpmdbFreeIterator(), rpmdbGetIteratorCount(), rpmdbGetIteratorOffset(), RPMDBI_LABEL, RPMDBI_PACKAGES, rpmdbNextIterator(), rpmtsAddEraseElement(), rpmtsInitIterator(), and rpmtsObject_s::ts.

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

Definition at line 391 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 498 of file rpmts-py.c.

References _free(), _rpmts_debug, rpmtsCallbackType_s::_save, rpmtsCallbackType_s::cb, rpmtsCallbackType_s::dso, rpmtsCallbackType_s::pythonError, 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 642 of file rpmts-py.c.

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

static PyObject* rpmts_CloseDB | ( | rpmtsObject * | s | ) | `[static]`

Definition at line 818 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 370 of file rpmts-py.c.

References _rpmts_debug, and rpmtsObject_s::ts.

static PyObject* rpmts_getattro | ( | PyObject * | o,
|  | PyObject * | n |
| ) |  |  | `[static]`

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

static PyObject* rpmts_GetVSFlags | ( | rpmtsObject * | s | ) | `[static]`

Definition at line 1011 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 949 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 896 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 709 of file rpmts-py.c.

References _free(), _rpmts_debug, IDT_s::h, hdr_Wrap(), IDTindex_s::idt, IDTXfree(), IDTXglob(), IDT_s::key, IDTindex_s::nidt, rpmExpand(), rpmtsObject_s::ts, IDT_s::u32, and IDT_s::val.

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

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

References _rpmts_debug, IDT_s::h, hdr_Wrap(), IDTXfree(), IDTXload(), IDT_s::instance, rpmtsObject_s::ts, IDT_s::u32, and IDT_s::val.

static PyObject* rpmts_InitDB | ( | rpmtsObject * | s | ) | `[static]`

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

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

static PyObject* rpmts_iter | ( | rpmtsObject * | s | ) | `[static]`

Definition at line 315 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 331 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 1357 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 1303 of file rpmts-py.c.

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

static PyObject* rpmts_OpenDB | ( | rpmtsObject * | s | ) | `[static]`

Definition at line 800 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 622 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 1101 of file rpmts-py.c.

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

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

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

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

static rpmpsObject* rpmts_Problems | ( | rpmtsObject * | s | ) | `[static]`

Definition at line 1205 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 856 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 762 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 1218 of file rpmts-py.c.

References _free(), _rpmts_debug, rpmtsCallbackType_s::_save, rpmtsCallbackType_s::cb, rpmtsCallbackType_s::data, rpmtsCallbackType_s::dso, rpmtsObject_s::ignoreSet, matchpathcon_init, rpmtsCallbackType_s::pythonError, rpmGetPath(), rpmProblemGetType(), rpmProblemString(), rpmpsFree(), rpmpsFreeIterator(), rpmpsInitIterator(), rpmpsNextIterator(), rpmpsProblem(), RPMTRANS_FLAG_NOCONTEXTS, rpmtsCallback(), rpmtsFlags(), rpmtsProblems(), rpmtsRun(), rpmtsSELinuxEnabled(), rpmtsSetNotifyCallback(), rpmtsObject_s::ts, and rpmtsCallbackType_s::tso.

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

Definition at line 1043 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 1159 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 1137 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 1020 of file rpmts-py.c.

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

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

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

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

Referenced by rpmts_Check().

static PyObject* rpmts_VerifyDB | ( | rpmtsObject * | s | ) | `[static]`

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

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

static void* rpmtsCallback | ( | const void * | hd,
|  | const rpmCallbackType | what,
|  | const uint64_t | amount,
|  | const uint64_t | total,
|  | const void * | pkgKey,
|  | rpmCallbackData | data |
| ) |  |  | `[static]`

Definition at line 214 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, rpmtsCallbackType_s::pythonError, RPMCALLBACK_INST_CLOSE_FILE, RPMCALLBACK_INST_OPEN_FILE, 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 1326 of file rpmts-py.c.

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

## Variable Documentation

int _rpmts_debug

Definition at line 79 of file rpmts.c.

char rpmts_doc[]`[static]`

Initial value:

    ""

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