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

PYTHON.


Files

file  hash.c
file  hash.h
file  rpmmodule.c
file  upgrade.c
file  upgrade.h

Data Structures

struct  FDlist_t
struct  hdrObject_s
struct  hdrObject_s
class  header
 A python header object represents an RPM package header. More...

class  rpmdb
 A python rpmdb object represents an RPM database. More...

class  rpmdbMatchIterator
 A python rpmdbMatchIterator object represents the result of an RPM database query. More...

struct  rpmdbMIObject_s
struct  rpmdbObject_s
struct  rpmdbObject_s
class  rpmtrans
 A python rpmtrans object represents an RPM transaction set. More...

struct  rpmtransObject_s
struct  rpmtransObject_s
struct  tsCallbackType

Module: rpm

typedef struct FDlist_t FDlist
PyObject* rpmtransCreate (PyObject *self, PyObject *args)
PyObject* doAddMacro (PyObject *self, PyObject *args)
PyObject* doDelMacro (PyObject *self, PyObject *args)
PyObject* archScore (PyObject *self, PyObject *args)
int psGetArchScore (Header h)
int pkgCompareVer (void *first, void *second)
void pkgSort (struct pkgSet *psp)
PyObject* findUpgradeSet (PyObject *self, PyObject *args)
PyObject* rpmHeaderFromPackage (PyObject *self, PyObject *args)
PyObject* hdrLoad (PyObject *self, PyObject *args)
PyObject* rpmInitDB (PyObject *self, PyObject *args)
rpmdbObjectrpmOpenDB (PyObject *self, PyObject *args)
PyObject* rebuildDB (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)
void errorcb (void)
PyObject* errorSetCallback (PyObject *self, PyObject *args)
PyObject* errorString (PyObject *self, PyObject *args)
PyObject* versionCompare (PyObject *self, PyObject *args)
PyObject* checkSig (PyObject *self, PyObject *args)
PyObject* getTsHeader (PyObject *self, PyObject *args)
int closeCallback (FILE *f)
void initrpm (void)
PyObject* rpmMergeHeadersFromFD (PyObject *self, PyObject *args)
PyObject* labelCompare (PyObject *self, PyObject *args)
PyObject* errorCB = NULL
PyObject * errorData = NULL
FDlistfdhead = NULL
FDlistfdtail = NULL
PyMethodDef rpmModuleMethods []

Class: header

PyObject* hdrKeyList (hdrObject *s, PyObject *args)
PyObject* hdrUnload (hdrObject *s, PyObject *args, PyObject *keywords)
PyObject* hdrVerifyFile (hdrObject *s, PyObject *args)
PyObject* hdrExpandFilelist (hdrObject *s, PyObject *args)
PyObject* hdrCompressFilelist (hdrObject *s, PyObject *args)
void mungeFilelist (Header h)
PyObject* hdrFullFilelist (hdrObject *s, PyObject *args)
PyObject* hdrGetAttr (hdrObject *s, char *name)
void hdrDealloc (hdrObject *s)
long tagNumFromPyObject (PyObject *item)
PyObject* hdrSubscript (hdrObject *s, PyObject *item)
struct PyMethodDef hdrMethods []
PyMappingMethods hdrAsMapping
PyTypeObject hdrType

Class: rpmdbMatchIterator

PyObject* rpmdbMINext (rpmdbMIObject *s, PyObject *args)
PyObject* rpmdbMIGetAttr (rpmdbObject *s, char *name)
void rpmdbMIDealloc (rpmdbMIObject *s)
struct PyMethodDef rpmdbMIMethods []
PyTypeObject rpmdbMIType

Class: rpmdb

PyObject* rpmdbFirst (rpmdbObject *s, PyObject *args)
PyObject* rpmdbNext (rpmdbObject *s, PyObject *args)
PyObject* handleDbResult (rpmdbMatchIterator mi)
PyObject* rpmdbByFile (rpmdbObject *s, PyObject *args)
PyObject* rpmdbByName (rpmdbObject *s, PyObject *args)
PyObject* rpmdbByProvides (rpmdbObject *s, PyObject *args)
rpmdbMIObjectpy_rpmdbInitIterator (rpmdbObject *s, PyObject *args)
PyObject* rpmdbGetAttr (rpmdbObject *s, char *name)
void rpmdbDealloc (rpmdbObject *s)
int rpmdbLength (rpmdbObject *s)
hdrObjectrpmdbSubscript (rpmdbObject *s, PyObject *key)
struct PyMethodDef rpmdbMethods []
PyMappingMethods rpmdbAsMapping
PyTypeObject rpmdbType

