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

lib/rpmts.h File Reference

Structures and prototypes used for an "rpmts" transaction set. More...

#include "rpmps.h"
#include "rpmsw.h"
#include "rpmhash.h"
#include "rpmal.h"

Go to the source code of this file.

Defines

#define _RPMVSF_NODIGESTS
#define _RPMVSF_NOSIGNATURES
#define _RPMVSF_NOHEADER
#define _RPMVSF_NOPAYLOAD
#define rpmtsUnlink(_ts, _msg)   XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)
#define rpmtsLink(_ts, _msg)   XrpmtsLink(_ts, _msg, __FILE__, __LINE__)

Typedefs

typedef enum rpmVSFlags_e rpmVSFlags
 Bit(s) to control digest and signature verification.

typedef enum rpmtsOpX_e rpmtsOpX
 Indices for timestamps.


Enumerations

enum  rpmVSFlags_e {
  RPMVSF_DEFAULT = 0, RPMVSF_NOHDRCHK = (1 << 0), RPMVSF_NEEDPAYLOAD = (1 << 1), RPMVSF_NOSHA1HEADER = (1 << 8),
  RPMVSF_NOMD5HEADER = (1 << 9), RPMVSF_NODSAHEADER = (1 << 10), RPMVSF_NORSAHEADER = (1 << 11), RPMVSF_NOSHA1 = (1 << 16),
  RPMVSF_NOMD5 = (1 << 17), RPMVSF_NODSA = (1 << 18), RPMVSF_NORSA = (1 << 19)
}
 Bit(s) to control digest and signature verification. More...

enum  rpmtsOpX_e {
  RPMTS_OP_TOTAL = 0, RPMTS_OP_CHECK = 1, RPMTS_OP_ORDER = 2, RPMTS_OP_FINGERPRINT = 3,
  RPMTS_OP_REPACKAGE = 4, RPMTS_OP_INSTALL = 5, RPMTS_OP_ERASE = 6, RPMTS_OP_SCRIPTLETS = 7,
  RPMTS_OP_COMPRESS = 8, RPMTS_OP_UNCOMPRESS = 9, RPMTS_OP_DIGEST = 10, RPMTS_OP_SIGNATURE = 11,
  RPMTS_OP_DBADD = 12, RPMTS_OP_DBREMOVE = 13, RPMTS_OP_DBGET = 14, RPMTS_OP_DBPUT = 15,
  RPMTS_OP_DBDEL = 16, RPMTS_OP_MAX = 17
}
 Indices for timestamps. More...


Functions

int rpmtsCheck (rpmts ts)
int rpmtsOrder (rpmts ts)
int rpmtsRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
rpmts rpmtsUnlink (rpmts ts, const char *msg)
rpmts XrpmtsUnlink (rpmts ts, const char *msg, const char *fn, unsigned ln)
rpmts rpmtsLink (rpmts ts, const char *msg)
rpmts XrpmtsLink (rpmts ts, const char *msg, const char *fn, unsigned ln)
int rpmtsCloseDB (rpmts ts)
int rpmtsOpenDB (rpmts ts, int dbmode)
int rpmtsInitDB (rpmts ts, int dbmode)
int rpmtsRebuildDB (rpmts ts)
int rpmtsVerifyDB (rpmts ts)
rpmdbMatchIterator rpmtsInitIterator (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)
rpmRC rpmtsFindPubkey (rpmts ts)
 Retrieve pubkey from rpm database.

int rpmtsCloseSDB (rpmts ts)
int rpmtsOpenSDB (rpmts ts, int dbmode)
int rpmtsSolve (rpmts ts, rpmds ds, const void *data)
 Attempt to solve a needed dependency using the solve database.

int rpmtsAvailable (rpmts ts, const rpmds ds)
 Attempt to solve a needed dependency using memory resident tables.

int rpmtsSetSolveCallback (rpmts ts, int(*solve)(rpmts ts, rpmds ds, const void *data), const void *solveData)
 Set dependency solver callback.

rpmps rpmtsProblems (rpmts ts)
 Return current transaction set problems.

