rpm  5.4.14
Files | Typedefs | Enumerations | Functions | Variables
RPM Transaction Set API (RPMTS)
Collaboration diagram for RPM Transaction Set API (RPMTS):

Files

file  depends.c
 
file  psm.c
 Package state machine to handle a package from a transaction set.
 
file  rpmlib.h
 In Memoriam: Steve Taylor stayl.nosp@m.or@r.nosp@m.edhat.nosp@m..com was here, now he's not.
 
file  rpmte.h
 Structures used for an "rpmte" transaction element.
 
file  rpmts.h
 Structures and prototypes used for an "rpmts" transaction set.
 
file  transaction.c
 

Typedefs

typedef struct rpmpsm_s * rpmpsm
 Package state machine data. More...
 
typedef int alNum
 An added/available package retrieval index. More...
 
typedef pgpVSFlags rpmVSFlags
 Bit(s) to control digest and signature verification. More...
 
typedef enum rpmdepFlags_e rpmdepFlags
 Bit(s) to control rpmtsCheck() and rpmtsOrder() operation. More...
 
typedef enum rpmtransFlags_e rpmtransFlags
 Bit(s) to control rpmtsRun() operation. More...
 
typedef enum rpmtsOpX_e rpmtsOpX
 Indices for timestamps. More...
 
typedef enum rpmTSType_e rpmTSType
 Transaction Types. More...
 
typedef enum tsStage_e tsmStage
 
typedef struct rpmts_s * rpmts
 The RPM Transaction Set. More...
 
typedef voidalKey
 An added/available package retrieval key. More...
 

Enumerations

