rpm
4.11.1-rc1
|
Files | |
file | rpmte.h |
Structures used for an "rpmte" transaction element. | |
file | rpmts.h |
Structures and prototypes used for an "rpmts" transaction set. | |
Typedefs | |
typedef enum rpmtsOpX_e | rpmtsOpX |
Indices for timestamps. More... | |
Functions | |
int | rpmtsCheck (rpmts ts) |
Perform dependency resolution on the transaction set. More... | |
int | rpmtsOrder (rpmts ts) |
Determine package order in a transaction set according to dependencies. More... | |
int | rpmtsRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) |
Process all package elements in a transaction set. More... | |
rpmts | rpmtsLink (rpmts ts) |
Reference a transaction set instance. More... | |
int | rpmtsCloseDB (rpmts ts) |
Close the database used by the transaction. More... | |
int | rpmtsOpenDB (rpmts ts, int dbmode) |
Open the database used by the transaction. More... | |
int | rpmtsInitDB (rpmts ts, int dbmode) |
Initialize the database used by the transaction. More... | |
int | rpmtsGetDBMode (rpmts ts) |
Return the transaction database mode. More... | |
int | rpmtsSetDBMode (rpmts ts, int dbmode) |
Set the transaction database mode. More... | |
int | rpmtsRebuildDB (rpmts ts) |
Rebuild the database used by the transaction. More... | |
int | rpmtsVerifyDB (rpmts ts) |
Verify the database used by the transaction. More... | |
rpmdbMatchIterator | rpmtsInitIterator (const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen) |
Return transaction database iterator. More... | |
rpmRC | rpmtsImportPubkey (rpmts ts, const unsigned char *pkt, size_t pktlen) |
Import public key packet(s). More... | |
rpmKeyring | rpmtsGetKeyring (rpmts ts, int autoload) |
Retrieve handle for keyring used for this transaction set. More... | |
int | rpmtsSetKeyring (rpmts ts, rpmKeyring keyring) |
Set keyring to use for this transaction set. More... | |
int | rpmtsSetSolveCallback (rpmts ts, int(*solve)(rpmts ts, rpmds ds, const void *data), const void *solveData) |
Set dependency solver callback. More... | |
rpmps | rpmtsProblems (rpmts ts) |
Return current transaction set problems. More... | |
void | rpmtsCleanProblems (rpmts ts) |
Clean current transaction problem set. More... | |
void | rpmtsClean (rpmts ts) |
Free memory needed only for dependency checks and ordering. More... | |
void | rpmtsEmpty (rpmts ts) |
Re-create an empty transaction set. More... | |
rpmts | rpmtsFree (rpmts ts) |
Destroy transaction set, closing the database as well. More... | |
rpmVSFlags | rpmtsVSFlags (rpmts ts) |
Get verify signatures flag(s). More... | |
rpmVSFlags | rpmtsSetVSFlags (rpmts ts, rpmVSFlags vsflags) |
Set verify signatures flag(s). More... | |
const char * | rpmtsRootDir (rpmts ts) |
Get transaction rootDir, i.e. More... | |
int | rpmtsSetRootDir (rpmts ts, const char *rootDir) |
Set transaction rootDir, i.e. More... | |
FD_t | rpmtsScriptFd (rpmts ts) |
Get transaction script file handle, i.e. More... | |
void | rpmtsSetScriptFd (rpmts ts, FD_t scriptFd) |
Set transaction script file handle, i.e. More... | |
rpm_tid_t | rpmtsGetTid (rpmts ts) |
Get transaction id, i.e. More... | |
rpm_tid_t | rpmtsSetTid (rpmts ts, rpm_tid_t tid) |
Set transaction id, i.e. More... | |
rpmdb | rpmtsGetRdb (rpmts ts) |
Get transaction set database handle. More... | |
void * | rpmtsNotify (rpmts ts, rpmte te, rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total) |
Perform transaction progress notify callback. More... | |
int | rpmtsNElements (rpmts ts) |
Return number of (ordered) transaction set elements. More... | |
rpmte | rpmtsElement (rpmts ts, int ix) |
Return (ordered) transaction set element. More... | |
rpmprobFilterFlags | rpmtsFilterFlags (rpmts ts) |
Get problem ignore bit mask, i.e. More... | |
rpmtransFlags | rpmtsFlags (rpmts ts) |
Get transaction flags, i.e. More... | |
rpmtransFlags | rpmtsSetFlags (rpmts ts, rpmtransFlags transFlags) |
Set transaction flags, i.e. More... | |
rpm_color_t | rpmtsColor (rpmts ts) |
Retrieve color bits of transaction set. More... | |
rpm_color_t | rpmtsPrefColor (rpmts ts) |
Retrieve preferred file color. More... | |
rpm_color_t | rpmtsSetColor (rpmts ts, rpm_color_t color) |
Set color bits of transaction set. More... | |
rpm_color_t | rpmtsSetPrefColor (rpmts ts, rpm_color_t color) |
Set preferred file color. More... | |
rpmop | rpmtsOp (rpmts ts, rpmtsOpX opx) |
Retrieve operation timestamp from a transaction set. More... | |
rpmPlugins | rpmtsPlugins (rpmts ts) |
Get the plugins associated with a transaction set. More... | |
int | rpmtsSetNotifyCallback (rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData) |
Set transaction notify callback function and argument. More... | |
rpmts | rpmtsCreate (void) |
Create an empty transaction set. More... | |
int | rpmtsAddInstallElement (rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation *relocs) |
Add package to be installed to transaction set. More... | |
int | rpmtsAddEraseElement (rpmts ts, Header h, int dboffset) |
Add package to be erased to transaction set. More... | |
typedef enum rpmtsOpX_e rpmtsOpX |
Indices for timestamps.
enum rpmtransFlags_e |
Bit(s) to control rpmtsRun() operation.
enum rpmtsOpX_e |
Indices for timestamps.
enum rpmVSFlags_e |
Add package to be erased to transaction set.
ts | transaction set |
h | header |
dboffset | ununsed |
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 |
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 |
void rpmtsClean | ( | rpmts | ts | ) |
Free memory needed only for dependency checks and ordering.
ts | transaction set |
void rpmtsCleanProblems | ( | rpmts | ts | ) |
Clean current transaction problem set.
ts | transaction set |
int rpmtsCloseDB | ( | rpmts | ts | ) |
Close the database used by the transaction.
ts | transaction set |
rpm_color_t rpmtsColor | ( | rpmts | ts | ) |
Retrieve color bits of transaction set.
ts | transaction set |
rpmts rpmtsCreate | ( | void | ) |
Return (ordered) transaction set element.
ts | transaction set |
ix | transaction element index |
void rpmtsEmpty | ( | rpmts | ts | ) |
Re-create an empty transaction set.
ts | transaction set |
rpmprobFilterFlags rpmtsFilterFlags | ( | rpmts | ts | ) |
Get problem ignore bit mask, i.e.
bits to filter encountered problems.
ts | transaction set |
rpmtransFlags rpmtsFlags | ( | rpmts | ts | ) |
Get transaction flags, i.e.
bits that control rpmtsRun().
ts | transaction set |
Referenced by main().
Destroy transaction set, closing the database as well.
ts | transaction set |
Referenced by main().
int rpmtsGetDBMode | ( | rpmts | ts | ) |
Return the transaction database mode.
ts | transaction set |
rpmKeyring rpmtsGetKeyring | ( | rpmts | ts, |
int | autoload | ||
) |
Retrieve handle for keyring used for this transaction set.
ts | transaction set |
autoload | load default keyring if keyring is not set |
Get transaction set database handle.
ts | transaction set |
Get transaction id, i.e.
transaction time stamp.
ts | transaction set |
Import public key packet(s).
ts | transaction set |
pkt | pgp pubkey packet(s) |
pktlen | pgp pubkey length |
int rpmtsInitDB | ( | rpmts | ts, |
int | dbmode | ||
) |
Initialize the database used by the transaction.
ts | transaction set |
dbmode | O_RDONLY or O_RDWR |
Referenced by main().
rpmdbMatchIterator rpmtsInitIterator | ( | const rpmts | ts, |
rpmDbiTagVal | rpmtag, | ||
const void * | keyp, | ||
size_t | keylen | ||
) |
Return transaction database iterator.
ts | transaction set |
rpmtag | database index tag |
keyp | key data (NULL for sequential access) |
keylen | key data length (0 will use strlen(keyp)) |
Reference a transaction set instance.
ts | transaction set |
int rpmtsNElements | ( | rpmts | ts | ) |
Return number of (ordered) transaction set elements.
ts | transaction set |
void* rpmtsNotify | ( | rpmts | ts, |
rpmte | te, | ||
rpmCallbackType | what, | ||
rpm_loff_t | amount, | ||
rpm_loff_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 |
Retrieve operation timestamp from a transaction set.
ts | transaction set |
opx | operation timestamp index |
int rpmtsOpenDB | ( | rpmts | ts, |
int | dbmode | ||
) |
Open the database used by the transaction.
ts | transaction set |
dbmode | O_RDONLY or O_RDWR |
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 |
rpmPlugins rpmtsPlugins | ( | rpmts | ts | ) |
Get the plugins associated with a transaction set.
ts | transaction set |
rpm_color_t rpmtsPrefColor | ( | rpmts | ts | ) |
Retrieve preferred file color.
ts | transaction set |
Return current transaction set problems.
ts | transaction set |
int rpmtsRebuildDB | ( | rpmts | ts | ) |
Rebuild the database used by the transaction.
ts | transaction set |
Referenced by main().
const char* rpmtsRootDir | ( | rpmts | ts | ) |
Get transaction rootDir, i.e.
path to chroot(2).
ts | transaction set |
Referenced by buildForTarget().
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 | unused |
ignoreSet | bits to filter problem types |
Get transaction script file handle, i.e.
stdout/stderr on scriptlet execution
ts | transaction set |
rpm_color_t rpmtsSetColor | ( | rpmts | ts, |
rpm_color_t | color | ||
) |
Set color bits of transaction set.
ts | transaction set |
color | new color bits |
int rpmtsSetDBMode | ( | rpmts | ts, |
int | dbmode | ||
) |
Set the transaction database mode.
Only permitted when when backing database hasn't been opened yet (ie rpmtsGetRdb(ts) == NULL)
ts | transaction set |
dbmode | O_RDONLY, O_RDWR or -1 (disable lazy opens) |
rpmtransFlags rpmtsSetFlags | ( | rpmts | ts, |
rpmtransFlags | transFlags | ||
) |
Set transaction flags, i.e.
bits that control rpmtsRun().
ts | transaction set |
transFlags | new transaction flags |
Referenced by main().
int rpmtsSetKeyring | ( | rpmts | ts, |
rpmKeyring | keyring | ||
) |
Set keyring to use for this transaction set.
Keyring can be only changed while the underlying rpm database is not yet open.
ts | transaction set |
keyring | keyring handle (NULL to free current keyring) |
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 |
rpm_color_t rpmtsSetPrefColor | ( | rpmts | ts, |
rpm_color_t | color | ||
) |
Set preferred file color.
ts | transaction set |
color | new color bits |
int rpmtsSetRootDir | ( | rpmts | ts, |
const char * | rootDir | ||
) |
Set transaction rootDir, i.e.
path to chroot(2).
ts | transaction set |
rootDir | new transaction rootDir (or NULL) |
Referenced by main().
Set transaction script file handle, i.e.
stdout/stderr on scriptlet execution
ts | transaction set |
scriptFd | new script file handle (or NULL) |
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 transaction id, i.e.
transaction time stamp.
ts | transaction set |
tid | new transaction id |
rpmVSFlags rpmtsSetVSFlags | ( | rpmts | ts, |
rpmVSFlags | vsflags | ||
) |
int rpmtsVerifyDB | ( | rpmts | ts | ) |
Verify the database used by the transaction.
ts | transaction set |
Referenced by main().
rpmVSFlags rpmtsVSFlags | ( | rpmts | ts | ) |
Get verify signatures flag(s).
ts | transaction set |