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

Transaction Set API.


Files

file  depends.c
file  psm.c
 Package state machine to handle a package from a transaction set.

file  rpmte.h
 Structures used for an "rpmte" transaction element.

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

file  rpmvercmp.c
file  transaction.c

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 rpmtsLink (rpmts ts, const char *msg)
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)
int rpmtsCloseSDB (rpmts ts)
int rpmtsOpenSDB (rpmts ts, int dbmode)
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)
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)
int rpmtsSetNotifyCallback (rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData)
rpmts rpmtsCreate (void)
int rpmtsAddInstallElement (rpmts ts, Header h, fnpyKey key, int upgrade, rpmRelocation *relocs)
int rpmtsAddEraseElement (rpmts ts, Header h, int dboffset)
int rpmtsGetKeys (const rpmts ts, fnpyKey **ep, int *nep)

Function Documentation

int rpmtsAddEraseElement rpmts    ts,
Header    h,
int    dboffset
 

Add package to be erased to transaction set.

Parameters:
ts  transaction set
h  header
dboffset  rpm database instance
Returns:
0 on success

Definition at line 322 of file depends.c.

References removePackage(), RPMAL_NOMATCH, and rpmts.

Referenced by rpmErase(), rpmRollback(), and rpmts_AddErase().

int rpmtsAddInstallElement rpmts    ts,
Header    h,
const fnpyKey    key,
int    upgrade,
rpmRelocation   relocs
 

Add package to be installed to transaction set.

The transaction set is checked for duplicate package names. If found, the package with the "newest" EVR will be replaced.

Parameters:
ts  transaction set
h  header
key  package retrieval key (e.g. file name)
upgrade  is package being upgraded?
relocs  package file relocations
Returns:
0 on success, 1 on I/O error, 2 needs capabilities

Definition at line 127 of file depends.c.