enum  rpmdepFlags_e {
  RPMDEPS_FLAG_NONE = 0, RPMDEPS_FLAG_NOUPGRADE = (1 << 0), RPMDEPS_FLAG_NOREQUIRES = (1 << 1), RPMDEPS_FLAG_NOCONFLICTS = (1 << 2),
  RPMDEPS_FLAG_NOOBSOLETES = (1 << 3), RPMDEPS_FLAG_NOPARENTDIRS = (1 << 4), RPMDEPS_FLAG_NOLINKTOS = (1 << 5), RPMDEPS_FLAG_ANACONDA = (1 << 6),
  RPMDEPS_FLAG_NOSUGGEST = (1 << 7), RPMDEPS_FLAG_ADDINDEPS = (1 << 8), RPMDEPS_FLAG_DEPLOOPS = (1 << 9)
}
 Bit(s) to control rpmtsCheck() and rpmtsOrder() operation. More...
 
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_NOCONTEXTS = (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_APPLYONLY = (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_NORPMDB = (1 << 25), RPMTRANS_FLAG_NOPOLICY = (1 << 26), RPMTRANS_FLAG_NOFDIGESTS = (1 << 27),
  RPMTRANS_FLAG_NOPRETRANS = (1 << 28), RPMTRANS_FLAG_NOPOSTTRANS = (1 << 29), RPMTRANS_FLAG_NOCONFIGS = (1 << 30)
}
 Bit(s) to control rpmtsRun() operation. More...
 
enum  rpmtsOpX_e {
  RPMTS_OP_TOTAL = 0, RPMTS_OP_CHECK = 1, RPMTS_OP_ORDER = 2, RPMTS_OP_FINGERPRINT = 3,
  RPMTS_OP_REPACKAGE = 4, 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_READHDR = 17, RPMTS_OP_HDRLOAD = 18, RPMTS_OP_HDRGET = 19,
  RPMTS_OP_DEBUG = 20, RPMTS_OP_MAX = 20
}
 Indices for timestamps. More...
 
enum  rpmTSType_e { RPMTRANS_TYPE_NORMAL = 0, RPMTRANS_TYPE_ROLLBACK = (1 << 0), RPMTRANS_TYPE_AUTOROLLBACK = (1 << 1) }
 Transaction Types. More...
 
enum  tsStage_e { TSM_UNKNOWN = 0, TSM_INSTALL = 7, TSM_ERASE = 8 }
 

Functions

rpmRC rpmtsRollback (rpmts rbts, rpmprobFilterFlags ignoreSet, int running, rpmte rbte)
 Rollback a failed transaction. More...
 
rpmts rpmtsUnlink (rpmts ts, const char *msg)
 Unreference a transaction instance. More...
 
rpmts rpmtsLink (rpmts ts, const char *msg)
 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...
 
static int rpmtsInitDB (rpmts ts, int dbmode)
 Initialize the database used by the transaction. More...
 
int rpmtsRebuildDB (rpmts ts)
 Rebuild the database used by the transaction. More...
 
static int rpmtsVerifyDB (rpmts ts)
 Verify the database used by the transaction. More...
 
rpmmi rpmtsInitIterator (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)
 Return transaction database iterator. More...
 
rpmRC rpmtsFindPubkey (rpmts ts, void *_dig)
 Retrieve pubkey from rpm database. More...
 
int rpmtsCloseSDB (rpmts ts)
 Close the database used by the transaction to solve dependencies. More...
 
int rpmtsOpenSDB (rpmts ts, int dbmode)
 Open the database used by the transaction to solve dependencies. More...
 
int rpmtsSolve (rpmts ts, rpmds ds, const void *data)
 Attempt to solve a needed dependency using the solve database. More...
 
int rpmtsAvailable (rpmts ts, const rpmds ds)
 Attempt to solve a needed dependency using memory resident tables. More...
 
int rpmtsSetSolveCallback (rpmts ts, int(*solve)(rpmts ts, rpmds ds, const void *data), const void *solveData)
 Set dependency solver callback. More...
 
rpmTSType rpmtsType (rpmts ts)
 Return the type of a transaction. More...
 
void rpmtsSetType (rpmts ts, rpmTSType type)
 Set transaction type. More...
 
rpmuint32_t rpmtsARBGoal (rpmts ts)
 Return the autorollback goal. More...
 
void rpmtsSetARBGoal (rpmts ts, rpmuint32_t goal)
 Set autorollback goal. More...
 
rpmps rpmtsProblems (rpmts ts)
 Return current transaction set problems. More...
 
void rpmtsCleanDig (rpmts ts)
 Free signature verification data. 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...
 
voidrpmtsGetKeyring (rpmts ts, int autoload)
 Get transaction keyring. More...
 
int rpmtsSetKeyring (rpmts ts, void *_keyring)
 Set transaction keyring. More...
 
rpmVSFlags rpmtsVSFlags (rpmts ts)
 Get verify signatures flag(s). More...
 
rpmVSFlags rpmtsSetVSFlags (rpmts ts, rpmVSFlags vsflags)
 Set verify signatures flag(s). More...
 
int rpmtsUnorderedSuccessors (rpmts ts, int first)
 Set index of 1st element of successors. More...
 
const char * rpmtsRootDir (rpmts ts)
 Get transaction rootDir, i.e. More...
 
void rpmtsSetRootDir (rpmts ts, const char *rootDir)
 Set transaction rootDir, i.e. More...
 
const char * rpmtsCurrDir (rpmts ts)
 Get transaction currDir, i.e. More...
 
void rpmtsSetCurrDir (rpmts ts, const char *currDir)
 Set transaction currDir, i.e. More...
 
int rpmtsSELinuxEnabled (rpmts ts)
 Get selinuxEnabled flag, i.e. More...
 
int rpmtsChrootDone (rpmts ts)
 Get chrootDone flag, i.e. More...
 
int rpmtsSetChrootDone (rpmts ts, int chrootDone)
 Set chrootDone flag, i.e. More...
 
rpmuint32_t rpmtsGetTid (rpmts ts)
 Get transaction id, i.e. More...
 
rpmuint32_t rpmtsSetTid (rpmts ts, rpmuint32_t tid)
 Set transaction id, i.e. More...
 
pgpDig rpmtsDig (rpmts ts)
 Get OpenPGP packet parameters, i.e. More...
 
pgpDigParams rpmtsPubkey (const rpmts ts)
 Return OpenPGP pubkey constants. More...
 
rpmdb rpmtsGetRdb (rpmts ts)
 Get transaction set database handle. More...
 
rpmPRCO rpmtsPRCO (rpmts ts)
 Get transaction set dependencies. More...
 
int rpmtsInitDSI (const rpmts ts)
 Initialize disk space info for each and every mounted file systems. More...
 
void rpmtsUpdateDSI (const rpmts ts, dev_t dev, rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize, int _action)
 Update disk space info for a file. More...
 
void rpmtsCheckDSIProblems (const rpmts ts, const rpmte te)
 Check a transaction element for disk space problems. More...
 
voidrpmtsNotify (rpmts ts, rpmte te, rpmCallbackType what, rpmuint64_t amount, rpmuint64_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...
 
rpmdepFlags rpmtsDFlags (rpmts ts)
 Get dependency flags, i.e. More...
 
rpmdepFlags rpmtsSetDFlags (rpmts ts, rpmdepFlags depFlags)
 Set dependency flags, i.e. More...
 
Spec rpmtsSpec (rpmts ts)
 Get spec control structure from transaction set. More...
 
Spec rpmtsSetSpec (rpmts ts, Spec spec)
 Set a spec control structure in transaction set. More...
 
rpmte rpmtsRelocateElement (rpmts ts)
 Get current relocate transaction element. More...
 
rpmte rpmtsSetRelocateElement (rpmts ts, rpmte relocateElement)
 Set current relocate transaction element. More...
 
tsmStage rpmtsGoal (rpmts ts)
 Retrieve goal of transaction set. More...
 
tsmStage rpmtsSetGoal (rpmts ts, tsmStage goal)
 Set goal of transaction set. More...
 
int rpmtsDBMode (rpmts ts)
 Retrieve dbmode of transaction set. More...
 
int rpmtsSetDBMode (rpmts ts, int dbmode)
 Set dbmode of transaction set. More...
 
rpmuint32_t rpmtsColor (rpmts ts)
 Retrieve color bits of transaction set. More...
 
rpmuint32_t rpmtsPrefColor (rpmts ts)
 Retrieve preferred file color. More...
 
rpmuint32_t rpmtsSetColor (rpmts ts, rpmuint32_t color)
 Set color bits of transaction set. More...
 
rpmop rpmtsOp (rpmts ts, rpmtsOpX opx)
 Retrieve operation timestamp from 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, uint32_t hdrNum)
 Add package to be erased to transaction set. More...
 

Variables

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...
 

Detailed Description

Typedef Documentation

typedef void* alKey

An added/available package retrieval key.

Definition at line 19 of file rpmtypes.h.

typedef int alNum

An added/available package retrieval index.

Definition at line 23 of file rpmal.h.

typedef enum rpmdepFlags_e rpmdepFlags

Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.

Todo:
Move to rpmts.h.
typedef struct rpmpsm_s* rpmpsm

Package state machine data.

Definition at line 13 of file psm.h.

Bit(s) to control rpmtsRun() operation.

Todo:
Move to rpmts.h.
typedef struct rpmts_s* rpmts

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.

Definition at line 14 of file rpmtypes.h.

typedef enum rpmtsOpX_e rpmtsOpX

Indices for timestamps.

typedef enum rpmTSType_e rpmTSType

Transaction Types.

Bit(s) to control digest and signature verification.

Definition at line 35 of file rpmts.h.

typedef enum tsStage_e tsmStage

Enumeration Type Documentation

Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.

Todo:
Move to rpmts.h.
Enumerator
RPMDEPS_FLAG_NONE 
RPMDEPS_FLAG_NOUPGRADE 

from –noupgrade

RPMDEPS_FLAG_NOREQUIRES 

from –norequires

RPMDEPS_FLAG_NOCONFLICTS 

from –noconflicts

RPMDEPS_FLAG_NOOBSOLETES 

from –noobsoletes

RPMDEPS_FLAG_NOPARENTDIRS 

from –noparentdirs

RPMDEPS_FLAG_NOLINKTOS 

from –nolinktos

RPMDEPS_FLAG_ANACONDA 

from –anaconda

RPMDEPS_FLAG_NOSUGGEST 

from –nosuggest

RPMDEPS_FLAG_ADDINDEPS 

from –aid

RPMDEPS_FLAG_DEPLOOPS 

from –deploops

Definition at line 41 of file rpmts.h.

Bit(s) to control rpmtsRun() operation.

Todo:
Move to rpmts.h.
Enumerator
RPMTRANS_FLAG_NONE 
RPMTRANS_FLAG_TEST 

from –test

RPMTRANS_FLAG_BUILD_PROBS 

don't process payload

RPMTRANS_FLAG_NOSCRIPTS 

from –noscripts

RPMTRANS_FLAG_JUSTDB 

from –justdb

RPMTRANS_FLAG_NOTRIGGERS 

from –notriggers

RPMTRANS_FLAG_NODOCS 

from –excludedocs

RPMTRANS_FLAG_ALLFILES 

from –allfiles

RPMTRANS_FLAG_NOCONTEXTS 

from –nocontexts

RPMTRANS_FLAG_DIRSTASH 

from –dirstash

RPMTRANS_FLAG_REPACKAGE 

from –repackage

RPMTRANS_FLAG_PKGCOMMIT 
RPMTRANS_FLAG_PKGUNDO 
RPMTRANS_FLAG_COMMIT 
RPMTRANS_FLAG_UNDO 
RPMTRANS_FLAG_APPLYONLY 
RPMTRANS_FLAG_NOTRIGGERPREIN 

from –notriggerprein

RPMTRANS_FLAG_NOPRE 

from –nopre

RPMTRANS_FLAG_NOPOST 

from –nopost

RPMTRANS_FLAG_NOTRIGGERIN 

from –notriggerin

RPMTRANS_FLAG_NOTRIGGERUN 

from –notriggerun

RPMTRANS_FLAG_NOPREUN 

from –nopreun

RPMTRANS_FLAG_NOPOSTUN 

from –nopostun

RPMTRANS_FLAG_NOTRIGGERPOSTUN 

from –notriggerpostun

RPMTRANS_FLAG_NOPAYLOAD 
RPMTRANS_FLAG_NORPMDB 

from –norpmdb

RPMTRANS_FLAG_NOPOLICY 

from –nopolicy

RPMTRANS_FLAG_NOFDIGESTS 

from –nofdigests

RPMTRANS_FLAG_NOPRETRANS 

from –nopretrans

RPMTRANS_FLAG_NOPOSTTRANS 

from –noposttrans

RPMTRANS_FLAG_NOCONFIGS 

from –noconfigs

Definition at line 59 of file rpmts.h.

enum rpmtsOpX_e

Indices for timestamps.

Enumerator
RPMTS_OP_TOTAL 
RPMTS_OP_CHECK 
RPMTS_OP_ORDER 
RPMTS_OP_FINGERPRINT 
RPMTS_OP_REPACKAGE 
RPMTS_OP_INSTALL 
RPMTS_OP_ERASE 
RPMTS_OP_SCRIPTLETS 
RPMTS_OP_COMPRESS 
RPMTS_OP_UNCOMPRESS 
RPMTS_OP_DIGEST 
RPMTS_OP_SIGNATURE 
RPMTS_OP_DBADD 
RPMTS_OP_DBREMOVE 
RPMTS_OP_DBGET 
RPMTS_OP_DBPUT 
RPMTS_OP_DBDEL 
RPMTS_OP_READHDR 
RPMTS_OP_HDRLOAD 
RPMTS_OP_HDRGET 
RPMTS_OP_DEBUG 
RPMTS_OP_MAX 

Definition at line 122 of file rpmts.h.

Transaction Types.

Enumerator
RPMTRANS_TYPE_NORMAL 
RPMTRANS_TYPE_ROLLBACK 
RPMTRANS_TYPE_AUTOROLLBACK 

Definition at line 150 of file rpmts.h.

enum tsStage_e
Enumerator
TSM_UNKNOWN 
TSM_INSTALL 
TSM_ERASE 

Definition at line 158 of file rpmts.h.

Function Documentation

int rpmtsAddEraseElement ( rpmts  ts,
Header  h,
uint32_t  hdrNum 
)

Add package to be erased to transaction set.

Parameters
tstransaction set
hheader
hdrNumrpm database instance
Returns
0 on success

Definition at line 834 of file depends.c.

References NULL, oc, rc, removePackage(), RPMAL_NOMATCH, rpmtsEraseDebuginfo(), and void.

Referenced by findErases(), if(), rpmcliEraseElement(), rpmErase(), rpmgiNext(), and verifyDependencies().

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.

Parameters
tstransaction set
hheader
keypackage retrieval key (e.g. file name)
upgradeis package being upgraded?
relocspackage file relocations
Returns
0 on success, 1 on I/O error, 2 needs capabilities

Definition at line 547 of file depends.c.

References _, _free(), alloca(), assert(), chkSuffix(), ds, ec, exit, headerGet(), headerIsEntry(), hGetColor(), memset(), msg, nplatpat, NULL, oc, p, _HE_s::p, pkgKey, pkgNEVR, platform, platpat, pos, ps, rpmDataType_u::ptr, rc, RPMAL_NOMATCH, rpmalAdd(), rpmcliPackagesTotal, RPMDEPS_FLAG_NOOBSOLETES, RPMDEPS_FLAG_NOUPGRADE, rpmdsCompare(), rpmdsDNEVR(), rpmdsFree(), rpmdsThis(), rpmExpand(), rpmExpandNumeric(), rpmfiFC(), rpmIsVerbose, rpmlog(), RPMLOG_WARNING, rpmPlatformScore(), RPMPROB_BADPLATFORM, rpmProblemString(), rpmpsAppend(), rpmpsFree(), rpmpsGetProblem(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_NAME, RPMTAG_NVRA, RPMTAG_OS, RPMTAG_PLATFORM, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, RPMTAG_SOURCERPM, rpmteA(), rpmteAddedKey(), rpmteDS(), rpmteFI(), rpmteFree(), rpmteIsSource(), rpmteKey(), rpmteN(), rpmteNew(), rpmteO(), rpmteSetAddedKey(), rpmteSetHeader(), rpmteType(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsColor(), rpmtsDBMode(), rpmtsDFlags(), rpmtsEraseDebuginfo(), rpmtsGetRdb(), rpmtsiFree(), rpmtsiInit(), rpmtsiNext(), rpmtsOpenDB(), rpmtsProblems(), rpmDataType_u::str, strcmp(), _HE_s::tag, TR_ADDED, TR_REMOVED, void, xrealloc, and xx.

Referenced by rpmcliInstall(), rpmgiNext(), rpmInstallSourcePackage(), rpmRollback(), rpmtsSolve(), and verifyDependencies().

rpmuint32_t rpmtsARBGoal ( rpmts  ts)

Return the autorollback goal.

Parameters
tstransaction set
Returns
autorollback goal

Definition at line 879 of file rpmts.c.

References NULL.

Referenced by rpmtsRollback().

int rpmtsAvailable ( rpmts  ts,
const rpmds  ds 
)

Attempt to solve a needed dependency using memory resident tables.

Deprecated:
This function will move from rpmlib to the python bindings.
Parameters
tstransaction set
dsdependency set
Returns
0 if resolved (and added to ts), 1 not found

Definition at line 543 of file rpmts.c.

References _free(), NULL, rc, rpmalAllSatisfiesDepend(), and xrealloc.

void rpmtsCheckDSIProblems ( const rpmts  ts,
const rpmte  te 
)

Check a transaction element for disk space problems.

Parameters
tstransaction set
tecurrent transaction element

Definition at line 1230 of file rpmts.c.

References i, NULL, ps, rpmfiFC(), RPMPROB_DISKNODES, RPMPROB_DISKSPACE, RPMPROB_RDONLY, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, rpmteFI(), rpmteKey(), rpmteNEVR(), rpmtsProblems(), and ST_RDONLY.

Referenced by rpmtsPrepare().

int rpmtsChrootDone ( rpmts  ts)

Get chrootDone flag, i.e.

has chroot(2) been performed?

Parameters
tstransaction set
Returns
chrootDone flag

Definition at line 1005 of file rpmts.c.

References NULL.

Referenced by rpmpsmStage(), rpmtsPrepare(), and runScript().

void rpmtsClean ( rpmts  ts)

Free memory needed only for dependency checks and ordering.

Parameters
tstransaction set

Definition at line 596 of file rpmts.c.

References _free(), NULL, p, rpmalFree(), rpmpsFree(), rpmteCleanDS(), rpmtsCleanDig(), rpmtsiFree(), rpmtsiInit(), and rpmtsiNext().

Referenced by rpmcliImportPubkeys(), rpmcliInstall(), rpmErase(), rpmInstallSourcePackage(), rpmRollback(), and rpmtsEmpty().

void rpmtsCleanDig ( rpmts  ts)

Free signature verification data.

Parameters
tstransaction set

Definition at line 457 of file pkgio.c.

References NULL, pgpDigFree(), pgpStatsAccumulator(), rpmswAdd(), RPMTS_OP_DIGEST, RPMTS_OP_SIGNATURE, rpmtsOp(), and void.

Referenced by rpmnsProbeSignature(), rpmReadPackageFile(), rpmtsClean(), rpmVerifySignatures(), and showVerifyPackage().

int rpmtsCloseDB ( rpmts  ts)

Close the database used by the transaction.

Parameters
tstransaction set
Returns
0 on success

Definition at line 101 of file rpmts.c.

References NULL, rc, rpmdbClose(), rpmswAdd(), RPMTS_OP_DBDEL, RPMTS_OP_DBGET, RPMTS_OP_DBPUT, rpmtsOp(), and void.

Referenced by _rpmtsCheck(), ftsCacheUpdate(), rpmtsFini(), rpmtsOpenDB(), and rpmtsRebuildDB().

int rpmtsCloseSDB ( rpmts  ts)

Close the database used by the transaction to solve dependencies.

Parameters
tstransaction set
Returns
0 on success

Definition at line 222 of file rpmts.c.

References i, NULL, rc, rpmdbClose(), rpmswAdd(), RPMTS_OP_DBDEL, RPMTS_OP_DBGET, RPMTS_OP_DBPUT, rpmtsOp(), void, and xx.

Referenced by rpmtsFini().

rpmuint32_t rpmtsColor ( rpmts  ts)

Retrieve color bits of transaction set.

Parameters
tstransaction set
Returns
color bits

Definition at line 1438 of file rpmts.c.

References NULL.

Referenced by _rpmtsCheck(), checkPackageSet(), handleInstInstalledFile(), handleOverlappedFiles(), populateInstallHeader(), rpmpsmStage(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), and rpmtsSkipFiles().

rpmts rpmtsCreate ( void  )

Create an empty transaction set.

Returns
new transaction set

Definition at line 1468 of file rpmts.c.

References memset(), NULL, rpmExpandNumeric(), rpmswEnter(), rpmsxEnabled(), RPMTRANS_TYPE_NORMAL, RPMTS_OP_TOTAL, rpmtsGetPool(), rpmtsLink(), rpmtsOp(), rpmtsSolve(), TSM_UNKNOWN, void, xcalloc(), and xx.

Referenced by cpio_doio(), main(), and rpmts_new().

const char* rpmtsCurrDir ( rpmts  ts)

Get transaction currDir, i.e.

current directory before chroot(2).

Parameters
tstransaction set
Returns
transaction currDir

Definition at line 951 of file rpmts.c.

References NULL.

Referenced by rpmpsmStage(), and rpmtsPrepare().

int rpmtsDBMode ( rpmts  ts)

Retrieve dbmode of transaction set.

Parameters
tstransaction set
Returns
dbmode

Definition at line 1423 of file rpmts.c.

References NULL.

Referenced by _rpmtsCheck(), and rpmtsAddInstallElement().

rpmdepFlags rpmtsDFlags ( rpmts  ts)

Get dependency flags, i.e.

bits that control rpmtsCheck() and rpmtsOrder().

Parameters
tstransaction set
Returns
dependency flags

Definition at line 1361 of file rpmts.c.

References NULL.

Referenced by _rpmtsCheck(), checkPackageSet(), rpmgiNext(), rpmtsAddInstallElement(), rpmtsRollback(), and unsatisfiedDepend().

pgpDig rpmtsDig ( rpmts  ts)

Get OpenPGP packet parameters, i.e.

signature/pubkey constants.

Parameters
tstransaction set
Returns
signature/pubkey constants.

Definition at line 442 of file pkgio.c.

References int, NULL, pgpDigNew(), pgpSetFindPubkey(), rpmtsFindPubkey(), RPMVSF_DEFAULT, and void.

Referenced by rpmnsProbeSignature(), rpmReadPackageFile(), rpmtsFindPubkey(), rpmtsPubkey(), rpmVerifySignatures(), and showVerifyPackage().

rpmte rpmtsElement ( rpmts  ts,
int  ix 
)

Return (ordered) transaction set element.

Parameters
tstransaction set
ixtransaction element index
Returns
transaction element (or NULL)

Definition at line 1315 of file rpmts.c.

References ix, NULL, and te.

Referenced by rpmInstallSourcePackage(), rpmtsiFi(), and rpmtsiNextElement().

void rpmtsEmpty ( rpmts  ts)

Re-create an empty transaction set.

Parameters
tstransaction set

Definition at line 623 of file rpmts.c.

References NULL, oc, p, rpmteFree(), rpmtsClean(), rpmtsiFree(), rpmtsiInit(), and rpmtsiNext().

Referenced by rpmcliArgIter(), rpmcliInstall(), rpmcliVerify(), rpmErase(), rpmRollback(), rpmtsFini(), rpmtsRollback(), and verifyDependencies().

rpmprobFilterFlags rpmtsFilterFlags ( rpmts  ts)

Get problem ignore bit mask, i.e.

bits to filter encountered problems.

Parameters
tstransaction set
Returns
ignore bit mask

Definition at line 1327 of file rpmts.c.

References NULL.

Referenced by handleInstInstalledFile(), handleOverlappedFiles(), relocateFileList(), rpmtsInitDSI(), and rpmtsSanityCheck().

rpmRC rpmtsFindPubkey ( rpmts  ts,
void _dig 
)
rpmtransFlags rpmtsFlags ( rpmts  ts)

Get transaction flags, i.e.

bits that control rpmtsRun().

Parameters
tstransaction set
Returns
transaction flags

Definition at line 1332 of file rpmts.c.

References NULL, RPMTRANS_FLAG_NOCONTEXTS, rpmtsSELinuxEnabled(), and transFlags.

Referenced by _rpmtsCheck(), _rpmtsRun(), fsmSetup(), handleInstInstalledFile(), iosmSetup(), rpmpsmStage(), rpmtsFinish(), rpmtsProcess(), rpmtsRepackage(), rpmtsRollback(), rpmtsSetup(), and rpmtsSkipFiles().

rpmts rpmtsFree ( rpmts  ts)

Destroy transaction set, closing the database as well.

Parameters
tstransaction set
Returns
NULL on last dereference

Referenced by cpio_doio(), fsmTeardown(), if(), iosmTeardown(), main(), mapFreeIterator(), rpmgiFini(), rpmpsmFini(), rpmts_dealloc(), rpmts_free(), and rpmtsiFini().

void* rpmtsGetKeyring ( rpmts  ts,
int  autoload 
)

Get transaction keyring.

Parameters
tstransaction set
autoloadShould keyring be loaded? (unimplmented)
Returns
transaction keyring

Definition at line 790 of file rpmts.c.

References NULL.

rpmdb rpmtsGetRdb ( rpmts  ts)
rpmuint32_t rpmtsGetTid ( rpmts  ts)

Get transaction id, i.e.

transaction time stamp.

Parameters
tstransaction set
Returns
transaction id

Definition at line 1022 of file rpmts.c.

References NULL.

Referenced by fsmSetup(), ftsCacheUpdate(), iosmSetup(), rpmcliImportPubkey(), rpmpsmStage(), and rpmtsRollback().

tsmStage rpmtsGoal ( rpmts  ts)

Retrieve goal of transaction set.

Parameters
tstransaction set
Returns
goal

Definition at line 1408 of file rpmts.c.

References NULL, and TSM_UNKNOWN.

static int rpmtsInitDB ( rpmts  ts,
int  dbmode 
)
inlinestatic

Initialize the database used by the transaction.

Deprecated:
An explicit rpmdbInit() is never needed.
Parameters
tstransaction set
dbmodeO_RDONLY or O_RDWR
Returns
0 on success

Definition at line 473 of file rpmts.h.

int rpmtsInitDSI ( const rpmts  ts)

Initialize disk space info for each and every mounted file systems.

Parameters
tstransaction set
Returns
0 on success

Definition at line 1065 of file rpmts.c.

References _free(), D_, i, memset(), NULL, rc, rpmGetFilesystemList(), rpmlog(), RPMLOG_DEBUG, RPMPROB_FILTER_DISKSPACE, rpmtsFilterFlags(), ST_RDONLY, and xcalloc().

Referenced by rpmtsSetup(), and unsatisfiedDepend().

rpmmi rpmtsInitIterator ( const rpmts  ts,
rpmTag  rpmtag,
const void keyp,
size_t  keylen 
)

Return transaction database iterator.

Parameters
tstransaction set
rpmtagrpm tag
keypkey data (NULL for sequential access)
keylenkey data length (0 will use strlen(keyp))
Returns
NULL on failure

Definition at line 212 of file rpmts.c.

References mi, NULL, rpmmiInit(), and rpmtsOpenDB().

Referenced by checkDependentConflicts(), checkDependentPackages(), ftsCacheUpdate(), IDTXload(), if(), rpmcliEraseElement(), rpmcliInstall(), rpmErase(), rpmgiInitFilter(), rpmmi_new(), rpmpsmStage(), rpmQueryVerify(), rpmrb_NewMi(), rpmteDBHeader(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsEraseDebuginfo(), rpmtsSanityCheck(), runImmedTriggers(), runTriggersLoop(), and unsatisfiedDepend().

rpmts rpmtsLink ( rpmts  ts,
const char *  msg 
)

Reference a transaction set instance.

Parameters
tstransaction set
msg
Returns
new transaction set reference

Referenced by fsmSetup(), iosmSetup(), rpmgiNew(), rpmpsmNew(), rpmtsCreate(), and XrpmtsiInit().

int rpmtsNElements ( rpmts  ts)

Return number of (ordered) transaction set elements.

Parameters
tstransaction set
Returns
no. of transaction set elements

Definition at line 1306 of file rpmts.c.

References NULL.

Referenced by _rpmtsRun(), rpmcliInstall(), rpmtsiNextElement(), rpmtsSanityCheck(), and XrpmtsiInit().

void* rpmtsNotify ( rpmts  ts,
rpmte  te,
rpmCallbackType  what,
rpmuint64_t  amount,
rpmuint64_t  total 
)

Perform transaction progress notify callback.

Warning
This function's args have changed, so the function cannot be used portably
Parameters
tstransaction set
tecurrent transaction element
whattype of call back
amountcurrent value
totalfinal value
Returns
callback dependent pointer

Definition at line 1279 of file rpmts.c.

References h, headerFree, headerLink(), NULL, ptr, rpmteKey(), and void.

Referenced by fsmSetup(), fsmStage(), iosmSetup(), iosmStage(), rpmpsmStage(), rpmteClose(), rpmteFDHeader(), rpmtsFindBaseNamesInDB(), rpmtsPrepare(), rpmtsRepackage(), and runScript().

rpmop rpmtsOp ( rpmts  ts,
rpmtsOpX  opx 
)

Retrieve operation timestamp from a transaction set.

Parameters
tstransaction set
opxoperation timestamp index
Returns
pointer to operation timestamp.

Definition at line 133 of file pkgio.c.

References NULL, op, and RPMTS_OP_MAX.

Referenced by _rpmtsCheck(), fsmTeardown(), iosmTeardown(), psmWait(), rpmpsmStage(), rpmReadPackageFile(), rpmrepoFclose(), rpmrepoRfileDigest(), rpmtsAddFingerprints(), rpmtsCleanDig(), rpmtsCloseDB(), rpmtsCloseSDB(), rpmtsCreate(), rpmtsPrepare(), rpmtsPrintStats(), rpmtsProcess(), and rpmtsRepackage().

int rpmtsOpenDB ( rpmts  ts,
int  dbmode 
)

Open the database used by the transaction.

Parameters
tstransaction set
dbmodeO_RDONLY or O_RDWR
Returns
0 on success

Definition at line 115 of file rpmts.c.

References _, _free(), NULL, rc, rpmdbOpen(), rpmGetPath(), rpmlog(), RPMLOG_ERR, rpmtsCloseDB(), and void.

Referenced by _rpmtsCheck(), ftsCacheUpdate(), if(), rpmcliImportPubkey(), rpmtsAddInstallElement(), rpmtsInitIterator(), rpmtsLoadNVRA(), rpmtsRebuildDB(), rpmtsRollback(), and rpmtsSetup().

int rpmtsOpenSDB ( rpmts  ts,
int  dbmode 
)

Open the database used by the transaction to solve dependencies.

Parameters
tstransaction set
dbmodeO_RDONLY or O_RDWR
Returns
0 on success

Definition at line 252 of file rpmts.c.

References _, _free(), ac, addMacro(), argvCount(), argvFree(), argvSplit(), av, delMacro(), exit, fn, fprintf(), i, NULL, rc, RMIL_DEFAULT, rpmdbOpen(), rpmExpand(), rpmExpandNumeric(), rpmGetPath(), rpmlog(), RPMLOG_WARNING, s, urlPath(), and xx.

Referenced by rpmtsSolve().

rpmPRCO rpmtsPRCO ( rpmts  ts)

Get transaction set dependencies.

Parameters
tstransaction set
Returns
transaction set dependencies.

Definition at line 1042 of file rpmts.c.

References _free(), fn, NULL, PRCO, R_OK, rpmdsNewPRCO(), rpmdsSysinfo(), rpmGetPath(), rpmioAccess(), and xx.

Referenced by _rpmtsCheck(), and unsatisfiedDepend().

rpmuint32_t rpmtsPrefColor ( rpmts  ts)

Retrieve preferred file color.

Parameters
tstransaction set
Returns
color bits

Definition at line 1453 of file rpmts.c.

References NULL.

Referenced by handleInstInstalledFile(), and handleOverlappedFiles().

rpmps rpmtsProblems ( rpmts  ts)

Return current transaction set problems.

Parameters
tstransaction set
Returns
current problem set (or NULL)

Definition at line 582 of file rpmts.c.

References msg, NULL, ps, rpmpsCreate(), and rpmpsLink().

Referenced by _rpmtsCheck(), checkPackageDeps(), cmpArgvStr(), ensureOlder(), handleInstInstalledFile(), handleOverlappedFiles(), relocateFileList(), rpmcliInstallProblems(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), rpmtsSanityCheck(), and verifyDependencies().

pgpDigParams rpmtsPubkey ( const rpmts  ts)

Return OpenPGP pubkey constants.

Parameters
tstransaction set
Returns
pubkey constants.

Definition at line 144 of file pkgio.c.

References pgpGetPubkey(), and rpmtsDig().

int rpmtsRebuildDB ( rpmts  ts)

Rebuild the database used by the transaction.

Parameters
tstransaction set
Returns
0 on success

Definition at line 136 of file rpmts.c.

References _free(), D_, dbiOpen(), exit, fn, headerFree, NULL, rc, RPMDBI_ADDED, RPMDBI_AVAILABLE, RPMDBI_BTREE, RPMDBI_DEPCACHE, RPMDBI_HASH, RPMDBI_PACKAGES, RPMDBI_QUEUE, RPMDBI_RECNO, RPMDBI_REMOVED, RPMDBI_SEQNO, rpmGetPath(), rpmlog(), RPMLOG_DEBUG, rpmtsCloseDB(), rpmtsGetRdb(), rpmtsOpenDB(), Stat(), tagName(), Unlink(), void, and xx.

Referenced by main().

rpmte rpmtsRelocateElement ( rpmts  ts)

Get current relocate transaction element.

Parameters
tstransaction set
Returns
current relocate transaction element

Definition at line 1392 of file rpmts.c.

Referenced by relocateFileList(), and rpmfiNew().

rpmRC rpmtsRollback ( rpmts  rbts,
rpmprobFilterFlags  ignoreSet,
int  running,
rpmte  rbte 
)
const char* rpmtsRootDir ( rpmts  ts)

Get transaction rootDir, i.e.

path to chroot(2).

Parameters
tstransaction set
Returns
transaction rootDir

Definition at line 901 of file rpmts.c.

References NULL, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_MONGO, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by _rpmtsRun(), createDir(), rpmfiNew(), rpmpsmStage(), rpmts_rootdir_get(), rpmts_rootdir_set(), rpmtsPrepare(), rpmtsProcess(), rpmvfNew(), and runScript().

int rpmtsSELinuxEnabled ( rpmts  ts)

Get selinuxEnabled flag, i.e.

is SE linux enabled?

Parameters
tstransaction set
Returns
selinuxEnabled flag

Definition at line 997 of file rpmts.c.

Referenced by rpmtsFlags(), rpmtsSetFlags(), rpmtsSetup(), and runScript().

void rpmtsSetARBGoal ( rpmts  ts,
rpmuint32_t  goal 
)

Set autorollback goal.

Parameters
tstransaction set
goalautorollback goal

Definition at line 884 of file rpmts.c.

References NULL.

Referenced by rpmcliInstall(), and rpmErase().

int rpmtsSetChrootDone ( rpmts  ts,
int  chrootDone 
)

Set chrootDone flag, i.e.

has chroot(2) been performed?

Parameters
tstransaction set
chrootDonenew chrootDone flag
Returns
previous chrootDone flag

Definition at line 1010 of file rpmts.c.

References NULL.

Referenced by rpmpsmStage(), rpmtsPrepare(), and rpmtsSetup().

rpmuint32_t rpmtsSetColor ( rpmts  ts,
rpmuint32_t  color 
)

Set color bits of transaction set.

Parameters
tstransaction set
colornew color bits
Returns
previous color bits

Definition at line 1443 of file rpmts.c.

References NULL.

void rpmtsSetCurrDir ( rpmts  ts,
const char *  currDir 
)

Set transaction currDir, i.e.

current directory before chroot(2).

Parameters
tstransaction set
currDirnew transaction currDir (or NULL)

Definition at line 960 of file rpmts.c.

References _free(), NULL, and xstrdup().

Referenced by rpmtsSetup().

int rpmtsSetDBMode ( rpmts  ts,
int  dbmode 
)

Set dbmode of transaction set.

Parameters
tstransaction set
dbmodenew dbmode
Returns
previous dbmode

Definition at line 1428 of file rpmts.c.

References NULL.

rpmdepFlags rpmtsSetDFlags ( rpmts  ts,
rpmdepFlags  depFlags 
)

Set dependency flags, i.e.

bits that control rpmtsCheck() and rpmtsOrder().

Parameters
tstransaction set
depFlagsnew dependency flags
Returns
previous dependency flags

Definition at line 1366 of file rpmts.c.

References NULL.

Referenced by rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmgiNext(), and rpmRollback().

rpmtransFlags rpmtsSetFlags ( rpmts  ts,
rpmtransFlags  transFlags 
)

Set transaction flags, i.e.

bits that control rpmtsRun().

Parameters
tstransaction set
transFlagsnew transaction flags
Returns
previous transaction flags

Definition at line 1345 of file rpmts.c.

References NULL, RPMTRANS_FLAG_NOCONTEXTS, rpmtsSELinuxEnabled(), and transFlags.

Referenced by rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmRollback(), rpmtsRollback(), and rpmtsSetup().

tsmStage rpmtsSetGoal ( rpmts  ts,
tsmStage  goal 
)

Set goal of transaction set.

Parameters
tstransaction set
goalnew goal
Returns
previous goal

Definition at line 1413 of file rpmts.c.

References NULL, and TSM_UNKNOWN.

Referenced by rpmcliInstall(), rpmErase(), and rpmgiNext().

int rpmtsSetKeyring ( rpmts  ts,
void _keyring 
)

Set transaction keyring.

Parameters
tstransaction set
_keyringnew transaction keyring
Returns
0 on success

Definition at line 807 of file rpmts.c.

References NULL, and rpmtsGetRdb().

int rpmtsSetNotifyCallback ( rpmts  ts,
rpmCallbackFunction  notify,
rpmCallbackData  notifyData 
)

Set transaction notify callback function and argument.

Warning
This call must be made before rpmtsRun() for install/upgrade/freshen to function correctly.
Parameters
tstransaction set
notifyprogress callback
notifyDataprogress callback private data
Returns
0 on success

Definition at line 1458 of file rpmts.c.

References NULL.

Referenced by rpmcliInstall(), rpmErase(), and rpmRollback().

rpmte rpmtsSetRelocateElement ( rpmts  ts,
rpmte  relocateElement 
)

Set current relocate transaction element.

Parameters
tstransaction set
relocateElementnew relocate transaction element
Returns
previous relocate transaction element

Definition at line 1399 of file rpmts.c.

Referenced by addTE(), and rpmtsProcess().

void rpmtsSetRootDir ( rpmts  ts,
const char *  rootDir 
)

Set transaction rootDir, i.e.

path to chroot(2).

Parameters
tstransaction set
rootDirnew transaction rootDir (or NULL)

Definition at line 925 of file rpmts.c.

References _free(), alloca(), NULL, stpcpy(), t, void, and xstrdup().

Referenced by main(), rpmts_new(), and rpmts_rootdir_set().

int rpmtsSetSolveCallback ( rpmts  ts,
int(*)(rpmts ts, rpmds ds, const void *data)  solve,
const void solveData 
)

Set dependency solver callback.

Parameters
tstransaction set
(*solve)dependency solver callback
solveDatadependency solver callback data (opaque)
Returns
0 on success
Spec rpmtsSetSpec ( rpmts  ts,
Spec  spec 
)

Set a spec control structure in transaction set.

Parameters
tstransaction set
specnew spec control structure
Returns
previous spec control structure

Definition at line 1383 of file rpmts.c.

References spec.

Referenced by _specQuery(), and parseSpec().

rpmuint32_t rpmtsSetTid ( rpmts  ts,
rpmuint32_t  tid 
)

Set transaction id, i.e.

transaction time stamp.

Parameters
tstransaction set
tidnew transaction id
Returns
previous transaction id

Definition at line 1031 of file rpmts.c.

References NULL.

Referenced by main(), and rpmtsSetup().

void rpmtsSetType ( rpmts  ts,
rpmTSType  type 
)

Set transaction type.

Allowed types are: RPMTRANS_TYPE_NORMAL RPMTRANS_TYPE_ROLLBACK RPMTRANS_TYPE_AUTOROLLBACK

Parameters
tstransaction set
typetransaction type

Definition at line 873 of file rpmts.c.

References NULL, and type.

Referenced by rpmRollback().

rpmVSFlags rpmtsSetVSFlags ( rpmts  ts,
rpmVSFlags  vsflags 
)

Set verify signatures flag(s).

Parameters
tstransaction set
vsflagsnew verify signatures flags
Returns
previous value

Definition at line 843 of file rpmts.c.

References pgpDigVSFlags, and vsflags.

Referenced by main(), rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmInstallSource(), rpmRollback(), rpmteFDHeader(), rpmts_new(), rpmts_vsflags_set(), and rpmtsRollback().

int rpmtsSolve ( rpmts  ts,
rpmds  ds,
const void data 
)
Spec rpmtsSpec ( rpmts  ts)

Get spec control structure from transaction set.

Parameters
tstransaction set
Returns
spec control structure

Definition at line 1376 of file rpmts.c.

Referenced by rpmts_parse_spec().

rpmTSType rpmtsType ( rpmts  ts)

Return the type of a transaction.

Parameters
tstransaction set
Returns
transaction type, 0 on unknown

Definition at line 868 of file rpmts.c.

References NULL.

Referenced by _rpmtsRun(), populateInstallHeader(), rpmpsmStage(), and rpmtsRollback().

rpmts rpmtsUnlink ( rpmts  ts,
const char *  msg 
)

Unreference a transaction instance.

Parameters
tstransaction set
msg
Returns
NULL on last dereference
int rpmtsUnorderedSuccessors ( rpmts  ts,
int  first 
)

Set index of 1st element of successors.

Parameters
tstransaction set
firstnew index of 1st element of successors
Returns
previous value

Definition at line 890 of file rpmts.c.

References NULL.

Referenced by rpmtsProcess().

void rpmtsUpdateDSI ( const rpmts  ts,
dev_t  dev,
rpmuint32_t  fileSize,
rpmuint32_t  prevSize,
rpmuint32_t  fixupSize,
int  _action 
)

Update disk space info for a file.

Parameters
tstransaction set
devmount point device
fileSizefile size
prevSizeprevious file size (if upgrading)
fixupSizesize difference (if
_actionfile disposition

Definition at line 1179 of file rpmts.c.

References FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, FA_SAVE, and NULL.

Referenced by handleOverlappedFiles().

static int rpmtsVerifyDB ( rpmts  ts)
inlinestatic

Verify the database used by the transaction.

Deprecated:
Use included standalone db_verify(1) utility instead.
Parameters
tstransaction set
Returns
0 on success

Definition at line 495 of file rpmts.h.

rpmVSFlags rpmtsVSFlags ( rpmts  ts)

Get verify signatures flag(s).

Parameters
tstransaction set
Returns
verify signatures flags

Definition at line 838 of file rpmts.c.

References pgpDigVSFlags.

Referenced by ftsCacheUpdate(), rpmInstallSource(), rpmpsmStage(), rpmteFDHeader(), rpmts_GetVSFlags(), rpmts_vsflags_get(), and rpmts_vsflags_set().

Variable Documentation

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.

Parameters
tstransaction set
Returns
0 = deps ok, 1 = dep problems, 2 = error

Definition at line 2097 of file depends.c.

Referenced by rpmcliInstallCheck(), and verifyDependencies().

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.

Parameters
tstransaction set
Returns
no. of (added) packages that could not be ordered

Referenced by rpmcliInstallOrder().

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:

Parameters
tstransaction set
okProbspreviously known problems (or NULL)
ignoreSetbits to filter problem types
Returns
0 on success, -1 on error, >0 with newProbs set

Definition at line 2307 of file transaction.c.

Referenced by rpmcliInstallRun().