rpm  4.15.1
Macros | Typedefs | Enumerations | Functions | Variables

Structures and prototypes used for an "rpmts" transaction set. More...

#include <sys/types.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmte.h>
#include <rpm/rpmps.h>
#include <rpm/rpmsw.h>
#include <rpm/rpmpgp.h>
#include <rpm/rpmfi.h>
#include <rpm/rpmcallback.h>
Include dependency graph for rpmts.h:

Go to the source code of this file.

Macros

#define _noTransScripts
 
#define _noTransTriggers
 
#define RPMTRANS_FLAG_NOPAYLOAD   0
 
#define RPMTRANS_FLAG_APPLYONLY   0
 
#define RPMTRANS_FLAG_KEEPOBSOLETE   0
 
#define RPMTRANS_FLAG_DIRSTASH   0
 
#define RPMTRANS_FLAG_REPACKAGE   0
 
#define RPMTRANS_FLAG_PKGCOMMIT   0
 
#define RPMTRANS_FLAG_PKGUNDO   0
 
#define RPMTRANS_FLAG_COMMIT   0
 
#define RPMTRANS_FLAG_UNDO   0
 
#define RPMTRANS_FLAG_REVERSE   0
 
#define RPMTRANS_FLAG_NOSUGGEST   0
 
#define RPMTRANS_FLAG_ADDINDEPS   0
 
#define RPMVSF_MASK_NODIGESTS
 
#define _RPMVSF_NODIGESTS   RPMVSF_MASK_NODIGESTS
 
#define RPMVSF_MASK_NOSIGNATURES
 
#define _RPMVSF_NOSIGNATURES   RPMVSF_MASK_NOSIGNATURES
 
#define RPMVSF_MASK_NOHEADER
 
#define _RPMVSF_NOHEADER   RPMVSF_MASK_NOHEADER
 
#define RPMVSF_MASK_NOPAYLOAD
 
#define _RPMVSF_NOPAYLOAD   RPMVSF_MASK_NOPAYLOAD
 
#define RPMSIG_VERIFIABLE_TYPE   (RPMSIG_DIGEST_TYPE|RPMSIG_SIGNATURE_TYPE)
 
#define RPMSIG_UNVERIFIED_TYPE   (1 << 30)
 

Typedefs

typedef rpmFlags rpmtransFlags
 
typedef rpmFlags rpmVSFlags
 
typedef enum rpmtsOpX_e rpmtsOpX
 Indices for timestamps. More...
 
typedef rpmFlags rpmtxnFlags
 

Enumerations

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_NOPLUGINS = (1 << 7), RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), RPMTRANS_FLAG_NOCAPS = (1 << 9), 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_NOPRETRANS = (1 << 24),
  RPMTRANS_FLAG_NOPOSTTRANS = (1 << 25), RPMTRANS_FLAG_NOMD5 = (1 << 27), RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), RPMTRANS_FLAG_NOCONFIGS = (1 << 30),
  RPMTRANS_FLAG_DEPLOOPS = (1 << 31)
}
 Bit(s) to control rpmtsRun() operation. More...
 
enum  rpmVSFlags_e {
  RPMVSF_DEFAULT = 0, RPMVSF_NOHDRCHK = (1 << 0), RPMVSF_NEEDPAYLOAD = (1 << 1), RPMVSF_NOSHA1HEADER = (1 << 8),
  RPMVSF_NOSHA256HEADER = (1 << 9), RPMVSF_NODSAHEADER = (1 << 10), RPMVSF_NORSAHEADER = (1 << 11), RPMVSF_NOPAYLOAD = (1 << 16),
  RPMVSF_NOMD5 = (1 << 17), RPMVSF_NODSA = (1 << 18), RPMVSF_NORSA = (1 << 19)
}
 Bit(s) to control digest and signature verification. More...
 
enum  { RPMSIG_NONE_TYPE = 0, RPMSIG_DIGEST_TYPE = (1 << 0), RPMSIG_SIGNATURE_TYPE = (1 << 1), RPMSIG_OTHER_TYPE = (1 << 2) }
 