Class: rpmtrans

PyObject* rpmtransAdd (rpmtransObject *s, PyObject *args)
PyObject* rpmtransRemove (rpmtransObject *s, PyObject *args)
PyObject* rpmtransDepCheck (rpmtransObject *s, PyObject *args)
PyObject* rpmtransOrder (rpmtransObject *s, PyObject *args)
PyObject* py_rpmtransGetKeys (rpmtransObject *s, PyObject *args)
void* tsCallback (const void *hd, const rpmCallbackType what, const unsigned long amount, const unsigned long total, const void *pkgKey, rpmCallbackData data)
PyObject* rpmtransRun (rpmtransObject *s, PyObject *args)
PyObject* rpmtransGetAttr (rpmtransObject *o, char *name)
void rpmtransDealloc (PyObject *o)
int rpmtransSetAttr (rpmtransObject *o, char *name, PyObject *val)
Header transactionSetHeader = NULL
struct PyMethodDef rpmtransMethods []
PyTypeObject rpmtransType

Typedefs

typedef struct rpmdbObject_s rpmdbObject
typedef struct rpmdbMIObject_s rpmdbMIObject
typedef struct rpmtransObject_s rpmtransObject
typedef struct hdrObject_s hdrObject

Variables

PyObject* pyrpmError

Typedef Documentation

typedef struct FDlist_t FDlist
 

Definition at line 2179 of file rpmmodule.c.

typedef struct hdrObject_s hdrObject
 

Definition at line 45 of file rpmmodule.c.

typedef struct rpmdbMIObject_s rpmdbMIObject
 

Definition at line 37 of file rpmmodule.c.

typedef struct rpmdbObject_s rpmdbObject
 

Definition at line 33 of file rpmmodule.c.

typedef struct rpmtransObject_s rpmtransObject
 

Definition at line 41 of file rpmmodule.c.


Function Documentation

PyObject * archScore ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1584 of file rpmmodule.c.

PyObject * checkSig ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2144 of file rpmmodule.c.

int closeCallback ( FILE * f ) [static]
 

Definition at line 2200 of file rpmmodule.c.

PyObject * doAddMacro ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1556 of file rpmmodule.c.

PyObject * doDelMacro ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1570 of file rpmmodule.c.

PyObject * errorSetCallback ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2055 of file rpmmodule.c.

PyObject * errorString ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2097 of file rpmmodule.c.

void errorcb ( void ) [static]
 

Definition at line 2036 of file rpmmodule.c.

PyObject * findUpgradeSet ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1663 of file rpmmodule.c.

PyObject * getTsHeader ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2161 of file rpmmodule.c.

PyObject * handleDbResult ( rpmdbMatchIterator mi ) [static]
 

Definition at line 891 of file rpmmodule.c.

Referenced by rpmdbByFile(), rpmdbByName(), and rpmdbByProvides().

PyObject * hdrCompressFilelist ( hdrObject * s,
PyObject * args ) [static]
 

Definition at line 389 of file rpmmodule.c.

void hdrDealloc ( hdrObject * s ) [static]
 

Definition at line 449 of file rpmmodule.c.

PyObject * hdrExpandFilelist ( hdrObject * s,
PyObject * args ) [static]
 

Definition at line 380 of file rpmmodule.c.

PyObject * hdrFullFilelist ( hdrObject * s,
PyObject * args ) [static]
 

Definition at line 422 of file rpmmodule.c.

PyObject * hdrGetAttr ( hdrObject * s,
char * name ) [static]
 

Definition at line 443 of file rpmmodule.c.

PyObject * hdrKeyList ( hdrObject * s,
PyObject * args ) [static]
 

Definition at line 119 of file rpmmodule.c.

PyObject * hdrLoad ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1759 of file rpmmodule.c.

