Main Page Modules Data Structures File List Data Fields Globals Related Pages

# lib/rpmts.h File Reference

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

`#include "rpmps.h"`
`#include "rpmhash.h"`
`#include "rpmal.h"`

Go to the source code of this file.

## Defines

#define | _RPMVSF_NODIGESTS
#define | _RPMVSF_NOSIGNATURES
#define | _RPMVSF_NOHEADER
#define | _RPMVSF_NOPAYLOAD
#define | rpmtsUnlink(_ts, _msg) XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)
#define | rpmtsLink(_ts, _msg) XrpmtsLink(_ts, _msg, __FILE__, __LINE__)

## Typedefs

typedef enum rpmVSFlags_e | rpmVSFlags
| Bit(s) to control digest and signature verification. More...

## Enumerations

enum | rpmVSFlags_e { RPMVSF_DEFAULT = 0, RPMVSF_NOHDRCHK = (1 << 0), RPMVSF_NEEDPAYLOAD = (1 << 1), RPMVSF_NOSHA1HEADER = (1 << 8), RPMVSF_NOMD5HEADER = (1 << 9), RPMVSF_NODSAHEADER = (1 << 10), RPMVSF_NORSAHEADER = (1 << 11), RPMVSF_NOSHA1 = (1 << 16), RPMVSF_NOMD5 = (1 << 17), RPMVSF_NODSA = (1 << 18), RPMVSF_NORSA = (1 << 19) }
| Bit(s) to control digest and signature verification. More...

## Functions