References _, alKey, fnpyKey, headerIsEntry(), HGE_t, hGetColor(), removePackage(), RPMAL_NOMATCH, rpmalAdd(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbNextIterator(), rpmdbPruneIterator(), rpmds, rpmdsAnyMatchesDep(), rpmdsColor(), rpmdsCompare(), rpmdsDNEVR(), rpmdsEVR(), rpmdsFree(), rpmdsInit(), rpmdsLink, rpmdsN(), rpmdsNext(), rpmdsThis(), RPMMESS_WARNING, rpmMessage, RPMSENSE_EQUAL, RPMSENSE_LESS, RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_NAME, RPMTAG_OBSOLETENAME, RPMTAG_OS, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, RPMTAG_SOURCEPACKAGE, rpmte, rpmteA(), rpmteAddedKey(), rpmteDS(), rpmteFI(), rpmteFree(), rpmteN(), rpmteNew(), rpmteO(), rpmteSetAddedKey(), rpmteType(), rpmts, rpmtsColor(), rpmtsGetRdb(), rpmtsi, rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsInitIterator(), rpmtsOpenDB(), rpmVersionCompare(), TR_ADDED, TR_REMOVED, uint_32, and xrealloc().

Referenced by checkSpec(), rpmGraph(), rpmInstall(), rpmInstallSourcePackage(), rpmRollback(), rpmts_AddInstall(), rpmtsSolve(), and verifyDependencies().

int rpmtsCheck rpmts    ts
 

Check that all dependencies can be resolved.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 1591 of file depends.c.

References checkDependentConflicts(), checkDependentPackages(), checkPackageDeps(), rpmalMakeIndex(), rpmdbCloseDBI(), rpmdbFreeIterator(), RPMDBI_DEPENDS, rpmds, rpmdsInit(), rpmdsN(), rpmdsNext(), rpmfi, rpmfiFN(), rpmfiInit(), rpmfiNext(), RPMMESS_DEBUG, rpmMessage, rpmpsCreate(), rpmpsFree(), RPMTAG_BASENAMES, RPMTAG_CONFLICTNAME, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, rpmte, rpmteA(), rpmteColor(), rpmteDS(), rpmteFI(), rpmteN(), rpmteNEVR(), rpmteO(), rpmts, RPMTS_OP_CHECK, rpmtsCloseDB(), rpmtsColor(), rpmtsGetRdb(), rpmtsi, rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsOp(), rpmtsOpenDB(), TR_ADDED, TR_REMOVED, and uint_32.

Referenced by checkSpec(), rpmErase(), rpmGraph(), rpmInstall(), rpmRollback(), rpmts_Check(), and verifyDependencies().

void rpmtsCheckDSIProblems const rpmts    ts,
const rpmte    te
 

Check a transaction element for disk space problems.

Parameters:
ts  transaction set
te  current transaction element

Definition at line 1180 of file rpmts.c.

References rpmfiFC(), RPMPROB_DISKNODES, RPMPROB_DISKSPACE, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, rpmte, rpmteFI(), rpmteKey(), rpmteNEVR(), rpmts, and rpmtsProblems().

Referenced by rpmtsRun().

int rpmtsChrootDone rpmts    ts
 

Get chrootDone flag, i.e. has chroot(2) been performed?

Parameters:
ts  transaction set
Returns:
chrootDone flag

Definition at line 926 of file rpmts.c.

References rpmts.

Referenced by rpmpsmStage(), rpmtsRun(), and runScript().

void rpmtsClean rpmts    ts
 

Free memory needed only for dependency checks and ordering.

Parameters:
ts  transaction set

Definition at line 680 of file rpmts.c.

References _free(), rpmalFree(), rpmpsFree(), rpmte, rpmteCleanDS(), rpmts, rpmtsCleanDig(), rpmtsi, rpmtsiFree, rpmtsiInit, and rpmtsiNext().

Referenced by checkSpec(), rpmcliImportPubkeys(), rpmErase(), rpmInstall(), rpmInstallSourcePackage(), rpmRollback(), rpmts_Clean(), rpmtsEmpty(), and rpmtsOrder().

void rpmtsCleanDig rpmts    ts
 

Free signature verification data.

Parameters:
ts  transaction set

Definition at line 674 of file rpmts.c.

References headerFreeData(), pgpFreeDig(), and rpmts.

Referenced by headerCheck(), rpmReadPackageFile(), rpmtsClean(), and rpmVerifySignatures().

int rpmtsCloseDB rpmts    ts
 

Close the database used by the transaction.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 131 of file rpmts.c.

References rpmdbClose(), and rpmts.

Referenced by ftsCacheUpdate(), rpmts_CloseDB(), rpmts_InitDB(), rpmtsCheck(), rpmtsFree(), and rpmtsOpenDB().

int rpmtsCloseSDB rpmts    ts
 

Close the database used by the transaction to solve dependencies.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 409 of file rpmts.c.

References rpmdbClose(), and rpmts.

Referenced by rpmtsFree().

rpmts rpmtsCreate void   
 

Create an empty transaction set.

Returns:
new transaction set

Definition at line 1372 of file rpmts.c.

References rpmExpandNumeric(), rpmts, RPMTS_OP_TOTAL, rpmtsLink, rpmtsOp(), rpmtsSolve(), and xcalloc().

Referenced by cpio_doio(), main(), readRPM(), rpmts_Create(), and rpmts_init().

const char* rpmtsCurrDir rpmts    ts
 

Get transaction currDir, i.e. current directory before chroot(2).

Parameters:
ts  transaction set
Returns:
transaction currDir

Definition at line 882 of file rpmts.c.

References rpmts.

Referenced by rpmpsmStage(), and rpmtsRun().

pgpDig rpmtsDig rpmts    ts
 

Get OpenPGP packet parameters, i.e. signature/pubkey constants.

Parameters:
ts  transaction set
Returns:
signature/pubkey constants.

Definition at line 1014 of file rpmts.c.

References pgpNewDig, and rpmts.

Referenced by headerCheck(), rpmReadPackageFile(), rpmtsFindPubkey(), rpmtsPubkey(), rpmtsSignature(), rpmtsStashKeyid(), rpmVerifySignature(), rpmVerifySignatures(), verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), verifySHA1Signature(), and verifySizeSignature().

