#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 |
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 PyObject * | hdr_getattro (PyObject *o, PyObject *n) |
static int | hdr_setattro (PyObject *o, PyObject *n, PyObject *v) |
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) |
hdrObject * | hdr_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) |
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 |
Definition in file header-py.c.
#define _RPMEVR_INTERNAL |
Definition at line 15 of file header-py.c.
static void compressFilelist | ( | Header | h | ) | [static] |
Convert absolute path tag to (dirname,basename,dirindex) tags.
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.
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().
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 618 of file header-py.c.
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 624 of file header-py.c.
static PyObject* hdrCompressFilelist | ( | hdrObject * | s | ) | [static] |
static PyObject* hdrExpandFilelist | ( | hdrObject * | s | ) | [static] |
static PyObject* hdrFullFilelist | ( | hdrObject * | s | ) | [static] |
static PyObject* hdrGetOrigin | ( | hdrObject * | s | ) | [static] |
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] |
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.
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.
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_EQUAL, RPMTAG_EPOCH, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, and stpcpy().
char hdr_doc[] [static] |