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)
long hdr_hash (PyObject *h)
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.

PyObject * rpmMergeHeadersFromFD (PyObject *self, PyObject *args)
PyObject * versionCompare (PyObject *self, PyObject *args)
int compare_values (const char *str1, const char *str2)
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 compare_values (  const char *  str1,
const char *  str2
)  [static]
 

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

References rpmvercmp().

Referenced by labelCompare().

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

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

References hdrObject_s::h, hdrObject, and rpmVersionCompare().

Referenced by versionCompare().

long hdr_hash (  PyObject *  h  )  [static]
 

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

hdrObject* hdr_Wrap (  Header  h  ) 
 

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

References hdrObject_s::fileList, hdrObject_s::fileSizes, hdrObject_s::gids, hdrObject_s::h, hdr_Type, hdrObject, Header, headerLink(), hdrObject_s::linkList, hdrObject_s::md5list, hdrObject_s::modes, hdrObject_s::mtimes, hdrObject_s::rdevs, and hdrObject_s::uids.

Referenced by hdrLoad(), rhnLoad(), rpmdb_subscript(), rpmmi_iternext(), rpmReadHeaders(), rpmts_HdrFromFdno(), rpmts_IDTXglob(), and rpmts_IDTXload().

Header hdrGetHeader (  hdrObject *  s  ) 
 

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

References hdrObject_s::h, hdrObject, and Header.

Referenced by hdr_dsFromHeader(), hdr_dsOfHeader(), hdr_fiFromHeader(), and rpmts_AddInstall().

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

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

References compressFilelist(), hdr_Wrap(), hdrObject, Header, headerAllocated(), headerFree(), headerLoad(), providePackageNVR(), and pyrpmError.

Header headerAllocated (  Header  h  )  [inline, static]
 

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

References headerToken_s::flags, Header, and HEADERFLAG_ALLOCATED.

Referenced by hdrLoad(), rhnLoad(), and rhnUnload().

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

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

References compare_values().

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

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

References hdr_Wrap(), Header, 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 283 of file header-py.c.

References _free(), DIGEST_CTX, hdrObject_s::h, hdrObject, Header, 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 851 of file header-py.c.

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

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

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

References Fclose(), FD_t, 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 892 of file header-py.c.

References _free(), FD_t, hdrObject_s::fileList, hdrObject_s::h, hdrObject, Header, HEADER_MAGIC_YES, headerAddEntry(), headerFree(), headerFreeData(), headerFreeIterator(), headerGetEntry(), headerInitIterator(), HeaderIterator, headerNextIterator(), headerRead(), headerRemoveEntry(), int_32, hdrObject_s::linkList, hdrObject_s::md5list, and pyrpmError.

Referenced by rpmMergeHeadersFromFD().

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

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

References Fclose(), FD_t, fdDup(), and rpmMergeHeaders().

PyObject* rpmReadHeaders (  FD_t  fd  ) 
 

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

References compressFilelist(), FD_t, hdr_Wrap(), hdrObject, Header, HEADER_MAGIC_YES, headerFree(), headerRead(), providePackageNVR(), and pyrpmError.

Referenced by rpmHeaderFromFD(), and rpmHeaderFromFile().

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

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

References hdr_compare(), hdr_Type, and hdrObject.


Variable Documentation

char hdr_doc[] [static]
 

Initial value:

""

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


Generated on Wed Jun 21 17:46:27 2006 for rpm by doxygen 1.3.5