void rpmtsEmpty rpmts    ts
 

Re-create an empty transaction set.

Parameters:
ts  transaction set

Definition at line 704 of file rpmts.c.

References rpmte, rpmteFree(), rpmts, rpmtsClean(), rpmtsi, rpmtsiFree, rpmtsiInit, and rpmtsiNext().

Referenced by rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmInstall(), rpmQueryVerify(), rpmRollback(), rpmtsFree(), and verifyDependencies().

rpmprobFilterFlags rpmtsFilterFlags rpmts    ts
 

Get problem ignore bit mask, i.e. bits to filter encountered problems.

Parameters:
ts  transaction set
Returns:
ignore bit mask

Definition at line 1254 of file rpmts.c.

References rpmprobFilterFlags, and rpmts.

Referenced by handleOverlappedFiles(), relocateFileList(), rpmtsInitDSI(), and rpmtsRun().

rpmtransFlags rpmtsFlags rpmts    ts
 

Get transaction flags, i.e. bits that control rpmtsRun().

Parameters:
ts  transaction set
Returns:
transaction flags

Definition at line 1259 of file rpmts.c.

References rpmtransFlags, and rpmts.

Referenced by fsmMapAttrs(), fsmStage(), handleInstInstalledFiles(), rpmErase(), rpmInstall(), rpmpsmStage(), rpmtsOrder(), rpmtsRun(), skipFiles(), unsatisfiedDepend(), and XrpmtsiInit().

rpmts rpmtsFree rpmts    ts
 

Destroy transaction set, closing the database as well.

Parameters:
ts  transaction set
Returns:
NULL always

Definition at line 768 of file rpmts.c.

References _free(), fdFree, rpmalFree(), rpmts, rpmtsCloseDB(), rpmtsCloseSDB(), rpmtsEmpty(), rpmtsPrintStats(), and rpmtsUnlink.

Referenced by cpio_doio(), main(), mapFreeIterator(), readRPM(), rpmInstallSourcePackage(), rpmpsmFree(), rpmts_dealloc(), rpmts_free(), and XrpmtsiFree().

int rpmtsGetKeys rpmts    ts,
fnpyKey **    ep,
int *    nep
 

Retrieve keys from ordered transaction set.

Todo:
Removed packages have no keys, returned as interleaved NULL pointers.
Parameters:
ts  transaction set
Return values:
ep  address of returned element array pointer (or NULL)
nep  address of no. of returned elements (or NULL)
Returns:
0 always

Definition at line 1342 of file rpmts.c.

References fnpyKey, rpmte, rpmteKey(), rpmteType(), rpmts, rpmtsi, rpmtsiFree, rpmtsiInit, rpmtsiNext(), TR_ADDED, TR_REMOVED, and xmalloc().

Referenced by rpmts_GetKeys().

rpmdb rpmtsGetRdb rpmts    ts
 

Get transaction set database handle.

Parameters:
ts  transaction set
Returns:
transaction database handle

Definition at line 1043 of file rpmts.c.

References rpmts.

