rpm  5.4.10
Data Structures | Macros | Functions | Variables
header-py.c File Reference
#include "system.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

§ _RPMEVR_INTERNAL

#define _RPMEVR_INTERNAL

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

§ _RPMTAG_INTERNAL

#define _RPMTAG_INTERNAL

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

Function Documentation

§ evrCompare()

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

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

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

§ evrSplit()

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

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

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

§ hdr_compare()

static int hdr_compare ( hdrObject a,
hdrObject b 
)
static

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

References hdrObject_s::h, and rpmVersionCompare().

Referenced by versionCompare().

§ hdr_dealloc()

static void hdr_dealloc ( hdrObject s)
static

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

References hdrObject_s::h, and headerFree().

§ hdr_getattro()

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

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

References hdr_subscript().

§ hdr_hash()

static long hdr_hash ( PyObject *  h)
static

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

References hdrObject_s::h.

§ hdr_setattro()

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

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

§ hdr_subscript()

static PyObject* hdr_subscript ( hdrObject s,
PyObject *  item 
)
static

§ hdr_Wrap()

hdrObject* hdr_Wrap ( Header  h)

§ hdrGetHeader()

Header hdrGetHeader ( hdrObject s)

§ hdrGetOrigin()

static PyObject* hdrGetOrigin ( hdrObject s)
static

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

References hdrObject_s::h, and headerGetOrigin().

§ hdrIsSource()

static PyObject* hdrIsSource ( hdrObject s)
static

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

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

§ hdrKeyList()

static PyObject* hdrKeyList ( hdrObject s)
static

§ hdrLoad()

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

§ hdrSetOrigin()

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

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

References hdrObject_s::h, and headerSetOrigin().

§ hdrSprintf()

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

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

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

§ hdrUnload()

static PyObject* hdrUnload ( hdrObject s,
PyObject *  args,
PyObject *  keywords 
)
static

§ headerAllocated()

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().

§ labelCompare()

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

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

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

§ rpmHeaderFromFD()

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

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

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

§ rpmHeaderFromFile()

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

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

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

§ rpmHeaderToFD()

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

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

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

§ rpmHeaderToFile()

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

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

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

§ rpmReadHeaders()

PyObject* rpmReadHeaders ( FD_t  fd)

§ rpmSingleHeaderFromFD()

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

§ rpmWriteHeaders()

PyObject* rpmWriteHeaders ( PyObject *  list,
FD_t  fd 
)

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

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

Referenced by rpmHeaderToFD(), and rpmHeaderToFile().

§ tagNumFromPyObject()

rpmTag tagNumFromPyObject ( PyObject *  item)

§ versionCompare()

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

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

References hdr_compare(), and hdr_Type.

Variable Documentation

§ hdr_as_mapping

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:379

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

§ hdr_doc

char hdr_doc[]
static
Initial value:
=
""

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

§ hdr_methods

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:616
rpmdsObject * hdr_dsOfHeader(PyObject *s)
Definition: rpmds-py.c:864
static PyObject * hdrSetOrigin(hdrObject *s, PyObject *args, PyObject *kwds)
Definition: header-py.c:268
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:841
static PyObject * hdrSprintf(hdrObject *s, PyObject *args, PyObject *kwds)
Definition: header-py.c:286
static PyObject * hdrIsSource(hdrObject *s)
Definition: header-py.c:152
static PyObject * hdrKeyList(hdrObject *s)
Definition: header-py.c:165

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

§ hdr_Type

PyTypeObject hdr_Type