rpm
5.4.10
|
![]() |
Files | |
file | depends.c |
file | psm.c |
Package state machine to handle a package from a transaction set. | |
file | rpmlib.h |
In Memoriam: Steve Taylor stayl was here, now he's not. or@r edhat .com | |
file | rpmte.h |
Structures used for an "rpmte" transaction element. | |
file | rpmts.h |
Structures and prototypes used for an "rpmts" transaction set. | |
file | transaction.c |
Typedefs | |
typedef struct rpmpsm_s * | rpmpsm |
Package state machine data. | |
typedef int | alNum |
An added/available package retrieval index. | |
typedef pgpVSFlags | rpmVSFlags |
Bit(s) to control digest and signature verification. | |
typedef enum rpmdepFlags_e | rpmdepFlags |
Bit(s) to control rpmtsCheck() and rpmtsOrder() operation. | |
typedef enum rpmtransFlags_e | rpmtransFlags |
Bit(s) to control rpmtsRun() operation. | |
typedef enum rpmtsOpX_e | rpmtsOpX |
Indices for timestamps. | |
typedef enum rpmTSType_e | rpmTSType |
Transaction Types. | |
typedef enum tsStage_e | tsmStage |
typedef struct rpmts_s * | rpmts |
The RPM Transaction Set. | |
typedef void * | alKey |
An added/available package retrieval key. |
Functions | |
rpmRC | rpmtsRollback (rpmts rbts, rpmprobFilterFlags ignoreSet, int running, rpmte rbte) |
Rollback a failed transaction. | |
rpmts | rpmtsUnlink (rpmts ts, const char *msg) |
Unreference a transaction instance. | |
rpmts | rpmtsLink (rpmts ts, const char *msg) |
Reference a transaction set instance. | |
int | rpmtsCloseDB (rpmts ts) |
Close the database used by the transaction. | |
int | rpmtsOpenDB (rpmts ts, int dbmode) |
Open the database used by the transaction. | |
static int | rpmtsInitDB (rpmts ts, int dbmode) |
Initialize the database used by the transaction. | |
int | rpmtsRebuildDB (rpmts ts) |
Rebuild the database used by the transaction. | |
static int | rpmtsVerifyDB (rpmts ts) |
Verify the database used by the transaction. | |
rpmmi | rpmtsInitIterator (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen) |
Return transaction database iterator. | |
rpmRC | rpmtsFindPubkey (rpmts ts, void *_dig) |
Retrieve pubkey from rpm database. | |
int | rpmtsCloseSDB (rpmts ts) |
Close the database used by the transaction to solve dependencies. | |
int | rpmtsOpenSDB (rpmts ts, int dbmode) |
Open the database used by the transaction to solve dependencies. | |
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. | |
rpmTSType | rpmtsType (rpmts ts) |
Return the type of a transaction. | |
void | rpmtsSetType (rpmts ts, rpmTSType type) |
Set transaction type. | |
rpmuint32_t | rpmtsARBGoal (rpmts ts) |
Return the autorollback goal. | |
void | rpmtsSetARBGoal (rpmts ts, rpmuint32_t goal) |
Set autorollback goal. | |
rpmps | rpmtsProblems (rpmts ts) |
Return current transaction set problems. | |
void | rpmtsCleanDig (rpmts ts) |
Free signature verification data. | |
void | rpmtsClean (rpmts ts) |
Free memory needed only for dependency checks and ordering. | |
void | rpmtsEmpty (rpmts ts) |
Re-create an empty transaction set. | |
rpmts | rpmtsFree (rpmts ts) |
Destroy transaction set, closing the database as well. | |
void * | rpmtsGetKeyring (rpmts ts, int autoload) |
Get transaction keyring. | |
int | rpmtsSetKeyring (rpmts ts, void *_keyring) |
Set transaction keyring. | |
rpmVSFlags | rpmtsVSFlags (rpmts ts) |
Get verify signatures flag(s). | |
rpmVSFlags | rpmtsSetVSFlags (rpmts ts, rpmVSFlags vsflags) |
Set verify signatures flag(s). | |
int | rpmtsUnorderedSuccessors (rpmts ts, int first) |
Set index of 1st element of successors. | |
const char * | rpmtsRootDir (rpmts ts) |
Get transaction rootDir, i.e. | |
void | rpmtsSetRootDir (rpmts ts, const char *rootDir) |
Set transaction rootDir, i.e. | |
const char * | rpmtsCurrDir (rpmts ts) |
Get transaction currDir, i.e. | |
void | rpmtsSetCurrDir (rpmts ts, const char *currDir) |
Set transaction currDir, i.e. | |
int | rpmtsSELinuxEnabled (rpmts ts) |
Get selinuxEnabled flag, i.e. | |
int | rpmtsChrootDone (rpmts ts) |
Get chrootDone flag, i.e. | |
int | rpmtsSetChrootDone (rpmts ts, int chrootDone) |
Set chrootDone flag, i.e. | |
rpmuint32_t | rpmtsGetTid (rpmts ts) |
Get transaction id, i.e. | |
rpmuint32_t | rpmtsSetTid (rpmts ts, rpmuint32_t tid) |
Set transaction id, i.e. | |
pgpDig | rpmtsDig (rpmts ts) |
Get OpenPGP packet parameters, i.e. | |
pgpDigParams | rpmtsPubkey (const rpmts ts) |
Return OpenPGP pubkey constants. | |
rpmdb | rpmtsGetRdb (rpmts ts) |
Get transaction set database handle. | |
rpmPRCO | rpmtsPRCO (rpmts ts) |
Get transaction set dependencies. | |
int | rpmtsInitDSI (const rpmts ts) |
Initialize disk space info for each and every mounted file systems. | |
void | rpmtsUpdateDSI (const rpmts ts, dev_t dev, rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize, int _action) |
Update disk space info for a file. | |
void | rpmtsCheckDSIProblems (const rpmts ts, const rpmte te) |
Check a transaction element for disk space problems. | |
void * | rpmtsNotify (rpmts ts, rpmte te, rpmCallbackType what, rpmuint64_t amount, rpmuint64_t 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) |
Get problem ignore bit mask, i.e. | |
rpmtransFlags | rpmtsFlags (rpmts ts) |
Get transaction flags, i.e. | |
rpmtransFlags | rpmtsSetFlags (rpmts ts, rpmtransFlags transFlags) |
Set transaction flags, i.e. | |
rpmdepFlags | rpmtsDFlags (rpmts ts) |
Get dependency flags, i.e. | |
rpmdepFlags | rpmtsSetDFlags (rpmts ts, rpmdepFlags depFlags) |
Set dependency flags, i.e. | |
Spec | rpmtsSpec (rpmts ts) |
Get spec control structure from transaction set. | |
Spec | rpmtsSetSpec (rpmts ts, Spec spec) |
Set a spec control structure in transaction set. | |
rpmte | rpmtsRelocateElement (rpmts ts) |
Get current relocate transaction element. | |
rpmte | rpmtsSetRelocateElement (rpmts ts, rpmte relocateElement) |
Set current relocate transaction element. | |
tsmStage | rpmtsGoal (rpmts ts) |
Retrieve goal of transaction set. | |
tsmStage | rpmtsSetGoal (rpmts ts, tsmStage goal) |
Set goal of transaction set. | |
int | rpmtsDBMode (rpmts ts) |
Retrieve dbmode of transaction set. | |
int | rpmtsSetDBMode (rpmts ts, int dbmode) |
Set dbmode of transaction set. | |
rpmuint32_t | rpmtsColor (rpmts ts) |
Retrieve color bits of transaction set. | |
rpmuint32_t | rpmtsPrefColor (rpmts ts) |
Retrieve preferred file color. | |
rpmuint32_t | rpmtsSetColor (rpmts ts, rpmuint32_t 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) |
Set transaction notify callback function and argument. | |
rpmts | rpmtsCreate (void) |
Create an empty transaction set. | |
int | rpmtsAddInstallElement (rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation relocs) |
Add package to be installed to transaction set. | |
int | rpmtsAddEraseElement (rpmts ts, Header h, uint32_t hdrNum) |
Add package to be erased to transaction set. |
Variables | |
int(* | rpmtsCheck )(rpmts ts) |
Perform dependency resolution on the transaction set. | |
int(* | rpmtsOrder )(rpmts ts) |
Determine package order in a transaction set according to dependencies. | |
int(* | rpmtsRun )(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) |
Process all package elements in a transaction set. |
typedef void* alKey |
An added/available package retrieval key.
Definition at line 19 of file rpmtypes.h.
typedef int alNum |
typedef enum rpmdepFlags_e rpmdepFlags |
Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.
typedef enum rpmtransFlags_e rpmtransFlags |
Bit(s) to control rpmtsRun() operation.
typedef struct rpmts_s* rpmts |
The RPM Transaction Set.
Transaction sets are inherently unordered! RPM may reorder transaction sets to reduce errors. In general, installs/upgrades are done before strict removals, and prerequisite ordering is done on installs/upgrades.
Definition at line 14 of file rpmtypes.h.
typedef enum rpmtsOpX_e rpmtsOpX |
Indices for timestamps.
typedef enum rpmTSType_e rpmTSType |
Transaction Types.
typedef pgpVSFlags rpmVSFlags |
enum rpmdepFlags_e |
Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.
enum rpmtransFlags_e |
Bit(s) to control rpmtsRun() operation.
enum rpmtsOpX_e |
Indices for timestamps.
enum rpmTSType_e |
enum tsStage_e |
Add package to be erased to transaction set.
ts | transaction set |
h | header |
hdrNum | rpm database instance |
Definition at line 832 of file depends.c.
References removePackage(), RPMAL_NOMATCH, and rpmtsEraseDebuginfo().
Referenced by findErases(), rpmcliEraseElement(), rpmErase(), rpmgiNext(), rpmts_AddErase(), and verifyDependencies().
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.
ts | transaction set |
h | header |
key | package retrieval key (e.g. file name) |
upgrade | is package being upgraded? |
relocs | package file relocations |
Definition at line 545 of file depends.c.
References _, _free(), alloca(), chkSuffix(), headerGet(), headerIsEntry(), hGetColor(), nplatpat, _HE_s::p, platform, platpat, rpmDataType_u::ptr, RPMAL_NOMATCH, rpmalAdd(), rpmcliPackagesTotal, RPMDEPS_FLAG_NOOBSOLETES, RPMDEPS_FLAG_NOUPGRADE, rpmdsCompare(), rpmdsDNEVR(), rpmdsFree(), rpmdsThis(), rpmExpand(), rpmExpandNumeric(), rpmfiFC(), rpmIsVerbose, rpmlog(), RPMLOG_WARNING, rpmPlatformScore(), RPMPROB_BADPLATFORM, rpmProblemString(), rpmpsAppend(), rpmpsFree(), rpmpsGetProblem(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_NAME, RPMTAG_NVRA, RPMTAG_OS, RPMTAG_PLATFORM, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, RPMTAG_SOURCERPM, rpmteA(), rpmteAddedKey(), rpmteDS(), rpmteFI(), rpmteFree(), rpmteIsSource(), rpmteKey(), rpmteN(), rpmteNew(), rpmteO(), rpmteSetAddedKey(), rpmteSetHeader(), rpmteType(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsColor(), rpmtsDBMode(), rpmtsDFlags(), rpmtsEraseDebuginfo(), rpmtsGetRdb(), rpmtsiFree(), rpmtsiInit(), rpmtsiNext(), rpmtsOpenDB(), rpmtsProblems(), rpmDataType_u::str, _HE_s::tag, TR_ADDED, TR_REMOVED, and xrealloc.
Referenced by rpmcliInstall(), rpmgiNext(), rpmInstallSourcePackage(), rpmRollback(), rpmts_AddInstall(), rpmtsSolve(), and verifyDependencies().
rpmuint32_t rpmtsARBGoal | ( | rpmts | ts | ) |
Return the autorollback goal.
ts | transaction set |
Definition at line 879 of file rpmts.c.
Referenced by rpmtsRollback().
Attempt to solve a needed dependency using memory resident tables.
ts | transaction set |
ds | dependency set |
Definition at line 543 of file rpmts.c.
References _free(), rpmalAllSatisfiesDepend(), and xrealloc.
Check a transaction element for disk space problems.
ts | transaction set |
te | current transaction element |
Definition at line 1230 of file rpmts.c.
References rpmfiFC(), RPMPROB_DISKNODES, RPMPROB_DISKSPACE, RPMPROB_RDONLY, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, rpmteFI(), rpmteKey(), rpmteNEVR(), rpmtsProblems(), and ST_RDONLY.
Referenced by rpmtsPrepare().
int rpmtsChrootDone | ( | rpmts | ts | ) |
Get chrootDone flag, i.e.
has chroot(2) been performed?
ts | transaction set |
Definition at line 1005 of file rpmts.c.
Referenced by rpmpsmStage(), rpmtsPrepare(), and runScript().
void rpmtsClean | ( | rpmts | ts | ) |
Free memory needed only for dependency checks and ordering.
ts | transaction set |
Definition at line 596 of file rpmts.c.
References _free(), rpmalFree(), rpmpsFree(), rpmteCleanDS(), rpmtsCleanDig(), rpmtsiFree(), rpmtsiInit(), and rpmtsiNext().
Referenced by rpmcliImportPubkeys(), rpmcliInstall(), rpmErase(), rpmInstallSourcePackage(), rpmRollback(), rpmts_Clean(), and rpmtsEmpty().
void rpmtsCleanDig | ( | rpmts | ts | ) |
Free signature verification data.
ts | transaction set |
Definition at line 457 of file pkgio.c.
References pgpDigFree(), pgpStatsAccumulator(), rpmswAdd(), RPMTS_OP_DIGEST, RPMTS_OP_SIGNATURE, and rpmtsOp().
Referenced by rpmnsProbeSignature(), rpmReadPackageFile(), rpmtsClean(), rpmVerifySignatures(), and showVerifyPackage().
int rpmtsCloseDB | ( | rpmts | ts | ) |
Close the database used by the transaction.
ts | transaction set |
Definition at line 101 of file rpmts.c.
References rpmdbClose(), rpmswAdd(), RPMTS_OP_DBDEL, RPMTS_OP_DBGET, RPMTS_OP_DBPUT, and rpmtsOp().
Referenced by _rpmtsCheck(), ftsCacheUpdate(), rpmts_CloseDB(), rpmts_InitDB(), rpmtsFini(), rpmtsOpenDB(), and rpmtsRebuildDB().
int rpmtsCloseSDB | ( | rpmts | ts | ) |
Close the database used by the transaction to solve dependencies.
ts | transaction set |
Definition at line 222 of file rpmts.c.
References rpmdbClose(), rpmswAdd(), RPMTS_OP_DBDEL, RPMTS_OP_DBGET, RPMTS_OP_DBPUT, and rpmtsOp().
Referenced by rpmtsFini().
rpmuint32_t rpmtsColor | ( | rpmts | ts | ) |
Retrieve color bits of transaction set.
ts | transaction set |
Definition at line 1438 of file rpmts.c.
Referenced by _rpmtsCheck(), checkPackageSet(), handleInstInstalledFile(), handleOverlappedFiles(), populateInstallHeader(), rpmpsmStage(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), and rpmtsSkipFiles().
rpmts rpmtsCreate | ( | void | ) |
Create an empty transaction set.
Definition at line 1468 of file rpmts.c.
References rpmExpandNumeric(), rpmswEnter(), rpmsxEnabled(), RPMTRANS_TYPE_NORMAL, RPMTS_OP_TOTAL, rpmtsGetPool(), rpmtsLink(), rpmtsOp(), rpmtsSolve(), TSM_UNKNOWN, and xcalloc().
Referenced by cpio_doio(), main(), and rpmts_new().
const char* rpmtsCurrDir | ( | rpmts | ts | ) |
Get transaction currDir, i.e.
current directory before chroot(2).
ts | transaction set |
Definition at line 951 of file rpmts.c.
Referenced by rpmpsmStage(), and rpmtsPrepare().
int rpmtsDBMode | ( | rpmts | ts | ) |
Retrieve dbmode of transaction set.
ts | transaction set |
Definition at line 1423 of file rpmts.c.
Referenced by _rpmtsCheck(), rpmts_OpenDB(), and rpmtsAddInstallElement().
rpmdepFlags rpmtsDFlags | ( | rpmts | ts | ) |
Get dependency flags, i.e.
bits that control rpmtsCheck() and rpmtsOrder().
ts | transaction set |
Definition at line 1361 of file rpmts.c.
Referenced by _rpmtsCheck(), checkPackageSet(), rpmgiNext(), rpmtsAddInstallElement(), rpmtsRollback(), and unsatisfiedDepend().
Get OpenPGP packet parameters, i.e.
signature/pubkey constants.
ts | transaction set |
Definition at line 442 of file pkgio.c.
References pgpDigNew(), pgpSetFindPubkey(), rpmtsFindPubkey(), and RPMVSF_DEFAULT.
Referenced by rpmnsProbeSignature(), rpmReadPackageFile(), rpmtsFindPubkey(), rpmtsPubkey(), rpmVerifySignatures(), and showVerifyPackage().
Return (ordered) transaction set element.
ts | transaction set |
ix | transaction element index |
Definition at line 1315 of file rpmts.c.
Referenced by rpmInstallSourcePackage(), rpmtsiFi(), and rpmtsiNextElement().
void rpmtsEmpty | ( | rpmts | ts | ) |
Re-create an empty transaction set.
ts | transaction set |
Definition at line 623 of file rpmts.c.
References rpmteFree(), rpmtsClean(), rpmtsiFree(), rpmtsiInit(), and rpmtsiNext().
Referenced by rpmcliArgIter(), rpmcliInstall(), rpmcliVerify(), rpmErase(), rpmRollback(), rpmtsFini(), rpmtsRollback(), and verifyDependencies().
rpmprobFilterFlags rpmtsFilterFlags | ( | rpmts | ts | ) |
Get problem ignore bit mask, i.e.
bits to filter encountered problems.
ts | transaction set |
Definition at line 1327 of file rpmts.c.
Referenced by handleInstInstalledFile(), handleOverlappedFiles(), relocateFileList(), rpmtsInitDSI(), and rpmtsSanityCheck().
Retrieve pubkey from rpm database.
ts | rpm transaction |
_dig | container (NULL uses rpmtsDig(ts) instead). |
Definition at line 162 of file pkgio.c.
References _, _free(), alloca(), rpmDataType_u::argv, _HE_s::c, headerGet(), _HE_s::p, PGPARMOR_PUBKEY, pgpGetPubkey(), pgpGetSignature(), pgpGrab(), pgpGrabPkts(), pgpHexStr(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_RSA, pgpPubkeyFingerprint(), pgpReadPkts(), rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, rpmdbOpen(), rpmExpand(), rpmGetPath(), rpmiobNew(), rpmkuFindPubkey(), rpmkuStorePubkey(), rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, rpmmiFree(), rpmmiInit(), rpmmiInstance(), rpmmiNext(), RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOSIG, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, RPMTAG_PUBKEYS, rpmtsDig(), rpmtsGetRdb(), _HE_s::t, _HE_s::tag, xmalloc, and xstrdup().
Referenced by rpmtsDig().
rpmtransFlags rpmtsFlags | ( | rpmts | ts | ) |
Get transaction flags, i.e.
bits that control rpmtsRun().
ts | transaction set |
Definition at line 1332 of file rpmts.c.
References RPMTRANS_FLAG_NOCONTEXTS, and rpmtsSELinuxEnabled().
Referenced by _rpmtsCheck(), _rpmtsRun(), fsmSetup(), handleInstInstalledFile(), iosmSetup(), rpmpsmStage(), rpmtsFinish(), rpmtsProcess(), rpmtsRepackage(), rpmtsRollback(), rpmtsSetup(), and rpmtsSkipFiles().
Destroy transaction set, closing the database as well.
ts | transaction set |
Referenced by cpio_doio(), fsmTeardown(), iosmTeardown(), main(), mapFreeIterator(), rpmgiFini(), rpmpsmFini(), rpmts_dealloc(), rpmts_free(), and rpmtsiFini().
void* rpmtsGetKeyring | ( | rpmts | ts, |
int | autoload | ||
) |
Get transaction set database handle.
ts | transaction set |
Definition at line 151 of file pkgio.c.
Referenced by _rpmtsCheck(), _rpmtsRun(), checkDependentConflicts(), checkDependentPackages(), extractRegular(), fsmStage(), ftsCacheUpdate(), handleOneTrigger(), rpmcliImportPubkey(), rpmdbTriggerGlobs(), rpmgiNext(), rpmpsmStage(), rpmts_dealloc(), rpmts_free(), rpmts_Match(), rpmts_new(), rpmtsAddInstallElement(), rpmtsFindBaseNamesInDB(), rpmtsFindPubkey(), rpmtsLoadNVRA(), rpmtsPrepare(), rpmtsProcess(), rpmtsRebuildDB(), rpmtsRollback(), rpmtsSanityCheck(), rpmtsSetKeyring(), runImmedTriggers(), runScript(), runTriggers(), and unsatisfiedDepend().
rpmuint32_t rpmtsGetTid | ( | rpmts | ts | ) |
Get transaction id, i.e.
transaction time stamp.
ts | transaction set |
Definition at line 1022 of file rpmts.c.
Referenced by fsmSetup(), ftsCacheUpdate(), iosmSetup(), rpmcliImportPubkey(), rpmpsmStage(), and rpmtsRollback().
Retrieve goal of transaction set.
ts | transaction set |
Definition at line 1408 of file rpmts.c.
References TSM_UNKNOWN.
|
inlinestatic |
Initialize the database used by the transaction.
ts | transaction set |
dbmode | O_RDONLY or O_RDWR |
Definition at line 468 of file rpmts.h.
Referenced by rpmts_InitDB().
int rpmtsInitDSI | ( | const rpmts | ts | ) |
Initialize disk space info for each and every mounted file systems.
ts | transaction set |
Definition at line 1065 of file rpmts.c.
References _free(), D_, rpmGetFilesystemList(), rpmlog(), RPMLOG_DEBUG, RPMPROB_FILTER_DISKSPACE, rpmtsFilterFlags(), ST_RDONLY, and xcalloc().
Referenced by rpmtsSetup(), and unsatisfiedDepend().
Return transaction database iterator.
ts | transaction set |
rpmtag | rpm tag |
keyp | key data (NULL for sequential access) |
keylen | key data length (0 will use strlen(keyp)) |
Definition at line 212 of file rpmts.c.
References rpmmiInit(), and rpmtsOpenDB().
Referenced by checkDependentConflicts(), checkDependentPackages(), ftsCacheUpdate(), IDTXload(), rpmcliEraseElement(), rpmcliInstall(), rpmErase(), rpmgiInitFilter(), rpmmi_new(), rpmpsmStage(), rpmQueryVerify(), rpmrb_NewMi(), rpmteDBHeader(), rpmts_AddErase(), rpmts_Match(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsEraseDebuginfo(), rpmtsSanityCheck(), runImmedTriggers(), runTriggersLoop(), and unsatisfiedDepend().
Reference a transaction set instance.
ts | transaction set |
msg |
Referenced by fsmSetup(), iosmSetup(), rpmgiNew(), rpmpsmNew(), rpmtsCreate(), and XrpmtsiInit().
int rpmtsNElements | ( | rpmts | ts | ) |
Return number of (ordered) transaction set elements.
ts | transaction set |
Definition at line 1306 of file rpmts.c.
Referenced by _rpmtsRun(), rpmcliInstall(), rpmtsiNextElement(), rpmtsSanityCheck(), and XrpmtsiInit().
void* rpmtsNotify | ( | rpmts | ts, |
rpmte | te, | ||
rpmCallbackType | what, | ||
rpmuint64_t | amount, | ||
rpmuint64_t | total | ||
) |
Perform transaction progress notify callback.
ts | transaction set |
te | current transaction element |
what | type of call back |
amount | current value |
total | final value |
Definition at line 1279 of file rpmts.c.
References headerFree(), headerLink(), and rpmteKey().
Referenced by fsmSetup(), fsmStage(), iosmSetup(), iosmStage(), rpmpsmStage(), rpmteClose(), rpmteFDHeader(), rpmtsFindBaseNamesInDB(), rpmtsPrepare(), rpmtsRepackage(), and runScript().
Retrieve operation timestamp from a transaction set.
ts | transaction set |
opx | operation timestamp index |
Definition at line 133 of file pkgio.c.
References RPMTS_OP_MAX.
Referenced by _rpmtsCheck(), fsmTeardown(), iosmTeardown(), psmWait(), rpmpsmStage(), rpmReadPackageFile(), rpmrepoFclose(), rpmrepoRfileDigest(), rpmtsAddFingerprints(), rpmtsCleanDig(), rpmtsCloseDB(), rpmtsCloseSDB(), rpmtsCreate(), rpmtsPrepare(), rpmtsPrintStats(), rpmtsProcess(), and rpmtsRepackage().
int rpmtsOpenDB | ( | rpmts | ts, |
int | dbmode | ||
) |
Open the database used by the transaction.
ts | transaction set |
dbmode | O_RDONLY or O_RDWR |
Definition at line 115 of file rpmts.c.
References _, _free(), rpmdbOpen(), rpmGetPath(), rpmlog(), RPMLOG_ERR, and rpmtsCloseDB().
Referenced by _rpmtsCheck(), ftsCacheUpdate(), rpmcliImportPubkey(), rpmts_Match(), rpmts_OpenDB(), rpmtsAddInstallElement(), rpmtsInitIterator(), rpmtsLoadNVRA(), rpmtsRebuildDB(), rpmtsRollback(), and rpmtsSetup().
int rpmtsOpenSDB | ( | rpmts | ts, |
int | dbmode | ||
) |
Open the database used by the transaction to solve dependencies.
ts | transaction set |
dbmode | O_RDONLY or O_RDWR |
Definition at line 252 of file rpmts.c.
References _, _free(), addMacro(), argvCount(), argvFree(), argvSplit(), delMacro(), RMIL_DEFAULT, rpmdbOpen(), rpmExpand(), rpmExpandNumeric(), rpmGetPath(), rpmlog(), RPMLOG_WARNING, and urlPath().
Referenced by rpmtsSolve().
Get transaction set dependencies.
ts | transaction set |
Definition at line 1042 of file rpmts.c.
References _free(), R_OK, rpmdsNewPRCO(), rpmdsSysinfo(), rpmGetPath(), and rpmioAccess().
Referenced by _rpmtsCheck(), and unsatisfiedDepend().
rpmuint32_t rpmtsPrefColor | ( | rpmts | ts | ) |
Retrieve preferred file color.
ts | transaction set |
Definition at line 1453 of file rpmts.c.
Referenced by handleInstInstalledFile(), and handleOverlappedFiles().
Return current transaction set problems.
ts | transaction set |
Definition at line 582 of file rpmts.c.
References rpmpsCreate(), and rpmpsLink().
Referenced by _rpmtsCheck(), checkPackageDeps(), cmpArgvStr(), ensureOlder(), handleInstInstalledFile(), handleOverlappedFiles(), relocateFileList(), rpmcliInstallProblems(), rpmts_Check(), rpmts_Problems(), rpmts_Run(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), rpmtsSanityCheck(), and verifyDependencies().
pgpDigParams rpmtsPubkey | ( | const rpmts | ts | ) |
Return OpenPGP pubkey constants.
ts | transaction set |
Definition at line 144 of file pkgio.c.
References pgpGetPubkey(), and rpmtsDig().
int rpmtsRebuildDB | ( | rpmts | ts | ) |
Rebuild the database used by the transaction.
ts | transaction set |
Definition at line 136 of file rpmts.c.
References _free(), D_, dbiOpen(), headerFree(), RPMDBI_ADDED, RPMDBI_AVAILABLE, RPMDBI_BTREE, RPMDBI_DEPCACHE, RPMDBI_HASH, RPMDBI_PACKAGES, RPMDBI_QUEUE, RPMDBI_RECNO, RPMDBI_REMOVED, RPMDBI_SEQNO, rpmGetPath(), rpmlog(), RPMLOG_DEBUG, rpmtsCloseDB(), rpmtsGetRdb(), rpmtsOpenDB(), Stat(), tagName(), and Unlink().
Referenced by main(), and rpmts_RebuildDB().
Get current relocate transaction element.
ts | transaction set |
Definition at line 1392 of file rpmts.c.
Referenced by relocateFileList(), and rpmfiNew().
rpmRC rpmtsRollback | ( | rpmts | rbts, |
rpmprobFilterFlags | ignoreSet, | ||
int | running, | ||
rpmte | rbte | ||
) |
Rollback a failed transaction.
rbts | failed transaction set |
ignoreSet | problems to ignore |
running | partial transaction? |
rbte | failed transaction element |
Definition at line 2065 of file transaction.c.
References _, _free(), _processFailedPackage(), alloca(), rpmQVKArguments_s::depFlags, Fclose(), Fopen(), FPSDEBUG, IIF_SET, rpmQVKArguments_s::installInterfaceFlags, rpmQVKArguments_s::no_rollback_links, rpmQVKArguments_s::probFilter, rpmQVKArguments_s::rbtid, rpmdbRemove(), rpmExpand(), rpmExpandNumeric(), rpmlog(), RPMLOG_ERR, RPMLOG_NOTICE, RPMRC_OK, rpmRollback(), rpmteNEVRA(), RPMTRANS_TYPE_AUTOROLLBACK, RPMTRANS_TYPE_ROLLBACK, rpmtsARBGoal(), rpmtsDFlags(), rpmtsEmpty(), rpmtsFlags(), rpmtsGetRdb(), rpmtsGetTid(), rpmtsiFree(), rpmtsiInit(), rpmtsiNext(), rpmtsOpenDB(), rpmtsSetFlags(), rpmtsSetVSFlags(), rpmtsType(), TR_REMOVED, rpmQVKArguments_s::transFlags, TSF_CLR, TSF_SET, Unlink(), VSF_SET, and vsflags.
Referenced by _rpmtsCheck(), and rpmtsProcess().
const char* rpmtsRootDir | ( | rpmts | ts | ) |
Get transaction rootDir, i.e.
path to chroot(2).
ts | transaction set |
Definition at line 901 of file rpmts.c.
References URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_MONGO, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
Referenced by _rpmtsRun(), createDir(), rpmfiNew(), rpmpsmStage(), rpmts_rootdir_get(), rpmts_rootdir_set(), rpmtsPrepare(), rpmtsProcess(), rpmvfNew(), and runScript().
int rpmtsSELinuxEnabled | ( | rpmts | ts | ) |
Get selinuxEnabled flag, i.e.
is SE linux enabled?
ts | transaction set |
Definition at line 997 of file rpmts.c.
Referenced by rpmtsFlags(), rpmtsSetFlags(), rpmtsSetup(), and runScript().
void rpmtsSetARBGoal | ( | rpmts | ts, |
rpmuint32_t | goal | ||
) |
Set autorollback goal.
ts | transaction set |
goal | autorollback goal |
Definition at line 884 of file rpmts.c.
Referenced by rpmcliInstall(), and rpmErase().
int rpmtsSetChrootDone | ( | rpmts | ts, |
int | chrootDone | ||
) |
Set chrootDone flag, i.e.
has chroot(2) been performed?
ts | transaction set |
chrootDone | new chrootDone flag |
Definition at line 1010 of file rpmts.c.
Referenced by rpmpsmStage(), rpmtsPrepare(), and rpmtsSetup().
rpmuint32_t rpmtsSetColor | ( | rpmts | ts, |
rpmuint32_t | color | ||
) |
Set color bits of transaction set.
ts | transaction set |
color | new color bits |
Definition at line 1443 of file rpmts.c.
Referenced by rpmts_SetColor().
void rpmtsSetCurrDir | ( | rpmts | ts, |
const char * | currDir | ||
) |
Set transaction currDir, i.e.
current directory before chroot(2).
ts | transaction set |
currDir | new transaction currDir (or NULL) |
Definition at line 960 of file rpmts.c.
References _free(), and xstrdup().
Referenced by rpmtsSetup().
int rpmtsSetDBMode | ( | rpmts | ts, |
int | dbmode | ||
) |
Set dbmode of transaction set.
ts | transaction set |
dbmode | new dbmode |
Definition at line 1428 of file rpmts.c.
Referenced by rpmts_CloseDB(), and rpmts_OpenDB().
rpmdepFlags rpmtsSetDFlags | ( | rpmts | ts, |
rpmdepFlags | depFlags | ||
) |
Set dependency flags, i.e.
bits that control rpmtsCheck() and rpmtsOrder().
ts | transaction set |
depFlags | new dependency flags |
Definition at line 1366 of file rpmts.c.
Referenced by rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmgiNext(), rpmRollback(), and rpmts_SetDFlags().
rpmtransFlags rpmtsSetFlags | ( | rpmts | ts, |
rpmtransFlags | transFlags | ||
) |
Set transaction flags, i.e.
bits that control rpmtsRun().
ts | transaction set |
transFlags | new transaction flags |
Definition at line 1345 of file rpmts.c.
References RPMTRANS_FLAG_NOCONTEXTS, and rpmtsSELinuxEnabled().
Referenced by rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmRollback(), rpmts_Rollback(), rpmts_SetFlags(), rpmtsRollback(), and rpmtsSetup().
Set goal of transaction set.
ts | transaction set |
goal | new goal |
Definition at line 1413 of file rpmts.c.
References TSM_UNKNOWN.
Referenced by rpmcliInstall(), rpmErase(), and rpmgiNext().
int rpmtsSetKeyring | ( | rpmts | ts, |
void * | _keyring | ||
) |
Set transaction keyring.
ts | transaction set |
_keyring | new transaction keyring |
Definition at line 807 of file rpmts.c.
References rpmtsGetRdb().
int rpmtsSetNotifyCallback | ( | rpmts | ts, |
rpmCallbackFunction | notify, | ||
rpmCallbackData | notifyData | ||
) |
Set transaction notify callback function and argument.
ts | transaction set |
notify | progress callback |
notifyData | progress callback private data |
Definition at line 1458 of file rpmts.c.
Referenced by rpmcliInstall(), rpmErase(), rpmRollback(), and rpmts_Run().
Set current relocate transaction element.
ts | transaction set |
relocateElement | new relocate transaction element |
Definition at line 1399 of file rpmts.c.
Referenced by addTE(), and rpmtsProcess().
void rpmtsSetRootDir | ( | rpmts | ts, |
const char * | rootDir | ||
) |
Set transaction rootDir, i.e.
path to chroot(2).
ts | transaction set |
rootDir | new transaction rootDir (or NULL) |
Definition at line 925 of file rpmts.c.
References _free(), alloca(), stpcpy(), and xstrdup().
Referenced by main(), rpmts_new(), and rpmts_rootdir_set().
int rpmtsSetSolveCallback | ( | rpmts | ts, |
int(*)(rpmts ts, rpmds ds, const void *data) | solve, | ||
const void * | solveData | ||
) |
Set dependency solver callback.
ts | transaction set |
(*solve) | dependency solver callback |
solveData | dependency solver callback data (opaque) |
Set a spec control structure in transaction set.
ts | transaction set |
spec | new spec control structure |
Definition at line 1383 of file rpmts.c.
Referenced by _specQuery(), and parseSpec().
rpmuint32_t rpmtsSetTid | ( | rpmts | ts, |
rpmuint32_t | tid | ||
) |
Set transaction id, i.e.
transaction time stamp.
ts | transaction set |
tid | new transaction id |
Definition at line 1031 of file rpmts.c.
Referenced by main(), and rpmtsSetup().
Set transaction type.
Allowed types are: RPMTRANS_TYPE_NORMAL RPMTRANS_TYPE_ROLLBACK RPMTRANS_TYPE_AUTOROLLBACK
ts | transaction set |
type | transaction type |
Definition at line 873 of file rpmts.c.
Referenced by rpmRollback().
rpmVSFlags rpmtsSetVSFlags | ( | rpmts | ts, |
rpmVSFlags | vsflags | ||
) |
Set verify signatures flag(s).
ts | transaction set |
vsflags | new verify signatures flags |
Definition at line 843 of file rpmts.c.
References pgpDigVSFlags, and vsflags.
Referenced by main(), rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmInstallSource(), rpmRollback(), rpmteFDHeader(), rpmts_new(), rpmts_SetVSFlags(), rpmts_vsflags_set(), and rpmtsRollback().
Attempt to solve a needed dependency using the solve database.
ts | transaction set |
ds | dependency set |
data | opaque data associated with callback |
Definition at line 351 of file rpmts.c.
References _, _free(), alloca(), D_, Fclose(), Ferror(), Fopen(), Fstrerror(), headerFree(), headerGet(), headerLink(), headerSprintf(), _HE_s::p, rpmDataType_u::ptr, RPMDEPS_FLAG_ADDINDEPS, rpmdsAnyMatchesDep(), rpmdsEVR(), rpmdsFlags(), rpmdsN(), rpmdsTagN(), rpmExpand(), rpmHeaderFormats, rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, rpmmiFree(), rpmmiInit(), rpmmiNext(), RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_BUILDTIME, RPMTAG_CONFLICTNAME, RPMTAG_DIRNAMES, RPMTAG_FILELINKTOS, RPMTAG_FILEPATHS, RPMTAG_NAME, RPMTAG_PACKAGEORIGIN, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, rpmtsAddInstallElement(), rpmtsOpenSDB(), rpmDataType_u::str, sugcmp(), _HE_s::tag, TSM_INSTALL, rpmDataType_u::ui32p, and xrealloc.
Referenced by rpmts_Check(), and rpmtsCreate().
Get spec control structure from transaction set.
ts | transaction set |
Definition at line 1376 of file rpmts.c.
Referenced by rpmts_parse_spec(), and spec_Parse().
Return the type of a transaction.
ts | transaction set |
Definition at line 868 of file rpmts.c.
Referenced by _rpmtsRun(), populateInstallHeader(), rpmpsmStage(), and rpmtsRollback().
Unreference a transaction instance.
ts | transaction set |
msg |
int rpmtsUnorderedSuccessors | ( | rpmts | ts, |
int | first | ||
) |
Set index of 1st element of successors.
ts | transaction set |
first | new index of 1st element of successors |
Definition at line 890 of file rpmts.c.
Referenced by rpmtsProcess().
void rpmtsUpdateDSI | ( | const rpmts | ts, |
dev_t | dev, | ||
rpmuint32_t | fileSize, | ||
rpmuint32_t | prevSize, | ||
rpmuint32_t | fixupSize, | ||
int | _action | ||
) |
Update disk space info for a file.
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 1179 of file rpmts.c.
References FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, and FA_SAVE.
Referenced by handleOverlappedFiles().
|
inlinestatic |
Verify the database used by the transaction.
ts | transaction set |
Definition at line 490 of file rpmts.h.
Referenced by rpmts_VerifyDB().
rpmVSFlags rpmtsVSFlags | ( | rpmts | ts | ) |
Get verify signatures flag(s).
ts | transaction set |
Definition at line 838 of file rpmts.c.
References pgpDigVSFlags.
Referenced by ftsCacheUpdate(), rpmInstallSource(), rpmpsmStage(), rpmteFDHeader(), rpmts_GetVSFlags(), rpmts_HdrCheck(), rpmts_vsflags_get(), and rpmts_vsflags_set().
int(* rpmtsCheck)(rpmts ts) |
Perform dependency resolution on the transaction set.
Any problems found by rpmtsCheck() can be examined by retrieving the problem set with rpmtsProblems(), success here only means that the resolution was successfully attempted for all packages in the set.
ts | transaction set |
Definition at line 2073 of file depends.c.
Referenced by rpmcliInstallCheck(), rpmts_Check(), and verifyDependencies().
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.
ts | transaction set |
Referenced by rpmcliInstallOrder(), and rpmts_Order().
int(* rpmtsRun)(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) |
Process all package elements in a transaction set.
Before calling rpmtsRun be sure to have:
Additionally, though not required you may want to:
ts | transaction set |
okProbs | previously known problems (or NULL) |
ignoreSet | bits to filter problem types |
Definition at line 2345 of file transaction.c.
Referenced by rpmcliInstallRun(), and rpmts_Run().