void rpmtsCleanDig (rpmts ts)
void rpmtsClean (rpmts ts)
void rpmtsEmpty (rpmts ts)
rpmts rpmtsFree (rpmts ts)
rpmVSFlags rpmtsVSFlags (rpmts ts)
rpmVSFlags rpmtsSetVSFlags (rpmts ts, rpmVSFlags vsflags)
int rpmtsUnorderedSuccessors (rpmts ts, int first)
const char * rpmtsRootDir (rpmts ts)
void rpmtsSetRootDir (rpmts ts, const char *rootDir)
const char * rpmtsCurrDir (rpmts ts)
void rpmtsSetCurrDir (rpmts ts, const char *currDir)
FD_t rpmtsScriptFd (rpmts ts)
void rpmtsSetScriptFd (rpmts ts, FD_t scriptFd)
int rpmtsChrootDone (rpmts ts)
int rpmtsSetChrootDone (rpmts ts, int chrootDone)
int_32 rpmtsGetTid (rpmts ts)
int_32 rpmtsSetTid (rpmts ts, int_32 tid)
int_32 rpmtsSigtag (const rpmts ts)
int_32 rpmtsSigtype (const rpmts ts)
const void * rpmtsSig (const rpmts ts)
int_32 rpmtsSiglen (const rpmts ts)
int rpmtsSetSig (rpmts ts, int_32 sigtag, int_32 sigtype, const void *sig, int_32 siglen)
pgpDig rpmtsDig (rpmts ts)
pgpDigParams rpmtsSignature (const rpmts ts)
pgpDigParams rpmtsPubkey (const rpmts ts)
rpmdb rpmtsGetRdb (rpmts ts)
int rpmtsInitDSI (const rpmts ts)
void rpmtsUpdateDSI (const rpmts ts, dev_t dev, uint_32 fileSize, uint_32 prevSize, uint_32 fixupSize, fileAction action)
void rpmtsCheckDSIProblems (const rpmts ts, const rpmte te)
void * rpmtsNotify (rpmts ts, rpmte te, rpmCallbackType what, unsigned long amount, unsigned long total)
 Perform transaction progress notify callback.

int rpmtsNElements (rpmts ts)
 Return number of (ordered) transaction set elements.

rpmte rpmtsElement (rpmts ts, int ix)
 Return (ordered) transaction set element.

rpmprobFilterFlags rpmtsFilterFlags (rpmts ts)
rpmtransFlags rpmtsFlags (rpmts ts)
rpmtransFlags rpmtsSetFlags (rpmts ts, rpmtransFlags transFlags)
Spec rpmtsSpec (rpmts ts)
Spec rpmtsSetSpec (rpmts ts, Spec spec)
rpmte rpmtsRelocateElement (rpmts ts)
rpmte rpmtsSetRelocateElement (rpmts ts, rpmte relocateElement)
uint_32 rpmtsColor (rpmts ts)
 Retrieve color bits of transaction set.

uint_32 rpmtsSetColor (rpmts ts, uint_32 color)
 Set color bits of transaction set.

rpmop rpmtsOp (rpmts ts, rpmtsOpX opx)
 Retrieve operation timestamp from a transaction set.

int rpmtsSetNotifyCallback (rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData)
rpmts rpmtsCreate (void)
int rpmtsAddInstallElement (rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation *relocs)
int rpmtsAddEraseElement (rpmts ts, Header h, int dboffset)
int rpmtsGetKeys (rpmts ts, fnpyKey **ep, int *nep)
char * hGetNEVR (Header h, const char **np)
 Return (malloc'd) header name-version-release string.

uint_32 hGetColor (Header h)
 Return header color.


Variables

int _rpmts_debug
int _rpmts_stats
int _fps_debug


Detailed Description

Structures and prototypes used for an "rpmts" transaction set.

Definition in file rpmts.h.


Define Documentation

#define _RPMVSF_NODIGESTS
 

Value:

Definition at line 41 of file rpmts.h.

Referenced by build(), initrpm(), main(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmGraph(), rpmInstall(), and rpmRollback().

#define _RPMVSF_NOHEADER
 

Value:

Definition at line 53 of file rpmts.h.

Referenced by initrpm().

#define _RPMVSF_NOPAYLOAD
 

Value:

Definition at line 59 of file rpmts.h.

Referenced by initrpm().

#define _RPMVSF_NOSIGNATURES
 

Value:

Definition at line 47 of file rpmts.h.

Referenced by build(), initrpm(), main(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmGraph(), rpmInstall(), and rpmRollback().

#define rpmtsLink _ts,
_msg   )     XrpmtsLink(_ts, _msg, __FILE__, __LINE__)
 

Definition at line 316 of file rpmts.h.

Referenced by mapInitIterator(), rpmInstallSourcePackage(), rpmpsmNew(), rpmtsCreate(), and XrpmtsiInit().

#define rpmtsUnlink _ts,
_msg   )     XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)
 

Definition at line 300 of file rpmts.h.

Referenced by rpmtsFree().


Typedef Documentation

typedef enum rpmtsOpX_e rpmtsOpX
 

Indices for timestamps.

Referenced by rpmtsOp().

typedef enum rpmVSFlags_e rpmVSFlags
 

Bit(s) to control digest and signature verification.

