Files | |
file | depends.h |
Structures used for dependency checking. | |
file | psm.c |
Package state machine to handle a package from a transaction set. | |
file | psm.h |
Package state machine to handle a package from a transaction set. | |
file | rpmlib.h |
file | rpmvercmp.c |
file | transaction.c |
file | fprint.h |
Identify a file name path by a unique "finger print". | |
RPMTS | |
typedef psm_s * | PSM_t |
Package state machine data. | |
typedef transactionFileInfo_s * | TFI_t |
typedef rpmTransactionSet_s * | rpmTransactionSet |
The RPM Transaction Set. | |
typedef enum rpmtransFlags_e | rpmtransFlags |
Bit(s) to control rpmRunTransactions() operation. | |
enum | rpmtransFlags_e { RPMTRANS_FLAG_NONE = 0, RPMTRANS_FLAG_TEST = (1 << 0), RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), RPMTRANS_FLAG_JUSTDB = (1 << 3), RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), RPMTRANS_FLAG_NODOCS = (1 << 5), RPMTRANS_FLAG_ALLFILES = (1 << 6), RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), RPMTRANS_FLAG_MULTILIB = (1 << 8), RPMTRANS_FLAG_DIRSTASH = (1 << 9), RPMTRANS_FLAG_REPACKAGE = (1 << 10), RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), RPMTRANS_FLAG_PKGUNDO = (1 << 12), RPMTRANS_FLAG_COMMIT = (1 << 13), RPMTRANS_FLAG_UNDO = (1 << 14), RPMTRANS_FLAG_REVERSE = (1 << 15), RPMTRANS_FLAG_NOTRIGGERPREIN = (1 << 16), RPMTRANS_FLAG_NOPRE = (1 << 17), RPMTRANS_FLAG_NOPOST = (1 << 18), RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), RPMTRANS_FLAG_NOPREUN = (1 << 21), RPMTRANS_FLAG_NOPOSTUN = (1 << 22), RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), RPMTRANS_FLAG_APPLYONLY = (1 << 25), RPMTRANS_FLAG_CHAINSAW = (1 << 26), RPMTRANS_FLAG_NOMD5 = (1 << 27) } |
Bit(s) to control rpmRunTransactions() operation. More... | |
rpmTransactionSet | rpmtransCreateSet (rpmdb rpmdb, const char *rootDir) |
Create an empty transaction set. | |
int | rpmtransAddPackage (rpmTransactionSet ts, Header h, FD_t fd, const void *key, int upgrade, rpmRelocation *relocs) |
Add package to be installed to unordered transaction set. | |
void | rpmtransAvailablePackage (rpmTransactionSet ts, Header h, const void *key) |
Add package to universe of possible packages to install in transaction set. | |
int | rpmtransRemovePackage (rpmTransactionSet ts, int dboffset) |
Add package to be removed to unordered transaction set. | |
rpmTransactionSet | rpmtransFree (rpmTransactionSet ts) |
Destroy transaction set. | |
void | rpmtransSetScriptFd (rpmTransactionSet ts, FD_t fd) |
Save file handle to be used as stderr when running package scripts. | |
int | rpmtransGetKeys (const rpmTransactionSet ts, const void ***ep, int *nep) |
Retrieve keys from ordered transaction set. | |
int | rpmdepCheck (rpmTransactionSet ts, rpmDependencyConflict *conflicts, int *numConflicts) |
Check that all dependencies can be resolved. | |
int | rpmdepOrder (rpmTransactionSet ts) |
Determine package order in a transaction set according to dependencies. | |
rpmDependencyConflict | rpmdepFreeConflicts (rpmDependencyConflict conflicts, int numConflicts) |
Destroy dependency conflicts storage. | |
int | rpmGetRpmlibProvides (const char ***provNames, int **provFlags, const char ***provVersions) |
Return copy of rpmlib internal provides. | |
int | rpmvercmp (const char *a, const char *b) |
Segmented string compare for version and/or release. | |
int | rpmRangesOverlap (const char *AName, const char *AEVR, int AFlags, const char *BName, const char *BEVR, int BFlags) |
Compare two versioned dependency ranges, looking for overlap. | |
int | rpmCheckRpmlibProvides (const char *keyName, const char *keyEVR, int keyFlags) |
Check dependency against internal rpmlib feature provides. | |
int | rpmRunTransactions (rpmTransactionSet ts, rpmCallbackFunction notify, rpmCallbackData notifyData, rpmProblemSet okProbs, rpmProblemSet *newProbs, rpmtransFlags transFlags, rpmprobFilterFlags ignoreSet) |
Process all packages in transaction set. |
|
Package state machine data.
|
|
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. |
|
Bit(s) to control rpmRunTransactions() operation.
|
|
|
|
Bit(s) to control rpmRunTransactions() operation.
|
|
Check dependency against internal rpmlib feature provides.
Definition at line 57 of file rpmlibprov.c. References rpmlibProvides_s::featureEVR, rpmlibProvides_s::featureFlags, rpmlibProvides_s::featureName, rpmlibProvides, and rpmRangesOverlap(). Referenced by unsatisfiedDepend(). |
|
Check that all dependencies can be resolved.
Definition at line 2256 of file depends.c. References rpmTransactionSet_s::addedPackages, alMakeIndex(), rpmTransactionSet_s::availablePackages, checkDependentConflicts(), checkPackageDeps(), availablePackage::h, headerFreeData(), headerGetEntryMinMemory(), availableList_s::list, availablePackage::multiLib, availablePackage::name, availablePackage::provides, availablePackage::providesCount, availablePackage::release, rpmMessage, availableList_s::size, availablePackage::version, and xcalloc(). Referenced by checkSpec(), rpmRollback(), rpmtransDepCheck(), and verifyDependencies(). |
|
Destroy dependency conflicts storage.
Definition at line 936 of file depends.c. References _free(), rpmDependencyConflict_s::byName, rpmDependencyConflict_s::byRelease, rpmDependencyConflict_s::byVersion, headerFree(), rpmDependencyConflict_s::needsName, rpmDependencyConflict_s::needsVersion, and rpmDependencyConflict_s::suggestedPackages. Referenced by checkSpec(), rpmRollback(), and rpmtransDepCheck(). |
|
Determine package order in a transaction set according to dependencies. Order packages, returning error if circular dependencies cannot be eliminated by removing PreReq'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 rpmdepCheck() 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. The operation would be easier if we could sort the addedPackages array in the transaction set, but we store indexes into the array in various places.
Definition at line 1914 of file depends.c. References _, rpmTransactionSet_s::addedPackages, addRelation(), alloca(), alMakeIndex(), rpmTransactionSet_s::availablePackages, isErasePreReq, isInstallPreReq, isLegacyPreReq, availableList_s::list, availablePackage::requireFlags, availablePackage::requiresCount, RPMMESS_DEBUG, rpmMessage, RPMTRANS_FLAG_CHAINSAW, availableList_s::size, rpmTransactionSet_s::transFlags, and availablePackage::tsi. Referenced by rpmRollback(), and rpmtransOrder(). |
|
Return copy of rpmlib internal provides.
Definition at line 73 of file rpmlibprov.c. References rpmlibProvides_s::featureEVR, rpmlibProvides_s::featureFlags, rpmlibProvides_s::featureName, rpmlibProvides, and xcalloc(). |
|
Compare two versioned dependency ranges, looking for overlap.
Definition at line 529 of file depends.c. References _, _free(), parseEVR(), printDepend(), RPMMESS_DEBUG, rpmMessage, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMSENSE_SENSEMASK, rpmvercmp(), and xstrdup(). Referenced by alAllSatisfiesDepend(), headerMatchesDepFlags(), rangeMatchesDepFlags(), and rpmCheckRpmlibProvides(). |
|
|
Add package to be installed to unordered transaction set. If fd is NULL, the callback specified in rpmtransCreateSet() is used to open and close the file descriptor. If Header is NULL, the fd is always used, otherwise fd is only needed (and only opened) for actual package installation.
Definition at line 797 of file depends.c. References transactionElement_s::addedIndex, rpmTransactionSet_s::addedPackages, alAddPackage(), rpmTransactionSet_s::delta, headerFreeData(), headerGetEntryMinMemory(), headerIsEntry(), headerMatchesDepFlags(), headerNVR(), availableList_s::list, name, rpmTransactionSet_s::numRemovedPackages, rpmTransactionSet_s::order, rpmTransactionSet_s::orderAlloced, rpmTransactionSet_s::orderCount, rpmTransactionSet_s::removedPackages, removePackage(), rpmTransactionSet_s::rpmdb, rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbInitIterator(), rpmdbNextIterator(), rpmdbPruneIterator(), RPMTAG_MULTILIBS, RPMTAG_NAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_SOURCEPACKAGE, rpmVersionCompare(), transactionElement_s::type, transactionElement_s::u, and xrealloc(). Referenced by checkSpec(), rpmInstallSourcePackage(), rpmRollback(), rpmtransAdd(), and verifyDependencies(). |
|
Add package to universe of possible packages to install in transaction set.
Definition at line 906 of file depends.c. References alAddPackage(), rpmTransactionSet_s::availablePackages, and availablePackage::h. Referenced by rpmtransAdd(). |
|
Create an empty transaction set.
Definition at line 692 of file depends.c. References alCreate(), alloca(), stpcpy(), xcalloc(), and xstrdup(). Referenced by checkSpec(), cpio_doio(), rpmErase(), rpmInstallSourcePackage(), rpmRollback(), rpmtransCreate(), rpmVerifyScript(), and verifyDependencies(). |
|
Destroy transaction set.
Definition at line 917 of file depends.c. References _free(), rpmTransactionSet_s::addedPackages, alFree(), rpmTransactionSet_s::availablePackages, rpmTransactionSet_s::currDir, rpmTransactionSet_s::di, fdFree, rpmTransactionSet_s::order, rpmTransactionSet_s::removedPackages, rpmTransactionSet_s::rootDir, and rpmTransactionSet_s::scriptFd. Referenced by checkSpec(), cpio_doio(), rpmRollback(), rpmtransDealloc(), rpmVerifyScript(), and verifyDependencies(). |
|
Retrieve keys from ordered transaction set.
Definition at line 92 of file transaction.c. References transactionElement_s::addedIndex, rpmTransactionSet_s::addedPackages, availableList_s::list, rpmTransactionSet_s::order, rpmTransactionSet_s::orderCount, transactionElement_s::type, transactionElement_s::u, and xmalloc(). Referenced by py_rpmtransGetKeys(). |
|
Add package to be removed to unordered transaction set.
Definition at line 912 of file depends.c. References removePackage(). Referenced by rpmErase(), rpmRollback(), and rpmtransRemove(). |
|
Save file handle to be used as stderr when running package scripts.
Definition at line 87 of file transaction.c. References fdLink, and rpmTransactionSet_s::scriptFd. Referenced by rpmtransSetAttr(). |
|
Segmented string compare for version and/or release.
Definition at line 15 of file rpmvercmp.c. Referenced by labelCompare(), rpmRangesOverlap(), and rpmVersionCompare(). |