11 #include <rpm/rpmtypes.h> 12 #include <rpm/rpmte.h> 13 #include <rpm/rpmps.h> 14 #include <rpm/rpmsw.h> 15 #include <rpm/rpmpgp.h> 16 #include <rpm/rpmfi.h> 17 #include <rpm/rpmcallback.h> 60 #define _noTransScripts \ 61 ( RPMTRANS_FLAG_NOPRE | \ 62 RPMTRANS_FLAG_NOPOST | \ 63 RPMTRANS_FLAG_NOPREUN | \ 64 RPMTRANS_FLAG_NOPOSTUN | \ 65 RPMTRANS_FLAG_NOPRETRANS | \ 66 RPMTRANS_FLAG_NOPOSTTRANS \ 69 #define _noTransTriggers \ 70 ( RPMTRANS_FLAG_NOTRIGGERPREIN | \ 71 RPMTRANS_FLAG_NOTRIGGERIN | \ 72 RPMTRANS_FLAG_NOTRIGGERUN | \ 73 RPMTRANS_FLAG_NOTRIGGERPOSTUN \ 77 #define RPMTRANS_FLAG_NOPAYLOAD 0 78 #define RPMTRANS_FLAG_APPLYONLY 0 79 #define RPMTRANS_FLAG_KEEPOBSOLETE 0 80 #define RPMTRANS_FLAG_DIRSTASH 0 81 #define RPMTRANS_FLAG_REPACKAGE 0 82 #define RPMTRANS_FLAG_PKGCOMMIT 0 83 #define RPMTRANS_FLAG_PKGUNDO 0 84 #define RPMTRANS_FLAG_COMMIT 0 85 #define RPMTRANS_FLAG_UNDO 0 86 #define RPMTRANS_FLAG_REVERSE 0 87 #define RPMTRANS_FLAG_NOSUGGEST 0 88 #define RPMTRANS_FLAG_ADDINDEPS 0 112 #define _RPMVSF_NODIGESTS \ 113 ( RPMVSF_NOSHA1HEADER | \ 114 RPMVSF_NOMD5HEADER | \ 118 #define _RPMVSF_NOSIGNATURES \ 119 ( RPMVSF_NODSAHEADER | \ 120 RPMVSF_NORSAHEADER | \ 124 #define _RPMVSF_NOHEADER \ 125 ( RPMVSF_NOSHA1HEADER | \ 126 RPMVSF_NOMD5HEADER | \ 127 RPMVSF_NODSAHEADER | \ 130 #define _RPMVSF_NOPAYLOAD \ 284 const void * keyp,
size_t keylen);
331 int (*solve) (
rpmts ts,
rpmds ds,
const void * data),
332 const void * solveData);
561 const fnpyKey key,
int upgrade,
int rpmtsSetKeyring(rpmts ts, rpmKeyring keyring)
Set keyring to use for this transaction set.
int rpmtsSetRootDir(rpmts ts, const char *rootDir)
Set transaction rootDir, i.e.
enum rpmCallbackType_e rpmCallbackType
Bit(s) to identify progress callbacks.
void *(* rpmCallbackFunction)(const void *h, const rpmCallbackType what, const rpm_loff_t amount, const rpm_loff_t total, fnpyKey key, rpmCallbackData data)
Function pointer type for rpmtsSetNotifyCallback() triggered by rpmtsNotify()
int rpmtsGetDBMode(rpmts ts)
Return the transaction database mode.
int rpmtsInitDB(rpmts ts, int dbmode)
Initialize the database used by the transaction.
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)
Return transaction database iterator.
int rpmtsSetDBMode(rpmts ts, int dbmode)
Set the transaction database mode.
int rpmtsCheck(rpmts ts)
Perform dependency resolution on the transaction set.
struct _FD_s * FD_t
RPM IO file descriptor type.
void * rpmtsNotify(rpmts ts, rpmte te, rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total)
Perform transaction progress notify callback.
rpmtxn rpmtxnEnd(rpmtxn txn)
Destroy transaction (lock) handle.
rpm_tid_t rpmtsSetTid(rpmts ts, rpm_tid_t tid)
Set transaction id, i.e.
rpmps rpmtsProblems(rpmts ts)
Return current transaction set problems.
int rpmtsCloseDB(rpmts ts)
Close the database used by the transaction.
rpmtsi rpmtsiFree(rpmtsi tsi)
Destroy transaction element iterator.
rpm_tid_t rpmtsGetTid(rpmts ts)
Get transaction id, i.e.
rpmRC rpmtsImportHeader(rpmtxn txn, Header h, rpmFlags flags)
Import a header into the rpmdb.
int rpmtsAddReinstallElement(rpmts ts, Header h, const fnpyKey key)
Add package to be reinstalled to transaction set.
rpmtxn rpmtxnBegin(rpmts ts, rpmtxnFlags flags)
Create a transaction (lock) handle.
rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
Retrieve operation timestamp from a transaction set.
enum rpmtsOpX_e rpmtsOpX
Indices for timestamps.
int rpmtsSetSolveCallback(rpmts ts, int(*solve)(rpmts ts, rpmds ds, const void *data), const void *solveData)
Set dependency solver callback.
const char * rpmtsRootDir(rpmts ts)
Get transaction rootDir, i.e.
int rpmtsOpenDB(rpmts ts, int dbmode)
Open the database used by the transaction.
void rpmtsCleanProblems(rpmts ts)
Clean current transaction problem set.
rpmFlags rpmprobFilterFlags
We pass these around as an array with a sentinel.
rpmRC rpmtsImportPubkey(rpmts ts, const unsigned char *pkt, size_t pktlen)
Import public key packet(s).
void rpmtsEmpty(rpmts ts)
Re-create an empty transaction set.
struct rpmKeyring_s * rpmKeyring
struct rpmPlugins_s * rpmPlugins
int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
Process all package elements in a transaction set.
struct rpmdbMatchIterator_s * rpmdbMatchIterator
rpmtransFlags rpmtsFlags(rpmts ts)
Get transaction flags, i.e.
int rpmtsVerifyDB(rpmts ts)
Verify the database used by the transaction.
rpmPlugins rpmtsPlugins(rpmts ts)
Get the plugins associated with a transaction set.
rpmte rpmtsiNext(rpmtsi tsi, rpmElementTypes types)
Return next transaction element of type.
int rpmtsOrder(rpmts ts)
Determine package order in a transaction set according to dependencies.
rpmprobFilterFlags rpmtsFilterFlags(rpmts ts)
Get problem ignore bit mask, i.e.
rpmVSFlags_e
Bit(s) to control digest and signature verification.
int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
Add package to be erased to transaction set.
rpmte rpmtsElement(rpmts ts, int ix)
Return (ordered) transaction set element.
rpmtsi rpmtsiInit(rpmts ts)
Create transaction element iterator.
int rpmtsAddInstallElement(rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation *relocs)
Add package to be installed to transaction set.
Cumulative statistics for an operation.
rpmdb rpmtsGetRdb(rpmts ts)
Get transaction set database handle.
rpm_color_t rpmtsSetColor(rpmts ts, rpm_color_t color)
Set color bits of transaction set.
rpm_color_t rpmtsPrefColor(rpmts ts)
Retrieve preferred file color.
int rpmtsNElements(rpmts ts)
Return number of (ordered) transaction set elements.
rpmts rpmtsFree(rpmts ts)
Destroy transaction set, closing the database as well.
rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
Set verify signatures flag(s).
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd)
Set transaction script file handle, i.e.
rpmKeyring rpmtsGetKeyring(rpmts ts, int autoload)
Retrieve handle for keyring used for this transaction set.
FD_t rpmtsScriptFd(rpmts ts)
Get transaction script file handle, i.e.
rpmtransFlags_e
Bit(s) to control rpmtsRun() operation.
rpmtsOpX_e
Indices for timestamps.
rpmVSFlags rpmtsVSFlags(rpmts ts)
Get verify signatures flag(s).
int rpmtsRebuildDB(rpmts ts)
Rebuild the database used by the transaction.
enum rpmRC_e rpmRC
Package read return codes.
void rpmtsClean(rpmts ts)
Free memory needed only for dependency checks and ordering.
rpm_color_t rpmtsSetPrefColor(rpmts ts, rpm_color_t color)
Set preferred file color.
rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
Set transaction flags, i.e.
rpm_color_t rpmtsColor(rpmts ts)
Retrieve color bits of transaction set.
rpmts rpmtsCreate(void)
Create an empty transaction set.
int rpmtsSetNotifyCallback(rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData)
Set transaction notify callback function and argument.
rpmts rpmtsLink(rpmts ts)
Reference a transaction set instance.
struct headerToken_s * Header
RPM header and data retrieval types.