rpm  5.4.15
Data Structures | Macros | Functions | Variables
header-py.c File Reference
#include "system-py.h"
#include "rpmio_internal.h"
#include <rpmcb.h>
#include "legacy.h"
#include "header_internal.h"
#include "rpmtypes.h"
#include "rpmevr.h"
#include "pkgio.h"
#include "rpmts.h"
#include "rpmcli.h"
#include "header-py.h"
#include "rpmds-py.h"
#include "rpmfi-py.h"
#include "debug.h"
Include dependency graph for header-py.c:

Go to the source code of this file.

Data Structures

struct  hdrObject_s
 

Macros

#define _RPMTAG_INTERNAL
 
#define _RPMEVR_INTERNAL
 

Functions

static Header headerAllocated (Header h)
 
static PyObject * hdrIsSource (hdrObject *s)
 
static int hdr_compare (hdrObject *a, hdrObject *b)
 
static long hdr_hash (PyObject *h)
 
static void hdr_dealloc (hdrObject *s)
 
rpmTag tagNumFromPyObject (PyObject *item)
 
static PyObject * hdr_subscript (hdrObject *s, PyObject *item)
 
static PyObject * hdr_getattro (hdrObject *o, PyObject *n)
 
static int hdr_setattro (hdrObject *o, PyObject *n, PyObject *v)
 
hdrObjecthdr_Wrap (Header h)
 
Header hdrGetHeader (hdrObject *s)
 