Referenced by build(), headerCheck(), main(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmGraph(), rpmInstall(), rpmInstallSource(), rpmReadPackageFile(), rpmts_SetVSFlags(), rpmtsRun(), rpmtsSetVSFlags(), and rpmtsVSFlags().


Enumeration Type Documentation

enum rpmtsOpX_e
 

Indices for timestamps.

Enumeration values:
RPMTS_OP_TOTAL 
RPMTS_OP_CHECK 
RPMTS_OP_ORDER 
RPMTS_OP_FINGERPRINT 
RPMTS_OP_REPACKAGE 
RPMTS_OP_INSTALL 
RPMTS_OP_ERASE 
RPMTS_OP_SCRIPTLETS 
RPMTS_OP_COMPRESS 
RPMTS_OP_UNCOMPRESS 
RPMTS_OP_DIGEST 
RPMTS_OP_SIGNATURE 
RPMTS_OP_DBADD 
RPMTS_OP_DBREMOVE 
RPMTS_OP_DBGET 
RPMTS_OP_DBPUT 
RPMTS_OP_DBDEL 
RPMTS_OP_MAX 

Definition at line 68 of file rpmts.h.

enum rpmVSFlags_e
 

Bit(s) to control digest and signature verification.

Enumeration values:
RPMVSF_DEFAULT 
RPMVSF_NOHDRCHK 
RPMVSF_NEEDPAYLOAD 
RPMVSF_NOSHA1HEADER 
RPMVSF_NOMD5HEADER 
RPMVSF_NODSAHEADER 
RPMVSF_NORSAHEADER 
RPMVSF_NOSHA1 
RPMVSF_NOMD5 
RPMVSF_NODSA 
RPMVSF_NORSA 

Definition at line 24 of file rpmts.h.


Function Documentation

uint_32 hGetColor Header  h  ) 
 

Return header color.

Parameters:
h header
Returns:
header color

Definition at line 88 of file rpmts.c.

References Header, HGE_t, int_32, RPMTAG_FILECOLORS, and uint_32.

Referenced by rpmtsAddInstallElement().

char* hGetNEVR Header  h,
const char **  np
 

Return (malloc'd) header name-version-release string.

Parameters:
h header
Return values:
np name tag value
Returns:
name-version-release string

Definition at line 69 of file rpmts.c.

References Header, headerNVR(), stpcpy(), and xcalloc().

Referenced by addTE(), checkPackageSet(), ensureOlder(), and handleInstInstalledFiles().

int rpmtsAvailable rpmts  ts,
const rpmds  ds
 

Attempt to solve a needed dependency using memory resident tables.

Deprecated:
This function will move from rpmlib to the python bindings.
Parameters:
ts transaction set
ds dependency set
Returns:
0 if resolved (and added to ts), 1 not found

Definition at line 634 of file rpmts.c.

References _free(), fnpyKey, rpmalAllSatisfiesDepend(), rpmds, rpmts, and xrealloc().

uint_32 rpmtsColor rpmts  ts  ) 
 

Retrieve color bits of transaction set.

Parameters:
ts transaction set
Returns:
color bits

Definition at line 1319 of file rpmts.c.

References rpmts, and uint_32.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmpsmStage(), rpmtsAddAvailableElement(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsRun(), and skipFiles().

rpmte rpmtsElement rpmts  ts,
int  ix
 

Return (ordered) transaction set element.

Parameters:
ts transaction set
ix transaction element index
Returns:
transaction element (or NULL)

Definition at line 1255 of file rpmts.c.

References rpmte, and rpmts.

Referenced by rpmInstallSourcePackage(), rpmtsiFi(), and rpmtsiNextElement().

rpmRC rpmtsFindPubkey rpmts  ts  ) 
 

Retrieve pubkey from rpm database.

Parameters:
ts rpm transaction
Returns:
RPMRC_OK on success, RPMRC_NOKEY if not found

Definition at line 305 of file rpmts.c.

References _free(), pgpDigParams_s::hash_algo, Header, headerFreeData(), headerGetEntry(), int_32, PGPARMOR_PUBKEY, pgpDig, pgpDigParams, pgpPrtPkts(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_RSA, pgpReadPkts(), pgpDigParams_s::pubkey_algo, rpmdbFreeIterator(), rpmdbGetIteratorFileNum(), rpmdbMatchIterator, rpmdbNextIterator(), rpmExpand(), RPMMESS_DEBUG, rpmMessage, rpmRC, RPMRC_NOKEY, RPMRC_OK, RPMTAG_PUBKEYS, rpmts, rpmtsDig(), rpmtsInitIterator(), rpmtsSig(), rpmtsSignature(), and pgpDigParams_s::signid.

Referenced by verifyGPGSignature(), and verifyPGPSignature().

int rpmtsNElements rpmts  ts  ) 
 

Return number of (ordered) transaction set elements.

Parameters:
ts transaction set
Returns:
no. of transaction set elements