PyObject * hdrSubscript ( hdrObject * s,
PyObject * item ) [static]
 

Definition at line 478 of file rpmmodule.c.

PyObject * hdrUnload ( hdrObject * s,
PyObject * args,
PyObject * keywords ) [static]
 

Definition at line 152 of file rpmmodule.c.

PyObject * hdrVerifyFile ( hdrObject * s,
PyObject * args ) [static]
 

Definition at line 186 of file rpmmodule.c.

void initrpm ( void )
 

Definition at line 2308 of file rpmmodule.c.

PyObject * labelCompare ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2113 of file rpmmodule.c.

void mungeFilelist ( Header h ) [static]
 

Definition at line 399 of file rpmmodule.c.

Referenced by hdrFullFilelist().

int pkgCompareVer ( void * first,
void * second ) [static]
 

Definition at line 1611 of file rpmmodule.c.

void pkgSort ( struct pkgSet * psp ) [static]
 

Definition at line 1633 of file rpmmodule.c.

Referenced by findUpgradeSet().

int psGetArchScore ( Header h ) [static]
 

Definition at line 1598 of file rpmmodule.c.

Referenced by pkgCompareVer().

rpmdbMIObject * py_rpmdbInitIterator ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 941 of file rpmmodule.c.

PyObject * py_rpmtransGetKeys ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1318 of file rpmmodule.c.

PyObject * rebuildDB ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1851 of file rpmmodule.c.

PyObject * rpmHeaderFromFD ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1903 of file rpmmodule.c.

PyObject * rpmHeaderFromFile ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1919 of file rpmmodule.c.

PyObject * rpmHeaderFromPackage ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1714 of file rpmmodule.c.

PyObject * rpmInitDB ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1795 of file rpmmodule.c.

int rpmMergeHeaders ( PyObject * list,
FD_t fd,
int matchTag ) [static]
 

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 1942 of file rpmmodule.c.

Referenced by rpmMergeHeadersFromFD().

PyObject * rpmMergeHeadersFromFD ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2003 of file rpmmodule.c.

rpmdbObject * rpmOpenDB ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1819 of file rpmmodule.c.

PyObject * rpmReadHeaders ( FD_t fd ) [static]
 

Definition at line 1861 of file rpmmodule.c.

Referenced by rpmHeaderFromFD(), and rpmHeaderFromFile().

PyObject * rpmdbByFile ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 910 of file rpmmodule.c.

PyObject * rpmdbByName ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 920 of file rpmmodule.c.

PyObject * rpmdbByProvides ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 930 of file rpmmodule.c.

void rpmdbDealloc ( rpmdbObject * s ) [static]
 

Definition at line 990 of file rpmmodule.c.

PyObject * rpmdbFirst ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 830 of file rpmmodule.c.

PyObject * rpmdbGetAttr ( rpmdbObject * s,
char * name ) [static]
 

Definition at line 984 of file rpmmodule.c.

int rpmdbLength ( rpmdbObject * s ) [static]
 

Definition at line 1004 of file rpmmodule.c.

void rpmdbMIDealloc ( rpmdbMIObject * s ) [static]
 

Definition at line 732 of file rpmmodule.c.

PyObject * rpmdbMIGetAttr ( rpmdbObject * s,
char * name ) [static]
 

Definition at line 726 of file rpmmodule.c.

PyObject * rpmdbMINext ( rpmdbMIObject * s,
PyObject * args ) [static]
 

Definition at line 695 of file rpmmodule.c.

PyObject * rpmdbNext ( rpmdbObject * s,
PyObject * args ) [static]
 

Definition at line 869 of file rpmmodule.c.

hdrObject * rpmdbSubscript ( rpmdbObject * s,
PyObject * key ) [static]
 

Definition at line 1023 of file rpmmodule.c.

PyObject * rpmtransAdd ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1204 of file rpmmodule.c.

PyObject * rpmtransCreate ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 1532 of file rpmmodule.c.

void rpmtransDealloc ( PyObject * o ) [static]
 

Definition at line 1467 of file rpmmodule.c.

PyObject * rpmtransDepCheck ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1269 of file rpmmodule.c.

