rpm  4.5
Data Structures | Macros | Functions | Variables
header-py.c File Reference
#include "system.h"
#include "rpmio_internal.h"
#include "rpmcli.h"
#include "legacy.h"
#include "misc.h"
#include "header_internal.h"
#include "rpmts.h"
#include "rpmevr.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 _RPMEVR_INTERNAL
 

Functions

static Header headerAllocated (Header h)
 
static int dncmp (const void *a, const void *b)
 
static void expandFilelist (Header h)
 Convert (dirname,basename,dirindex) tags to absolute path tag. More...
 
static void compressFilelist (Header h)
 Convert absolute path tag to (dirname,basename,dirindex) tags. More...
 
static void mungeFilelist (Header h)
 
static void providePackageNVR (Header h)
 Retrofit an explicit Provides: N = E:V-R dependency into package headers. More...
 
static int hdr_compare (hdrObject *a, hdrObject *b)
 
static long hdr_hash (PyObject *h)
 
static void hdr_dealloc (hdrObject *s)
 
static int rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c)
 Retrieve tag info from header. More...
 
static PyObject * hdr_subscript (hdrObject *s, PyObject *item)
 
static PyObject * hdr_getattro (PyObject *o, PyObject *n)
 
static int hdr_setattro (PyObject *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)
 
int rpmMergeHeaders (PyObject *list, FD_t fd, int matchTag)
 This assumes the order of list matches the order of the new headers, and throws an exception if that isn't true. More...
 
PyObject * rpmMergeHeadersFromFD (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * rpmSingleHeaderFromFD (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * versionCompare (PyObject *self, PyObject *args, PyObject *kwds)
 
PyObject * labelCompare (PyObject *self, PyObject *args)
 
Class: Rpmhdr
static PyObject * hdrKeyList (hdrObject *s)
 
static PyObject * hdrUnload (hdrObject *s, PyObject *args, PyObject *keywords)
 
static PyObject * hdrExpandFilelist (hdrObject *s)
 
static PyObject * hdrCompressFilelist (hdrObject *s)
 
static PyObject * hdrGetOrigin (hdrObject *s)
 
static PyObject * hdrSetOrigin (hdrObject *s, PyObject *args, PyObject *kwds)
 
static PyObject * hdrFullFilelist (hdrObject *s)
 
static PyObject * hdrSprintf (hdrObject *s, PyObject *args, PyObject *kwds)
 
Type: _rpm.hdr
long tagNumFromPyObject (PyObject *item)
 

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 15 of file header-py.c.

Function Documentation

static void compressFilelist ( Header  h)
static
static int dncmp ( const void *  a,
const void *  b 
)
static

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

Referenced by compressFilelist().

static void expandFilelist ( Header  h)
static

Convert (dirname,basename,dirindex) tags to absolute path tag.

Parameters
hheader

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

References _free(), headerAddEntry(), headerIsEntry(), headerRemoveEntry(), RPM_STRING_ARRAY_TYPE, rpmfiBuildFNames(), RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, and RPMTAG_OLDFILENAMES.

Referenced by hdrExpandFilelist().

static int hdr_compare ( hdrObject a,
hdrObject b 
)
static

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

References hdrObject_s::h, and rpmVersionCompare().

Referenced by versionCompare().

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

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

References hdr_subscript().

static long hdr_hash ( PyObject *  h)
static

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

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

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

static PyObject* hdrCompressFilelist ( hdrObject s)
static

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

References compressFilelist(), and hdrObject_s::h.

static PyObject* hdrExpandFilelist ( hdrObject s)
static

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

References expandFilelist(), and hdrObject_s::h.

static PyObject* hdrFullFilelist ( hdrObject s)
static

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

References hdrObject_s::h, and mungeFilelist().

static PyObject* hdrGetOrigin ( hdrObject s)
static

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

References hdrObject_s::h, and headerGetOrigin().

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

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

References hdrObject_s::h, and headerSetOrigin().

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

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

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

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

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

References headerToken_s::flags, and HEADERFLAG_ALLOCATED.

Referenced by hdrLoad().

static void mungeFilelist ( Header  h)
static
static void providePackageNVR ( Header  h)
static

Retrofit an explicit Provides: N = E:V-R dependency into package headers.

Up to rpm 3.0.4, packages implicitly provided their own name-version-release.

Parameters
hheader

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

References alloca(), headerAddOrAppendEntry(), headerFreeData(), headerGetEntryMinMemory(), headerNVR(), name, RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMSENSE_ANY, RPMSENSE_EQUAL, RPMTAG_EPOCH, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, and stpcpy().

Variable Documentation

char hdr_doc[]
static
Initial value:
=
""

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