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

# python/header-py.c File Reference

More...

`#include "system.h"`
`#include "Python.h"`
`#include "rpmio_internal.h"`
`#include "rpmcli.h"`
`#include "legacy.h"`
`#include "misc.h"`
`#include "header_internal.h"`
`#include "rpmts.h"`
`#include "header-py.h"`
`#include "rpmds-py.h"`
`#include "rpmfi-py.h"`
`#include "debug.h"`

Go to the source code of this file.

## Data Structures
struct | hdrObject_s
## Class: rpm.hdr
Header | headerAllocated (Header h)
PyObject * | hdrKeyList (hdrObject *s, PyObject *args)
PyObject * | hdrUnload (hdrObject *s, PyObject *args, PyObject *keywords)
PyObject * | hdrExpandFilelist (hdrObject *s, PyObject *args)
PyObject * | hdrCompressFilelist (hdrObject *s, PyObject *args)
void | mungeFilelist (Header h)
PyObject * | rhnUnload (hdrObject *s, PyObject *args)
PyObject * | hdrFullFilelist (hdrObject *s, PyObject *args)
PyObject * | hdrSprintf (hdrObject *s, PyObject *args)
int | hdr_compare (hdrObject *a, hdrObject *b)
PyObject * | hdr_getattr (hdrObject *s, char *name)
void | hdr_dealloc (hdrObject *s)
long | tagNumFromPyObject (PyObject *item)
PyObject * | hdr_subscript (hdrObject *s, PyObject *item)
hdrObject * | hdr_Wrap (Header h)
Header | hdrGetHeader (hdrObject *s)
PyObject * | hdrLoad (PyObject *self, PyObject *args)
PyObject * | rhnLoad (PyObject *self, PyObject *args)
PyObject * | rpmReadHeaders (FD_t fd)
PyObject * | rpmHeaderFromFD (PyObject *self, PyObject *args)
PyObject * | rpmHeaderFromFile (PyObject *self, PyObject *args)
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 * | versionCompare (PyObject *self, PyObject *args)
PyObject * | labelCompare (PyObject *self, PyObject *args)
PyMethodDef | hdr_methods []
PyMappingMethods | hdr_as_mapping
char | hdr_doc []
PyTypeObject | hdr_Type

## Detailed Description

Definition in file header-py.c.

## Function Documentation

int hdr_compare | ( | hdrObject * | a,
|  | hdrObject * | b
| ) | `[static]`

| Definition at line 333 of file header-py.c. References rpmVersionCompare. Referenced by versionCompare.

hdrObject* hdr_Wrap | ( | Header | h | ) |

| Definition at line 628 of file header-py.c. References hdrObject_s::fileList, hdrObject_s::fileSizes, hdrObject_s::gids, hdrObject_s::h, hdr_Type, headerLink, hdrObject_s::linkList, hdrObject_s::md5list, hdrObject_s::modes, hdrObject_s::mtimes, hdrObject_s::rdevs, and hdrObject_s::uids.

Header hdrGetHeader | ( | hdrObject * | s | ) |

| Definition at line 638 of file header-py.c. References hdrObject_s::h.

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

| Definition at line 645 of file header-py.c. References compressFilelist, hdr_Wrap, headerAllocated, headerFree, headerLoad, providePackageNVR, and pyrpmError.

Header headerAllocated | ( | Header | h | ) | `[inline, static]`

| Definition at line 106 of file header-py.c. References headerToken::flags, and HEADERFLAG_ALLOCATED. Referenced by hdrLoad, rhnLoad, and rhnUnload.

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

| Definition at line 911 of file header-py.c. References rpmvercmp.

PyObject* rhnLoad | ( | PyObject * | self,
|  | PyObject * | args
| ) |

| Definition at line 680 of file header-py.c. References hdr_Wrap, headerAddEntry, headerAllocated, headerFree, headerGetEntry, headerIsEntry, headerLoad, int_32, pyrpmError, RPMTAG_ARCH, RPMTAG_HEADERIMMUTABLE, RPMTAG_RHNPLATFORM, RPMTAG_SHA1HEADER, and RPMTAG_SHA1RHN.

PyObject* rhnUnload | ( | hdrObject * | s,
|  | PyObject * | args
| ) | `[static]`

| Definition at line 232 of file header-py.c. References _free, headerAddEntry, headerAllocated, headerFree, headerFreeData, headerGetEntry, headerIsEntry, headerLink, headerLoad, headerReload, headerSizeof, headerUnload, int_32, PGPHASHALGO_SHA1, RPM_STRING_TYPE, RPMDIGEST_NONE, rpmDigestFinal, rpmDigestInit, rpmDigestUpdate, RPMTAG_ARCH, RPMTAG_HEADERIMMUTABLE, RPMTAG_RHNPLATFORM, RPMTAG_SHA1HEADER, and RPMTAG_SHA1RHN.

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

| Definition at line 770 of file header-py.c. References Fclose, fdDup, and rpmReadHeaders.

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

| Definition at line 787 of file header-py.c. References Fclose, Fopen, pyrpmError, and rpmReadHeaders.

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. Definition at line 811 of file header-py.c. References _free, hdrObject_s::fileList, hdrObject_s::h, HEADER_MAGIC_YES, headerAddEntry, headerFreeData, headerFreeIterator, headerGetEntry, headerInitIterator, headerNextIterator, headerRead, headerRemoveEntry, int_32, hdrObject_s::linkList, hdrObject_s::md5list, and pyrpmError.

PyObject* rpmMergeHeadersFromFD | ( | PyObject * | self,
|  | PyObject * | args
| ) |

| Definition at line 868 of file header-py.c. References Fclose, fdDup, and rpmMergeHeaders.

PyObject* rpmReadHeaders | ( | FD_t | fd | ) |

| Definition at line 731 of file header-py.c. References compressFilelist, hdr_Wrap, HEADER_MAGIC_YES, headerFree, headerRead, providePackageNVR, and pyrpmError.

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

| Definition at line 899 of file header-py.c. References hdr_compare, and hdr_Type.

## Variable Documentation

char hdr_doc[]`[static]`

| Initial value:
    ""
Definition at line 576 of file header-py.c.