PyObject * rpmtransGetAttr ( rpmtransObject * o,
char * name ) [static]
 

Definition at line 1461 of file rpmmodule.c.

PyObject * rpmtransOrder ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1307 of file rpmmodule.c.

PyObject * rpmtransRemove ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1238 of file rpmmodule.c.

PyObject * rpmtransRun ( rpmtransObject * s,
PyObject * args ) [static]
 

Definition at line 1401 of file rpmmodule.c.

int rpmtransSetAttr ( rpmtransObject * o,
char * name,
PyObject * val ) [static]
 

Definition at line 1483 of file rpmmodule.c.

long tagNumFromPyObject ( PyObject * item ) [static]
 

Definition at line 460 of file rpmmodule.c.

Referenced by hdrSubscript(), and py_rpmdbInitIterator().

void * tsCallback ( const void * hd,
const rpmCallbackType what,
const unsigned long amount,
const unsigned long total,
const void * pkgKey,
rpmCallbackData data ) [static]
 

Definition at line 1356 of file rpmmodule.c.

PyObject * versionCompare ( PyObject * self,
PyObject * args ) [static]
 

Definition at line 2103 of file rpmmodule.c.


Variable Documentation

PyObject * errorCB = NULL [static]
 

Definition at line 2032 of file rpmmodule.c.

PyObject * errorData = NULL [static]
 

Definition at line 2032 of file rpmmodule.c.

FDlist * fdhead = NULL [static]
 

Definition at line 2192 of file rpmmodule.c.

FDlist * fdtail = NULL [static]
 

Definition at line 2196 of file rpmmodule.c.

PyMappingMethods hdrAsMapping [static]
 

Initial value:

 {
        (inquiry) 0,                    
        (binaryfunc) hdrSubscript,      
        (objobjargproc)0,               
}

Definition at line 636 of file rpmmodule.c.

struct PyMethodDef hdrMethods [static]
 

Initial value:

 {
        {"keys",        (PyCFunction) hdrKeyList,       1 },
        {"unload",      (PyCFunction) hdrUnload,        METH_VARARGS|METH_KEYWORDS },
        {"verifyFile",  (PyCFunction) hdrVerifyFile,    1 },
        {"expandFilelist",      (PyCFunction) hdrExpandFilelist,        1 },
        {"compressFilelist",    (PyCFunction) hdrCompressFilelist,      1 },
        {"fullFilelist",        (PyCFunction) hdrFullFilelist,  1 },
        {NULL,          NULL}           
}

Definition at line 431 of file rpmmodule.c.

PyTypeObject hdrType [static]
 

Initial value:

 {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              
        "header",                       
        sizeof(hdrObject),              
        0,                              
        (destructor) hdrDealloc,        
        0,                              
        (getattrfunc) hdrGetAttr,       
        0,                              
        0,                              
        0,                              
        0,                              
        0,                              
        &hdrAsMapping,                  
}

Definition at line 644 of file rpmmodule.c.

PyObject * pyrpmError [static]
 

Definition at line 49 of file rpmmodule.c.

PyMethodDef rpmModuleMethods [static]
 

Initial value:

 {
    { "TransactionSet", (PyCFunction) rpmtransCreate, METH_VARARGS, NULL },
    { "addMacro", (PyCFunction) doAddMacro, METH_VARARGS, NULL },
    { "delMacro", (PyCFunction) doDelMacro, METH_VARARGS, NULL },
    { "archscore", (PyCFunction) archScore, METH_VARARGS, NULL },
    { "findUpgradeSet", (PyCFunction) findUpgradeSet, METH_VARARGS, NULL },
    { "headerFromPackage", (PyCFunction) rpmHeaderFromPackage, METH_VARARGS, NULL },
    { "headerLoad", (PyCFunction) hdrLoad, METH_VARARGS, NULL },
    { "initdb", (PyCFunction) rpmInitDB, METH_VARARGS, NULL },
    { "opendb", (PyCFunction) rpmOpenDB, METH_VARARGS, NULL },
    { "rebuilddb", (PyCFunction) rebuildDB, METH_VARARGS, NULL },
    { "readHeaderListFromFD", (PyCFunction) rpmHeaderFromFD, METH_VARARGS, NULL },
    { "readHeaderListFromFile", (PyCFunction) rpmHeaderFromFile, METH_VARARGS, NULL },
    { "errorSetCallback", (PyCFunction) errorSetCallback, METH_VARARGS, NULL },
    { "errorString", (PyCFunction) errorString, METH_VARARGS, NULL },
    { "versionCompare", (PyCFunction) versionCompare, METH_VARARGS, NULL },
    { "labelCompare", (PyCFunction) labelCompare, METH_VARARGS, NULL },
    { "checksig", (PyCFunction) checkSig, METH_VARARGS, NULL },
    { "getTransactionCallbackHeader", (PyCFunction) getTsHeader, METH_VARARGS, NULL },

    { NULL }
} 