PyObject * hdrLoad (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmReadHeaders (FD_t fd)
 
PyObject * rpmHeaderFromFD (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmHeaderFromFile (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmSingleHeaderFromFD (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmWriteHeaders (PyObject *list, FD_t fd)
 
PyObject * rpmHeaderToFD (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmHeaderToFile (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * versionCompare (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * labelCompare (PyObject *self, PyObject *args)
 
PyObject * evrCompare (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * evrSplit (PyObject *self, PyObject *args, PyObject *kwds)
 
Class: Rpmhdr
static PyObject * hdrKeyList (hdrObject *s)
 
static PyObject * hdrUnload (hdrObject *s, PyObject *args, PyObject *keywords)
 
static PyObject * hdrGetOrigin (hdrObject *s)
 
static PyObject * hdrSetOrigin (hdrObject *s, PyObject *args, PyObject *kwds)
 
static PyObject * hdrSprintf (hdrObject *s, PyObject *args, PyObject *kwds)
 

Variables

static struct PyMethodDef hdr_methods []
 
static PyMappingMethods hdr_as_mapping
 
static char hdr_doc []
 
PyTypeObject hdr_Type
 

Macro Definition Documentation

#define _RPMEVR_INTERNAL

Definition at line 14 of file header-py.c.

#define _RPMTAG_INTERNAL

Definition at line 11 of file header-py.c.

Function Documentation

PyObject* evrCompare ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 1017 of file header-py.c.

References rpmEVRcompare(), rpmEVRfree(), rpmEVRnew(), rpmEVRparse(), and RPMSENSE_EQUAL.

PyObject* evrSplit ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 1040 of file header-py.c.

References rpmEVRfree(), rpmEVRnew(), rpmEVRparse(), and RPMSENSE_EQUAL.

static int hdr_compare ( hdrObject a,
hdrObject b 
)
static

Definition at line 339 of file header-py.c.

References hdrObject_s::h, and rpmVersionCompare().

Referenced by versionCompare().

static void hdr_dealloc ( hdrObject s)
static

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

References hdrObject_s::h, and headerFree().

static PyObject* hdr_getattro ( hdrObject o,
PyObject *  n 
)
static

Definition at line 609 of file header-py.c.

References hdr_subscript().

static long hdr_hash ( PyObject *  h)
static

Definition at line 345 of file header-py.c.

static int hdr_setattro ( hdrObject o,
PyObject *  n,
PyObject *  v 
)
static

Definition at line 619 of file header-py.c.

static PyObject* hdr_subscript ( hdrObject s,
PyObject *  item 
)
static
hdrObject* hdr_Wrap ( Header  h)
Header hdrGetHeader ( hdrObject s)
static PyObject* hdrGetOrigin ( hdrObject s)
static

Definition at line 253 of file header-py.c.

References hdrObject_s::h, and headerGetOrigin().

static PyObject* hdrIsSource ( hdrObject s)
static

Definition at line 152 of file header-py.c.

References hdrObject_s::h, headerIsEntry(), and RPMTAG_SOURCERPM.

static PyObject* hdrKeyList ( hdrObject s)
static
PyObject* hdrLoad ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 692 of file header-py.c.

References hdr_Wrap(), headerAllocated(), headerFree(), headerLoad(), len, obj, and pyrpmError.

static PyObject* hdrSetOrigin ( hdrObject s,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 267 of file header-py.c.

References hdrObject_s::h, and headerSetOrigin().

static PyObject* hdrSprintf ( hdrObject s,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 284 of file header-py.c.

References _free(), err, hdrObject_s::h, headerSprintf(), pyrpmError, and rpmHeaderFormats.

static PyObject* hdrUnload ( hdrObject s,
PyObject *  args,
PyObject *  keywords 
)
static
static Header headerAllocated ( Header  h)
inlinestatic

Definition at line 145 of file header-py.c.

References headerToken_s::flags, and HEADERFLAG_ALLOCATED.

Referenced by hdrLoad().

PyObject* labelCompare ( PyObject *  self,
PyObject *  args 
)

Definition at line 981 of file header-py.c.

References b, rpmEVRcompare(), rpmEVRfree(), rpmEVRnew(), and RPMSENSE_EQUAL.

PyObject* rpmHeaderFromFD ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 789 of file header-py.c.

References Fclose(), fdDup(), and rpmReadHeaders().

PyObject* rpmHeaderFromFile ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 810 of file header-py.c.

References Fclose(), Fopen(), pyrpmError, and rpmReadHeaders().

PyObject* rpmHeaderToFD ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 920 of file header-py.c.

References Fclose(), fdDup(), and rpmWriteHeaders().

PyObject* rpmHeaderToFile ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 942 of file header-py.c.

References Fclose(), Fopen(), pyrpmError, and rpmWriteHeaders().

PyObject* rpmReadHeaders ( FD_t  fd)
PyObject* rpmSingleHeaderFromFD ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)
PyObject* rpmWriteHeaders ( PyObject *  list,
FD_t  fd 
)

Definition at line 894 of file header-py.c.

References _free(), hdrObject_s::h, pyrpmError, rpmlog(), RPMLOG_ERR, rpmpkgWrite(), and RPMRC_OK.

Referenced by rpmHeaderToFD(), and rpmHeaderToFile().

rpmTag tagNumFromPyObject ( PyObject *  item)
PyObject* versionCompare ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 968 of file header-py.c.

References hdr_compare().

Variable Documentation

PyMappingMethods hdr_as_mapping
static
Initial value:
= {
(lenfunc) 0,
(binaryfunc) hdr_subscript,
(objobjargproc) 0,
}
static PyObject * hdr_subscript(hdrObject *s, PyObject *item)
Definition: header-py.c:377

Definition at line 603 of file header-py.c.

char hdr_doc[]
static
Initial value:
=
""

Definition at line 627 of file header-py.c.

struct PyMethodDef hdr_methods[]
static
Initial value:
= {
{"keys", (PyCFunction) hdrKeyList, METH_NOARGS,
NULL },
{"unload", (PyCFunction) hdrUnload, METH_VARARGS|METH_KEYWORDS,
NULL },
{"getorigin", (PyCFunction) hdrGetOrigin, METH_NOARGS,
NULL },
{"setorigin", (PyCFunction) hdrSetOrigin, METH_VARARGS|METH_KEYWORDS,
NULL },
{"sprintf", (PyCFunction) hdrSprintf, METH_VARARGS|METH_KEYWORDS,
NULL },
{"isSource", (PyCFunction)hdrIsSource, METH_NOARGS,
NULL },
{"dsOfHeader", (PyCFunction)hdr_dsOfHeader, METH_NOARGS,
NULL},
{"dsFromHeader", (PyCFunction)hdr_dsFromHeader, METH_VARARGS|METH_KEYWORDS,
NULL},
{"fiFromHeader", (PyCFunction)hdr_fiFromHeader, METH_VARARGS|METH_KEYWORDS,
NULL},
{NULL, NULL}
}
static PyObject * hdrGetOrigin(hdrObject *s)
Definition: header-py.c:253
rpmfiObject * hdr_fiFromHeader(PyObject *s, PyObject *args, PyObject *kwds)
Definition: rpmfi-py.c:598
rpmdsObject * hdr_dsOfHeader(PyObject *s)
Definition: rpmds-py.c:853
static PyObject * hdrSetOrigin(hdrObject *s, PyObject *args, PyObject *kwds)
Definition: header-py.c:267
static PyObject * hdrUnload(hdrObject *s, PyObject *args, PyObject *keywords)
Definition: header-py.c:212
rpmdsObject * hdr_dsFromHeader(PyObject *s, PyObject *args, PyObject *kwds)
Definition: rpmds-py.c:830
static PyObject * hdrSprintf(hdrObject *s, PyObject *args, PyObject *kwds)
Definition: header-py.c:284
static PyObject * hdrIsSource(hdrObject *s)
Definition: header-py.c:152
static PyObject * hdrKeyList(hdrObject *s)
Definition: header-py.c:165

Definition at line 313 of file header-py.c.

PyTypeObject hdr_Type

Definition at line 633 of file header-py.c.

Referenced by init_rpm(), rpmds_init(), rpmfi_init(), and rpmts_AddInstall().