int | rpmtsCheck (rpmts ts)
int | rpmtsOrder (rpmts ts)
int | rpmtsRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
rpmts | rpmtsUnlink (rpmts ts, const char *msg)
rpmts | XrpmtsUnlink (rpmts ts, const char *msg, const char *fn, unsigned ln)
rpmts | rpmtsLink (rpmts ts, const char *msg)
rpmts | XrpmtsLink (rpmts ts, const char *msg, const char *fn, unsigned ln)
int | rpmtsCloseDB (rpmts ts)
int | rpmtsOpenDB (rpmts ts, int dbmode)
int | rpmtsInitDB (rpmts ts, int dbmode)
int | rpmtsRebuildDB (rpmts ts)
int | rpmtsVerifyDB (rpmts ts)
rpmdbMatchIterator | rpmtsInitIterator (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)
rpmRC | rpmtsFindPubkey (rpmts ts)
| Retrieve pubkey from rpm database. More...
int | rpmtsCloseSDB (rpmts ts)
int | rpmtsOpenSDB (rpmts ts, int dbmode)
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...
rpmps | rpmtsProblems (rpmts ts)
| Return current transaction set problems. More...
void | rpmtsCleanDig (rpmts ts)
void | rpmtsClean (rpmts ts)
void | rpmtsEmpty (rpmts ts)
rpmts | rpmtsFree (rpmts ts)
rpmVSFlags | rpmtsVSFlags (rpmts ts)
rpmVSFlags | rpmtsSetVSFlags (rpmts ts, rpmVSFlags vsflags)
int | rpmtsUnorderedSuccessors (rpmts ts, int first)
const char * | rpmtsRootDir (rpmts ts)
void | rpmtsSetRootDir (rpmts ts, const char *rootDir)
const char * | rpmtsCurrDir (rpmts ts)
void | rpmtsSetCurrDir (rpmts ts, const char *currDir)
FD_t | rpmtsScriptFd (rpmts ts)
void | rpmtsSetScriptFd (rpmts ts, FD_t scriptFd)
int | rpmtsChrootDone (rpmts ts)
int | rpmtsSetChrootDone (rpmts ts, int chrootDone)
int_32 | rpmtsGetTid (rpmts ts)
int_32 | rpmtsSetTid (rpmts ts, int_32 tid)
int_32 | rpmtsSigtag (const rpmts ts)
int_32 | rpmtsSigtype (const rpmts ts)
const void * | rpmtsSig (const rpmts ts)
int_32 | rpmtsSiglen (const rpmts ts)
int | rpmtsSetSig (rpmts ts, int_32 sigtag, int_32 sigtype, const void *sig, int_32 siglen)
pgpDig | rpmtsDig (rpmts ts)
pgpDigParams | rpmtsSignature (const rpmts ts)
pgpDigParams | rpmtsPubkey (const rpmts ts)
rpmdb | rpmtsGetRdb (rpmts ts)
int | rpmtsInitDSI (const rpmts ts)
void | rpmtsUpdateDSI (const rpmts ts, dev_t dev, uint_32 fileSize, uint_32 prevSize, uint_32 fixupSize, fileAction action)
void | rpmtsCheckDSIProblems (const rpmts ts, const rpmte te)
void * | rpmtsNotify (rpmts ts, rpmte te, rpmCallbackType what, unsigned long amount, unsigned long 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)
rpmtransFlags | rpmtsFlags (rpmts ts)
rpmtransFlags | rpmtsSetFlags (rpmts ts, rpmtransFlags transFlags)
int | rpmtsSetNotifyCallback (rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData)
rpmts | rpmtsCreate (void)
int | rpmtsAddInstallElement (rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation *relocs)
int | rpmtsAddEraseElement (rpmts ts, Header h, int dboffset)
int | rpmtsGetKeys (rpmts ts, fnpyKey **ep, int *nep)
char * | hGetNEVR (Header h, const char **np)
| Return (malloc'd) header name-version-release string. More...

## Variables

int | _rpmts_debug
int | _fps_debug

## Detailed Description

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

Definition in file rpmts.h.

## Define Documentation

#define _RPMVSF_NODIGESTS

Value:

    ( RPMVSF_NOSHA1HEADER | \
        RPMVSF_NOMD5HEADER |        \
        RPMVSF_NOSHA1 |             \
        RPMVSF_NOMD5 )

Definition at line 38 of file rpmts.h.

Referenced by build, initrpm, main, rpmcliQuery, rpmcliVerify, rpmErase, rpmGraph, rpmInstall, and rpmRollback.

#define _RPMVSF_NOHEADER

Value:

    ( RPMVSF_NOSHA1HEADER | \
        RPMVSF_NOMD5HEADER |        \
        RPMVSF_NODSAHEADER |        \
        RPMVSF_NORSAHEADER )

Definition at line 50 of file rpmts.h.

Referenced by initrpm.

#define _RPMVSF_NOPAYLOAD

Value:

    ( RPMVSF_NOSHA1 |               \
        RPMVSF_NOMD5 |              \
        RPMVSF_NODSA |              \
        RPMVSF_NORSA )

Definition at line 56 of file rpmts.h.

Referenced by initrpm.

#define _RPMVSF_NOSIGNATURES

Value:

    ( RPMVSF_NODSAHEADER |  \
        RPMVSF_NORSAHEADER |        \
        RPMVSF_NODSA |              \
        RPMVSF_NORSA )

Definition at line 44 of file rpmts.h.

Referenced by build, initrpm, main, rpmcliQuery, rpmcliVerify, rpmErase, rpmGraph, rpmInstall, and rpmRollback.

#define rpmtsLink | ( | _ts,
|  | _msg |  | ) | XrpmtsLink(_ts, _msg, __FILE__, __LINE__)

| Definition at line 280 of file rpmts.h. Referenced by rpmtsCreate, and XrpmtsiInit.

#define rpmtsUnlink | ( | _ts,
|  | _msg |  | ) | XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)

| Definition at line 264 of file rpmts.h. Referenced by rpmtsFree.

## Typedef Documentation

typedef enum rpmVSFlags_e rpmVSFlags

| Bit(s) to control digest and signature verification. Referenced by build, headerCheck, main, rpmcliQuery, rpmcliVerify, rpmErase, rpmGraph, rpmInstall, rpmInstallSource, rpmReadPackageFile, rpmts_SetVSFlags, rpmtsFindPubkey, rpmtsOpenSDB, rpmtsSetVSFlags, and rpmtsVSFlags.

## Enumeration Type Documentation

enum rpmVSFlags_e

Bit(s) to control digest and signature verification.