Definition at line 2283 of file rpmmodule.c.

PyMappingMethods rpmdbAsMapping [static]
 

Initial value:

 {
        (inquiry) rpmdbLength,          
        (binaryfunc) rpmdbSubscript,    
        (objobjargproc)0,               
}

Definition at line 1057 of file rpmmodule.c.

struct PyMethodDef rpmdbMIMethods [static]
 

Initial value:

 {
        {"next",            (PyCFunction) rpmdbMINext,  1 },
        {NULL,          NULL}           
}

Definition at line 719 of file rpmmodule.c.

PyTypeObject rpmdbMIType [static]
 

Initial value:

 {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              
        "rpmdbMatchIterator",           
        sizeof(rpmdbMIObject),  
        0,                              
        (destructor) rpmdbMIDealloc,    
        0,                              
        (getattrfunc) rpmdbMIGetAttr,   
        0,                              
        0,                              
        0,                              
        0,                              
        0,                              
        0,                              
}

Definition at line 742 of file rpmmodule.c.

struct PyMethodDef rpmdbMethods [static]
 

Initial value:

 {
        {"firstkey",        (PyCFunction) rpmdbFirst,   1 },
        {"nextkey",         (PyCFunction) rpmdbNext,    1 },
        {"findbyfile",      (PyCFunction) rpmdbByFile, 1 },
        {"findbyname",      (PyCFunction) rpmdbByName, 1 },
        {"findbyprovides",  (PyCFunction) rpmdbByProvides, 1 },
        {"match",           (PyCFunction) py_rpmdbInitIterator, 1 },
        {NULL,          NULL}           
}

Definition at line 972 of file rpmmodule.c.

PyTypeObject rpmdbType [static]
 

Initial value:

 {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              
        "rpmdb",                        
        sizeof(rpmdbObject),            
        0,                              
        (destructor) rpmdbDealloc,      
        0,                              
        (getattrfunc) rpmdbGetAttr,     
        0,                              
        0,                              
        0,                              
        0,                              
        0,                              

        &rpmdbAsMapping,                



}

Definition at line 1066 of file rpmmodule.c.

struct PyMethodDef rpmtransMethods [static]
 

Initial value:

 {
        {"add",         (PyCFunction) rpmtransAdd,      1 },
        {"remove",      (PyCFunction) rpmtransRemove,   1 },
        {"depcheck",    (PyCFunction) rpmtransDepCheck, 1 },
        {"order",       (PyCFunction) rpmtransOrder,    1 },
        {"getKeys",     (PyCFunction) py_rpmtransGetKeys, 1 },
        {"run",         (PyCFunction) rpmtransRun, 1 },
        {NULL,          NULL}           
}

Definition at line 1449 of file rpmmodule.c.

PyTypeObject rpmtransType [static]
 

Initial value:

 {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              
        "rpmtrans",                     
        sizeof(rpmtransObject),         
        0,                              
        (destructor) rpmtransDealloc,   
        0,                              
        (getattrfunc) rpmtransGetAttr,  
        (setattrfunc) rpmtransSetAttr,  
        0,                              
        0,                              
        0,                              
        0,                              
        0,                              
}

Definition at line 1506 of file rpmmodule.c.

Header transactionSetHeader = NULL [static]
 

Definition at line 1352 of file rpmmodule.c.


Generated at Thu Apr 19 15:29:50 2001 for rpm by doxygen1.2.6-20010408 written by Dimitri van Heesch, © 1997-2001