Referenced by checkDependentConflicts(), ftsCacheUpdate(), handleOneTrigger(), rpmcliImportPubkey(), rpmpsmStage(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsRun(), runTriggers(), and unsatisfiedDepend().

int_32 rpmtsGetTid rpmts    ts
 

Get transaction id, i.e. transaction time stamp.

Parameters:
ts  transaction set
Returns:
chrootDone flag

Definition at line 947 of file rpmts.c.

References int_32, and rpmts.

Referenced by fsmSetup(), ftsCacheUpdate(), rpmcliImportPubkey(), and rpmpsmStage().

int rpmtsInitDB rpmts    ts,
int    dbmode
 

Initialize the database used by the transaction.

Deprecated:
An explicit rpmdbInit() is almost never needed.
Parameters:
ts  transaction set
dbmode  O_RDONLY or O_RDWR
Returns:
0 on success

Definition at line 165 of file rpmts.c.

References rpmdbInit(), and rpmts.

Referenced by main(), and rpmts_InitDB().

int rpmtsInitDSI const rpmts    ts
 

Initialize disk space info for each and every mounted file systems.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 1054 of file rpmts.c.

References _, _free(), rpmGetFilesystemList(), RPMMESS_DEBUG, rpmMessage, RPMPROB_FILTER_DISKSPACE, rpmts, rpmtsFilterFlags(), and xcalloc().

Referenced by rpmtsRun().

rpmdbMatchIterator rpmtsInitIterator const rpmts    ts,
rpmTag    rpmtag,
const void *    keyp,
size_t    keylen
 

Return transaction database iterator.

Parameters:
ts  transaction set
rpmtag  rpm tag
keyp  key data (NULL for sequential access)
keylen  key data length (0 will use strlen(keyp))
Returns:
NULL on failure

Definition at line 214 of file rpmts.c.

References _, alloca(), isArch(), RPMDBI_LABEL, rpmdbInitIterator(), rpmdbSetHdrChk(), rpmdbSetIteratorRE(), RPMERR_QFMT, rpmError, RPMMIRE_DEFAULT, rpmTag, RPMTAG_ARCH, rpmts, rpmtsOpenDB(), RPMVSF_NOHDRCHK, and xisdigit().

Referenced by checkDependentConflicts(), checkDependentPackages(), ftsCacheUpdate(), handleInstInstalledFiles(), handleRmvdInstalledFiles(), IDTXload(), markReplacedFiles(), rpmErase(), rpmInstall(), rpmpsmStage(), rpmQueryVerify(), rpmts_AddErase(), rpmts_Match(), rpmtsAddInstallElement(), rpmtsFindPubkey(), rpmtsRun(), runImmedTriggers(), runTriggers(), and unsatisfiedDepend().

rpmts rpmtsLink rpmts    ts,
const char *    msg
 

Reference a transaction set instance.

Parameters:
ts  transaction set
msg 
Returns:
new transaction set reference

int rpmtsOpenDB rpmts    ts,
int    dbmode
 

Open the database used by the transaction.

Parameters:
ts  transaction set
dbmode  O_RDONLY or O_RDWR
Returns:
0 on success

Definition at line 142 of file rpmts.c.

References _, _free(), rpmdbOpen(), rpmGetPath(), RPMMESS_ERROR, rpmMessage, rpmts, and rpmtsCloseDB().

Referenced by ftsCacheUpdate(), rpmcliImportPubkey(), rpmts_Match(), rpmts_OpenDB(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsInitIterator(), and rpmtsRun().

int rpmtsOpenSDB rpmts    ts,
int    dbmode
 

Open the database used by the transaction to solve dependencies.

Parameters:
ts  transaction set
dbmode  O_RDONLY or O_RDWR
Returns:
0 on success

Definition at line 420 of file rpmts.c.

References _, _free(), addMacro(), delMacro(), RMIL_DEFAULT, rpmdbOpen(), rpmExpandNumeric(), rpmGetPath(), RPMMESS_WARNING, rpmMessage, and rpmts.

Referenced by rpmtsSolve().

int rpmtsOrder rpmts    ts
 

Determine package order in a transaction set according to dependencies.

Order packages, returning error if circular dependencies cannot be eliminated by removing Requires's from the loop(s). Only dependencies from added or removed packages are used to determine ordering using a topological sort (Knuth vol. 1, p. 262). Use rpmtsCheck() to verify that all dependencies can be resolved.

The final order ends up as installed packages followed by removed packages, with packages removed for upgrades immediately following the new package to be installed.

Parameters:
ts  transaction set
Returns:
no. of (added) packages that could not be ordered

Definition at line 1150 of file depends.c.

References _, _free(), addQ(), addRelation(), alKey, alloca(), freeBadDeps(), int_32, isErasePreReq, isInstallPreReq, isLegacyPreReq, markLoop(), orderListIndexCmp(), orderListIndex_s::orIndex, orderListIndex_s::pkgKey, RPMAL_NOMATCH, rpmalMakeIndex(), rpmds, rpmdsFlags(), rpmdsInit(), rpmdsNext(), RPMMESS_DEBUG, RPMMESS_ERROR, rpmMessage, RPMTAG_REQUIRENAME, rpmte, rpmteAddedKey(), rpmteDegree(), rpmteDependsOnKey(), rpmteDepth(), rpmteDS(), rpmteFreeTSI(), rpmteNEVR(), rpmteNewTSI(), rpmteNpreds(), rpmtePkgFileSize(), rpmteSetDegree(), rpmteSetDepth(), rpmteSetNpreds(), rpmteSetParent(), rpmteSetTree(), rpmteTree(), rpmteTSI(), rpmteType(), RPMTRANS_FLAG_ANACONDA, rpmts, RPMTS_OP_ORDER, rpmtsClean(), rpmtsFlags(), rpmtsi, rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsiOc(), rpmtsOp(), rpmtsUnorderedSuccessors(), stpcpy(), TR_ADDED, TR_REMOVED, tsortInfo, xcalloc(), and zapRelation().

Referenced by rpmGraph(), rpmInstall(), rpmRollback(), and rpmts_Order().

pgpDigParams rpmtsPubkey const rpmts    ts
 

Get OpenPGP pubkey constants.

Parameters:
ts  transaction set
Returns:
pubkey constants.

Definition at line 1034 of file rpmts.c.

References pgpDig_s::pubkey, rpmts, and rpmtsDig().

int rpmtsRebuildDB rpmts    ts
 

Rebuild the database used by the transaction.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 170 of file rpmts.c.

References rpmdbRebuild(), rpmts, and RPMVSF_NOHDRCHK.

Referenced by main(), and rpmts_RebuildDB().

rpmte rpmtsRelocateElement rpmts    ts
 

Get current relocate transaction element.

Parameters:
ts  transaction set
Returns:
current relocate transaction element

Definition at line 1290 of file rpmts.c.

References rpmte, and rpmts.

Referenced by relocateFileList(), and rpmfiNew().

const char* rpmtsRootDir rpmts    ts
 

Get transaction rootDir, i.e. path to chroot(2).

Parameters:
ts  transaction set
Returns:
transaction rootDir

Definition at line 849 of file rpmts.c.

References rpmts.

Referenced by rpmInstall(), rpmInstallSourcePackage(), rpmpsmStage(), rpmtsRun(), rpmVerifyFile(), and runScript().

int rpmtsRun rpmts    ts,
rpmps    okProbs,
rpmprobFilterFlags    ignoreSet
 

Process all package elements in a transaction set.

Parameters:
ts  transaction set
okProbs  previously known problems (or NULL)
ignoreSet  bits to filter problem types
Returns:
0 on success, -1 on error, >0 with newProbs set

Definition at line 934 of file transaction.c.

References _, _free(), _noTransScripts, _noTransTriggers, alKey, archOkay(), CPIO_ALL_HARDLINKS, CPIO_MAP_ABSOLUTE, CPIO_MAP_ADDDOT, currentDirectory(), dbiFreeIndexSet(), dbiIndexRecordFileNumber(), dbiIndexRecordOffset(), dbiIndexSetCount(), ensureOlder(), rpmpsm_s::fi, fileAction, fpCacheCreate(), fpCacheFree(), fpLookupList(), handleInstInstalledFiles(), handleOverlappedFiles(), handleRmvdInstalledFiles(), headerFree(), htAddEntry(), htCreate(), htFree(), int_32, NOTIFY, osOkay(), PSM_PKGERASE, PSM_PKGINSTALL, PSM_PKGSAVE, RPMCALLBACK_INST_CLOSE_FILE, RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_REPACKAGE_PROGRESS, RPMCALLBACK_REPACKAGE_START, RPMCALLBACK_REPACKAGE_STOP, RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_STOP, rpmdbCheckSignals(), rpmdbFindFpList(), rpmdbFreeIterator(), rpmdbNextIterator(), rpmdbSetIteratorRE(), rpmdbSync(), rpmfi, rpmfiFC(), rpmfiFree(), rpmfiInit(), rpmfiLink, rpmfiNew(), rpmfiNext(), RPMMESS_DEBUG, rpmMessage, RPMMIRE_DEFAULT, RPMPROB_BADARCH, RPMPROB_BADOS, RPMPROB_FILTER_IGNOREARCH, RPMPROB_FILTER_IGNOREOS, RPMPROB_FILTER_OLDPACKAGE, RPMPROB_FILTER_REPLACEOLDFILES, RPMPROB_FILTER_REPLACEPKG, RPMPROB_PKG_INSTALLED, rpmprobFilterFlags, rpmpsAppend(), rpmpsCreate(), rpmpsFree(), rpmpsmFree(), rpmpsmNew(), rpmpsmStage(), rpmpsTrim(), rpmRC, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_EPOCH, RPMTAG_NAME, RPMTAG_OS, RPMTAG_RELEASE, RPMTAG_VERSION, rpmte, rpmteA(), rpmteAddedKey(), rpmteColor(), rpmteDBOffset(), rpmteDependsOnKey(), rpmteE(), rpmteFd(), rpmteKey(), rpmteN(), rpmteNEVR(), rpmteO(), rpmteR(), rpmteType(), rpmteV(), RPMTRANS_FLAG_BUILD_PROBS, RPMTRANS_FLAG_DIRSTASH, RPMTRANS_FLAG_JUSTDB, RPMTRANS_FLAG_NOSCRIPTS, RPMTRANS_FLAG_NOTRIGGERS, RPMTRANS_FLAG_REPACKAGE, RPMTRANS_FLAG_TEST, rpmts, RPMTS_OP_ERASE, RPMTS_OP_FINGERPRINT, RPMTS_OP_INSTALL, RPMTS_OP_REPACKAGE, rpmtsCheckDSIProblems(), rpmtsChrootDone(), rpmtsColor(), rpmtsCurrDir(), rpmtsFilterFlags(), rpmtsFlags(), rpmtsGetRdb(), rpmtsi, rpmtsiFi(), rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsInitDSI(), rpmtsInitIterator(), rpmtsiOc(), rpmtsNElements(), rpmtsOp(), rpmtsOpenDB(), rpmtsProblems(), rpmtsRootDir(), rpmtsSetChrootDone(), rpmtsSetCurrDir(), rpmtsSetFlags(), rpmtsSetRelocateElement(), rpmtsSetTid(), rpmtsSetVSFlags(), rpmtsUnorderedSuccessors(), rpmtsVSFlags(), RPMVSF_NEEDPAYLOAD, rpmVSFlags, sharedCmp(), skipFiles(), TR_ADDED, TR_REMOVED, uint_32, rpmpsm_s::unorderedSuccessor, xcalloc(), XFA_SKIPPING, and xmalloc().

Referenced by rpmErase(), rpmInstall(), rpmRollback(), and rpmts_Run().

FD_t rpmtsScriptFd rpmts    ts
 

Get transaction script file handle, i.e. stdout/stderr on scriptlet execution

Parameters:
ts  transaction set
Returns:
transaction script file handle

Definition at line 900 of file rpmts.c.

References rpmts.

Referenced by runScript().

int rpmtsSetChrootDone rpmts    ts,
int    chrootDone
 

Set chrootDone flag, i.e. has chroot(2) been performed?

Parameters:
ts  transaction set
chrootDone  new chrootDone flag
Returns:
previous chrootDone flag

Definition at line 935 of file rpmts.c.

References rpmts.

Referenced by rpmpsmStage(), and rpmtsRun().

void rpmtsSetCurrDir rpmts    ts,
const char *    currDir
 

Set transaction currDir, i.e. current directory before chroot(2).

Parameters:
ts  transaction set
currDir  new transaction currDir (or NULL)

Definition at line 891 of file rpmts.c.

References _free(), rpmts, and xstrdup().

Referenced by rpmtsRun().

rpmtransFlags rpmtsSetFlags rpmts    ts,
rpmtransFlags    transFlags
 

Set transaction flags, i.e. bits that control rpmtsRun().

Parameters:
ts  transaction set
transFlags  new transaction flags
Returns:
previous transaction flags

Definition at line 1264 of file rpmts.c.

References rpmtransFlags, and rpmts.

Referenced by rpmErase(), rpmInstall(), rpmRollback(), rpmts_Rollback(), rpmts_SetFlags(), and rpmtsRun().

int rpmtsSetNotifyCallback rpmts    ts,
rpmCallbackFunction    notify,
rpmCallbackData    notifyData
 

Set transaction notify callback function and argument.

Warning:
This call must be made before rpmtsRun() for install/upgrade/freshen to function correctly.
Parameters:
ts  transaction set
notify  progress callback
notifyData  progress callback private data
Returns:
0 on success

Definition at line 1332 of file rpmts.c.

References rpmCallbackData, rpmCallbackFunction, and rpmts.

Referenced by rpmErase(), rpmInstall(), rpmRollback(), and rpmts_Run().

rpmte rpmtsSetRelocateElement rpmts    ts,
rpmte    relocateElement
 

Set current relocate transaction element.

Parameters:
ts  transaction set
relocateElement  new relocate transaction element
Returns:
previous relocate transaction element

Definition at line 1297 of file rpmts.c.

References rpmte, and rpmts.

Referenced by addTE(), and rpmtsRun().

void rpmtsSetRootDir rpmts    ts,
const char *    rootDir
 

Set transaction rootDir, i.e. path to chroot(2).

Parameters:
ts  transaction set
rootDir  new transaction rootDir (or NULL)

Definition at line 854 of file rpmts.c.

References _free(), alloca(), rpmts, stpcpy(), and xstrdup().

Referenced by main(), rpmts_Create(), and rpmts_init().

void rpmtsSetScriptFd rpmts    ts,
FD_t    scriptFd
 

Set transaction script file handle, i.e. stdout/stderr on scriptlet execution

Parameters:
ts  transaction set
scriptFd  new script file handle (or NULL)

Definition at line 911 of file rpmts.c.

References fdFree, fdLink, and rpmts.

Referenced by rpmts_setattr(), and rpmVerifyScript().

int rpmtsSetSig rpmts    ts,
int_32    sigtag,
int_32    sigtype,
const void *    sig,
int_32    siglen
 

Set signature tag info, i.e. from header.

Parameters:
ts  transaction set
sigtag  signature tag
sigtype  signature tag type
sig  signature tag data
siglen  signature tag data length
Returns:
0 always

Definition at line 998 of file rpmts.c.

References headerFreeData(), int_32, and rpmts.

Referenced by headerCheck(), rpmReadPackageFile(), and rpmVerifySignatures().

Spec rpmtsSetSpec rpmts    ts,
Spec    spec
 

Set a spec control structure in transaction set.

Parameters:
ts  transaction set
spec  new spec control structure
Returns:
previous spec control structure

Definition at line 1281 of file rpmts.c.

References rpmts.

Referenced by buildForTarget(), parseSpec(), and rpmspecQuery().

int_32 rpmtsSetTid rpmts    ts,
int_32    tid
 

Set transaction id, i.e. transaction time stamp.

Parameters:
ts  transaction set
tid  new transaction id
Returns:
previous transaction id

Definition at line 956 of file rpmts.c.

References int_32, and rpmts.

Referenced by main(), and rpmtsRun().

rpmVSFlags rpmtsSetVSFlags rpmts    ts,
rpmVSFlags    vsflags
 

Set verify signatures flag(s).

Parameters:
ts  transaction set
vsflags  new verify signatures flags
Returns:
previous value

Definition at line 828 of file rpmts.c.

References rpmts, and rpmVSFlags.

Referenced by build(), main(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmGraph(), rpmInstall(), rpmRollback(), rpmts_Create(), rpmts_init(), rpmts_SetVSFlags(), and rpmtsRun().

const void* rpmtsSig const rpmts    ts
 

Get signature tag data, i.e. from header.

Parameters:
ts  transaction set
Returns:
signature tag data

Definition at line 982 of file rpmts.c.

References rpmts.

Referenced by rpmtsFindPubkey(), rpmtsStashKeyid(), rpmVerifySignature(), verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), verifySHA1Signature(), and verifySizeSignature().

int_32 rpmtsSiglen const rpmts    ts
 

Get signature tag data length, i.e. no. of bytes of data.

Parameters:
ts  transaction set
Returns:
signature tag data length

Definition at line 990 of file rpmts.c.

References int_32, and rpmts.

Referenced by rpmVerifySignature(), verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), and verifySHA1Signature().

pgpDigParams rpmtsSignature const rpmts    ts
 

Get OpenPGP signature constants.

Parameters:
ts  transaction set
Returns:
signature constants.

Definition at line 1025 of file rpmts.c.

References rpmts, rpmtsDig(), and pgpDig_s::signature.

Referenced by rpmtsFindPubkey(), rpmtsStashKeyid(), rpmVerifySignatures(), verifyGPGSignature(), and verifyPGPSignature().

int_32 rpmtsSigtag const rpmts    ts
 

Get signature tag.

Parameters:
ts  transaction set
Returns:
signature tag

Definition at line 966 of file rpmts.c.

References int_32, and rpmts.

Referenced by rpmVerifySignature(), verifyGPGSignature(), and verifyPGPSignature().

int_32 rpmtsSigtype const rpmts    ts
 

Get signature tag type.

Parameters:
ts  transaction set
Returns:
signature tag type

Definition at line 974 of file rpmts.c.

References int_32, and rpmts.

Spec rpmtsSpec rpmts    ts
 

Get spec control structure from transaction set.

Parameters:
ts  transaction set
Returns:
spec control structure

Definition at line 1274 of file rpmts.c.

References rpmts.

rpmts rpmtsUnlink rpmts    ts,
const char *    msg
 

Unreference a transaction instance.

Parameters:
ts  transaction set
msg 
Returns:
NULL always

int rpmtsUnorderedSuccessors rpmts    ts,
int    first
 

Set index of 1st element of successors.

Parameters:
ts  transaction set
first  new index of 1st element of successors
Returns:
previous value

Definition at line 838 of file rpmts.c.

References rpmts.

Referenced by rpmtsOrder(), and rpmtsRun().

void rpmtsUpdateDSI const rpmts    ts,
dev_t    dev,
uint_32    fileSize,
uint_32    prevSize,
uint_32    fixupSize,
fileAction    action
 

Update disk space info for a file.

Parameters:
ts  transaction set
dev  mount point device
fileSize  file size
prevSize  previous file size (if upgrading)
fixupSize  size difference (if
action  file disposition

Definition at line 1130 of file rpmts.c.

References FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, FA_SAVE, fileAction, rpmts, and uint_32.

Referenced by handleOverlappedFiles().

int rpmtsVerifyDB rpmts    ts
 

Verify the database used by the transaction.

Parameters:
ts  transaction set
Returns:
0 on success

Definition at line 180 of file rpmts.c.

References rpmdbVerify(), and rpmts.

Referenced by main(), and rpmts_VerifyDB().

rpmVSFlags rpmtsVSFlags rpmts    ts
 

Get verify signatures flag(s).

Parameters:
ts  transaction set
Returns:
verify signatures flags

Definition at line 820 of file rpmts.c.

References rpmts, and rpmVSFlags.

Referenced by headerCheck(), rpmpsmStage(), rpmReadPackageFile(), and rpmtsRun().


Generated on Sun Oct 26 13:02:10 2003 for rpm by doxygen1.2.18