Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

python/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

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)

Defines

#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.
static void compressFilelist (Header h)
 Convert absolute path tag to (dirname,basename,dirindex) tags.
static void mungeFilelist (Header h)
static void providePackageNVR (Header h)
 Retrofit an explicit Provides: N = E:V-R dependency into package headers.
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.
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.
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)

Variables

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


Detailed Description

Definition in file header-py.c.


Define Documentation

#define _RPMEVR_INTERNAL
 

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


Function Documentation

static void compressFilelist Header  h  )  [static]
 

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

Parameters:
h header

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

References alloca(), dncmp(), headerAddEntry(), headerFreeData(), headerGetEntryMinMemory(), headerIsEntry(), headerRemoveEntry(), RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, and RPMTAG_OLDFILENAMES.

static int dncmp const void *  a,
const void *  b
[static]
 

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

static void expandFilelist Header  h  )  [static]
 

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

Parameters:
h header

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]
 

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

References hdrObject_s::h, HEADER_I18NTABLE, headerFreeIterator(), headerInitIterator(), headerNextIterator(), RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT64_TYPE, RPM_INT8_TYPE, RPM_OPENPGP_TYPE, RPM_STRING_ARRAY_TYPE, and RPM_STRING_TYPE.

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]
 

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

References _free(), hdrObject_s::h, headerCopy(), headerFree(), headerLink(), headerSizeof(), headerUnload(), and pyrpmError.

static Header headerAllocated Header  h  )  [inline, static]
 

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]
 

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

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

Referenced by hdrFullFilelist().

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:
h header

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.


Generated on Tue Dec 27 22:20:38 2016 for rpm by  doxygen 1.4.4