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