Enumeration values:

  RPMVSF_DEFAULT |
  RPMVSF_NOHDRCHK |
  RPMVSF_NEEDPAYLOAD |
  RPMVSF_NOSHA1HEADER |
  RPMVSF_NOMD5HEADER |
  RPMVSF_NODSAHEADER |
  RPMVSF_NORSAHEADER |
  RPMVSF_NOSHA1 |
  RPMVSF_NOMD5 |
  RPMVSF_NODSA |
  RPMVSF_NORSA |

Definition at line 21 of file rpmts.h.

## Function Documentation

char* hGetNEVR | ( | Header | h,
|  | const char ** | np
| ) |

Return (malloc'd) header name-version-release string.

Parameters:

  h | header

Return values:

  np | name tag value

Returns:
  name-version-release string

Definition at line 68 of file rpmts.c.

References _cacheDependsRC.

Referenced by addTE, and checkPackageSet.

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:

  ts | transaction set
  ds | dependency set

Returns:
  0 if resolved (and added to ts), 1 not found

Definition at line 499 of file rpmts.c.

rpmte rpmtsElement | ( | rpmts | ts,
|  | int | ix
| ) |

Return (ordered) transaction set element.

Parameters:

  ts | transaction set
  ix | transaction element index

Returns:
  transaction element

Definition at line 1072 of file rpmts.c.

Referenced by rpmtsiNextElement.

rpmRC rpmtsFindPubkey | ( | rpmts | ts | ) |

Retrieve pubkey from rpm database.

Parameters:

  ts | rpm transaction

Returns:
  RPMRC_OK on success, RPMRC_NOKEY if not found

Definition at line 173 of file rpmts.c.

References int_32, and rpmVSFlags.

Referenced by verifyGPGSignature, and verifyPGPSignature.

int rpmtsNElements | ( | rpmts | ts | ) |

Return number of (ordered) transaction set elements.

Parameters:

  ts | transaction set

Returns:
  no. of transaction set elements

Definition at line 1063 of file rpmts.c.

Referenced by rpmGraph, rpmtsiNextElement, and XrpmtsiInit.

void* rpmtsNotify | ( | rpmts | ts,
|  | rpmte | te,
|  | rpmCallbackType | what,
|  | unsigned long | amount,
|  | unsigned long | total
| ) |

Perform transaction progress notify callback.

Parameters:

  ts | transaction set
  te | current transaction element
  what | type of call back
  amount | current value
  total | final value

Returns:
  callback dependent pointer

Definition at line 1047 of file rpmts.c.

rpmps rpmtsProblems | ( | rpmts | ts | ) |

Return current transaction set problems.

Parameters:

  ts | transaction set

Returns:
  current problem set (or NULL)

Definition at line 542 of file rpmts.c.

Referenced by checkSpec, rpmErase, rpmGraph, rpmInstall, rpmRollback, rpmts_Check, rpmts_Run, rpmtsCheckDSIProblems, and verifyDependencies.

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

Set dependency solver callback.

Parameters:

  ts | transaction set
  solve | ) dependency solver callback
  solveData | dependency solver callback data (opaque)

Returns:
  0 on success

Referenced by rpmts_Check.

int rpmtsSolve | ( | rpmts | ts,
|  | rpmds | ds,
|  | const void * | data
| ) |

Attempt to solve a needed dependency using the solve database.

Parameters:

  ts | transaction set
  ds | dependency set
  data | opaque data associated with callback

Returns:
  -1 retry, 0 ignore, 1 not found

Definition at line 345 of file rpmts.c.

Referenced by rpmInstall.

rpmts XrpmtsLink | ( | rpmts | ts,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |

Todo:
  Remove debugging entry from the ABI.

Definition at line 97 of file rpmts.c.

rpmts XrpmtsUnlink | ( | rpmts | ts,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |

Todo:
  Remove debugging entry from the ABI.

Definition at line 87 of file rpmts.c.

## Variable Documentation

int _fps_debug

| Definition at line 15 of file rpmts.h.

int _rpmts_debug

| Definition at line 13 of file rpmts.h.