enum  rpmtsOpX_e {
  RPMTS_OP_TOTAL = 0, RPMTS_OP_CHECK = 1, RPMTS_OP_ORDER = 2, RPMTS_OP_FINGERPRINT = 3,
  RPMTS_OP_INSTALL = 5, RPMTS_OP_ERASE = 6, RPMTS_OP_SCRIPTLETS = 7, RPMTS_OP_COMPRESS = 8,
  RPMTS_OP_UNCOMPRESS = 9, RPMTS_OP_DIGEST = 10, RPMTS_OP_SIGNATURE = 11, RPMTS_OP_DBADD = 12,
  RPMTS_OP_DBREMOVE = 13, RPMTS_OP_DBGET = 14, RPMTS_OP_DBPUT = 15, RPMTS_OP_DBDEL = 16,
  RPMTS_OP_VERIFY = 17, RPMTS_OP_MAX = 18
}
 Indices for timestamps. More...
 
enum  rpmtxnFlags_e { RPMTXN_READ = (1 << 0), RPMTXN_WRITE = (1 << 1) }
 

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 rpmtsImportHeader (rpmtxn txn, Header h, rpmFlags flags)
 Import a header into the rpmdb. 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...
 
rpmVSFlags rpmtsVfyFlags (rpmts ts)
 Get package verify flag(s). More...
 
rpmVSFlags rpmtsSetVfyFlags (rpmts ts, rpmVSFlags vfyflags)
 Set package verify flag(s). More...
 
int rpmtsVfyLevel (rpmts ts)
 Get enforced package verify level. More...
 
int rpmtsSetVfyLevel (rpmts ts, int vfylevel)
 Set enforced package verify level. 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 rpmtsAddReinstallElement (rpmts ts, Header h, const fnpyKey key)
 Add package to be reinstalled to transaction set. More...
 
int rpmtsAddEraseElement (rpmts ts, Header h, int dboffset)
 Add package to be erased to transaction set. More...
 
rpmtxn rpmtxnBegin (rpmts ts, rpmtxnFlags flags)
 Create a transaction (lock) handle. More...
 
rpmtxn rpmtxnEnd (rpmtxn txn)
 Destroy transaction (lock) handle. More...
 
rpmtsi rpmtsiFree (rpmtsi tsi)
 Destroy transaction element iterator. More...
 
rpmtsi rpmtsiInit (rpmts ts)
 Create transaction element iterator. More...
 
rpmte rpmtsiNext (rpmtsi tsi, rpmElementTypes types)
 Return next transaction element of type. More...
 

Variables

int _rpmts_stats
 

Detailed Description

Structures and prototypes used for an "rpmts" transaction set.

Definition in file rpmts.h.

Macro Definition Documentation

◆ _noTransScripts

#define _noTransScripts
Value:
RPMTRANS_FLAG_NOPOST | \
RPMTRANS_FLAG_NOPREUN | \
RPMTRANS_FLAG_NOPOSTUN | \
RPMTRANS_FLAG_NOPRETRANS | \
RPMTRANS_FLAG_NOPOSTTRANS \
)

Definition at line 61 of file rpmts.h.

◆ _noTransTriggers

#define _noTransTriggers
Value:
RPMTRANS_FLAG_NOTRIGGERIN | \
RPMTRANS_FLAG_NOTRIGGERUN | \
RPMTRANS_FLAG_NOTRIGGERPOSTUN \
)

Definition at line 70 of file rpmts.h.

◆ _RPMVSF_NODIGESTS

#define _RPMVSF_NODIGESTS   RPMVSF_MASK_NODIGESTS

Definition at line 118 of file rpmts.h.

◆ _RPMVSF_NOHEADER

#define _RPMVSF_NOHEADER   RPMVSF_MASK_NOHEADER

Definition at line 132 of file rpmts.h.

◆ _RPMVSF_NOPAYLOAD

#define _RPMVSF_NOPAYLOAD   RPMVSF_MASK_NOPAYLOAD

Definition at line 139 of file rpmts.h.

◆ _RPMVSF_NOSIGNATURES

#define _RPMVSF_NOSIGNATURES   RPMVSF_MASK_NOSIGNATURES

Definition at line 125 of file rpmts.h.

◆ RPMSIG_UNVERIFIED_TYPE

#define RPMSIG_UNVERIFIED_TYPE   (1 << 30)