Definition at line 1246 of file rpmts.c.

References rpmts.

Referenced by rpmGraph(), rpmtsiNextElement(), rpmtsRun(), and XrpmtsiInit().

void* rpmtsNotify rpmts  ts,
rpmte  te,
rpmCallbackType  what,
unsigned long  amount,
unsigned long  total
 

Perform transaction progress notify callback.

Parameters:
ts transaction set
te current transaction element
what type of call back
amount current value
total final value
Returns:
callback dependent pointer

Definition at line 1230 of file rpmts.c.

References rpmCallbackType, rpmte, rpmteKey(), rpmts, and TR_ADDED.

Referenced by fsmSetup(), fsmStage(), and rpmpsmStage().

rpmop rpmtsOp rpmts  ts,
rpmtsOpX  opx
 

Retrieve operation timestamp from a transaction set.

Parameters:
ts transaction set
opx operation timestamp index
Returns:
pointer to operation timestamp.

Definition at line 1334 of file rpmts.c.

References rpmop, rpmts, RPMTS_OP_MAX, and rpmtsOpX.

Referenced by fsmStage(), headerCheck(), psmWait(), rpmpsmStage(), rpmtsCheck(), rpmtsCloseDB(), rpmtsCloseSDB(), rpmtsCreate(), rpmtsOrder(), rpmtsPrintStats(), rpmtsRun(), verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), and verifySHA1Signature().

rpmps rpmtsProblems rpmts  ts  ) 
 

Return current transaction set problems.

Parameters:
ts transaction set
Returns:
current problem set (or NULL)

Definition at line 677 of file rpmts.c.

References rpmps, rpmpsLink, and rpmts.

Referenced by checkSpec(), ensureOlder(), handleInstInstalledFiles(), handleOverlappedFiles(), relocateFileList(), rpmErase(), rpmGraph(), rpmInstall(), rpmRollback(), rpmts_Check(), rpmts_Run(), rpmtsCheckDSIProblems(), rpmtsRun(), and verifyDependencies().

uint_32 rpmtsSetColor rpmts  ts,
uint_32  color
 

Set color bits of transaction set.

Parameters:
ts transaction set
color new color bits
Returns:
previous color bits

Definition at line 1324 of file rpmts.c.

References rpmts, and uint_32.

Referenced by rpmts_SetColor().

int rpmtsSetSolveCallback rpmts  ts,
int(*  solve)(rpmts ts, rpmds ds, const void *data),
const void *  solveData
 

Set dependency solver callback.

Parameters:
ts transaction set
(*solve) dependency solver callback
solveData dependency solver callback data (opaque)
Returns:
0 on success

Referenced by rpmts_Check().

int rpmtsSolve rpmts  ts,
rpmds  ds,
const void *  data
 

Attempt to solve a needed dependency using the solve database.

Parameters:
ts transaction set
ds dependency set
data opaque data associated with callback
Returns:
-1 retry, 0 ignore, 1 not found

Definition at line 480 of file rpmts.c.

References _, _free(), Fclose(), FD_t, Ferror(), fnpyKey, Fopen(), Fstrerror(), Header, headerFree(), headerGetEntry(), headerLink(), headerSprintf(), int_32, rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbMatchIterator, rpmdbNextIterator(), rpmds, rpmdsAnyMatchesDep(), rpmdsN(), rpmdsTagN(), RPMERR_OPEN, RPMERR_QFMT, rpmError, rpmExpand(), rpmHeaderFormats, RPMMESS_DEBUG, rpmMessage, rpmRC, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), rpmTag, RPMTAG_BASENAMES, RPMTAG_BUILDTIME, RPMTAG_NAME, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, rpmTagTable, RPMTRANS_FLAG_ADDINDEPS, rpmts, rpmtsAddInstallElement(), rpmtsOpenSDB(), sugcmp(), and xrealloc().

Referenced by rpmInstall(), rpmts_Check(), and rpmtsCreate().

rpmts XrpmtsLink rpmts  ts,
const char *  msg,
const char *  fn,
unsigned  ln
 

Todo:
Remove debugging entry from the ABI.

Definition at line 121 of file rpmts.c.

References _rpmts_debug, and rpmts.

rpmts XrpmtsUnlink rpmts  ts,
const char *  msg,
const char *  fn,
unsigned  ln
 

Todo:
Remove debugging entry from the ABI.

Definition at line 111 of file rpmts.c.

References _rpmts_debug, and rpmts.


Variable Documentation

int _fps_debug
 

Definition at line 18 of file rpmts.h.

int _rpmts_debug
 

Definition at line 14 of file rpmts.h.

int _rpmts_stats
 

Definition at line 16 of file rpmts.h.


Generated on Fri Jul 15 10:22:10 2005 for rpm by doxygen 1.3.5