Definition at line 149 of file rpmts.h.

◆ RPMSIG_VERIFIABLE_TYPE

#define RPMSIG_VERIFIABLE_TYPE   (RPMSIG_DIGEST_TYPE|RPMSIG_SIGNATURE_TYPE)

Definition at line 148 of file rpmts.h.

◆ RPMTRANS_FLAG_ADDINDEPS

#define RPMTRANS_FLAG_ADDINDEPS   0

Definition at line 89 of file rpmts.h.

◆ RPMTRANS_FLAG_APPLYONLY

#define RPMTRANS_FLAG_APPLYONLY   0

Definition at line 79 of file rpmts.h.

◆ RPMTRANS_FLAG_COMMIT

#define RPMTRANS_FLAG_COMMIT   0

Definition at line 85 of file rpmts.h.

◆ RPMTRANS_FLAG_DIRSTASH

#define RPMTRANS_FLAG_DIRSTASH   0

Definition at line 81 of file rpmts.h.

◆ RPMTRANS_FLAG_KEEPOBSOLETE

#define RPMTRANS_FLAG_KEEPOBSOLETE   0

Definition at line 80 of file rpmts.h.

◆ RPMTRANS_FLAG_NOPAYLOAD

#define RPMTRANS_FLAG_NOPAYLOAD   0

Definition at line 78 of file rpmts.h.

◆ RPMTRANS_FLAG_NOSUGGEST

#define RPMTRANS_FLAG_NOSUGGEST   0

Definition at line 88 of file rpmts.h.

◆ RPMTRANS_FLAG_PKGCOMMIT

#define RPMTRANS_FLAG_PKGCOMMIT   0

Definition at line 83 of file rpmts.h.

◆ RPMTRANS_FLAG_PKGUNDO

#define RPMTRANS_FLAG_PKGUNDO   0

Definition at line 84 of file rpmts.h.

◆ RPMTRANS_FLAG_REPACKAGE

#define RPMTRANS_FLAG_REPACKAGE   0

Definition at line 82 of file rpmts.h.

◆ RPMTRANS_FLAG_REVERSE

#define RPMTRANS_FLAG_REVERSE   0

Definition at line 87 of file rpmts.h.

◆ RPMTRANS_FLAG_UNDO

#define RPMTRANS_FLAG_UNDO   0

Definition at line 86 of file rpmts.h.

◆ RPMVSF_MASK_NODIGESTS

#define RPMVSF_MASK_NODIGESTS
Value:
RPMVSF_NOSHA256HEADER | \
RPMVSF_NOPAYLOAD | \
RPMVSF_NOMD5 )

Definition at line 113 of file rpmts.h.

◆ RPMVSF_MASK_NOHEADER

#define RPMVSF_MASK_NOHEADER
Value:
RPMVSF_NOSHA256HEADER | \
RPMVSF_NODSAHEADER | \
RPMVSF_NORSAHEADER )

Definition at line 127 of file rpmts.h.

◆ RPMVSF_MASK_NOPAYLOAD

#define RPMVSF_MASK_NOPAYLOAD
Value:
RPMVSF_NOPAYLOAD | \
RPMVSF_NODSA | \
RPMVSF_NORSA )

Definition at line 134 of file rpmts.h.

◆ RPMVSF_MASK_NOSIGNATURES

#define RPMVSF_MASK_NOSIGNATURES
Value:
RPMVSF_NORSAHEADER | \
RPMVSF_NODSA | \
RPMVSF_NORSA )

Definition at line 120 of file rpmts.h.

Typedef Documentation

◆ rpmtransFlags

Definition at line 59 of file rpmts.h.

◆ rpmtxnFlags

Definition at line 179 of file rpmts.h.

◆ rpmVSFlags

Definition at line 111 of file rpmts.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RPMSIG_NONE_TYPE 
RPMSIG_DIGEST_TYPE 
RPMSIG_SIGNATURE_TYPE 
RPMSIG_OTHER_TYPE 

Definition at line 141 of file rpmts.h.

◆ rpmtxnFlags_e

Enumerator
RPMTXN_READ 
RPMTXN_WRITE 

Definition at line 175 of file rpmts.h.

Variable Documentation

◆ _rpmts_stats

int _rpmts_stats