rpm  4.8.1
Typedefs | Enumerations | Functions | Variables
rpmte.h File Reference

Structures used for an "rpmte" transaction element. More...

#include <rpm/rpmtypes.h>
Include dependency graph for rpmte.h:

Go to the source code of this file.

Typedefs

typedef struct tsortInfo_s * tsortInfo
 Transaction element ordering chain linkage. More...
 
typedef struct rpmtsi_s * rpmtsi
 Transaction element iterator. More...
 
typedef enum rpmElementType_e rpmElementType
 Transaction element type. More...
 

Enumerations

enum  rpmElementType_e { TR_ADDED = (1 << 0), TR_REMOVED = (1 << 1) }
 Transaction element type. More...
 

Functions

rpmte rpmteFree (rpmte te)
 Destroy a transaction element. More...
 
rpmte rpmteNew (const rpmts ts, Header h, rpmElementType type, fnpyKey key, rpmRelocation *relocs, int dboffset)
 Create a transaction element. More...
 
Header rpmteHeader (rpmte te)
 Retrieve header from transaction element. More...
 
Header rpmteSetHeader (rpmte te, Header h)
 Save header into transaction element. More...
 
rpmElementType rpmteType (rpmte te)
 Retrieve type of transaction element. More...
 
const char * rpmteN (rpmte te)
 Retrieve name string of transaction element. More...
 
const char * rpmteE (rpmte te)
 Retrieve epoch string of transaction element. More...
 
const char * rpmteV (rpmte te)
 Retrieve version string of transaction element. More...
 
const char * rpmteR (rpmte te)
 Retrieve release string of transaction element. More...
 
const char * rpmteA (rpmte te)
 Retrieve arch string of transaction element. More...
 
const char * rpmteO (rpmte te)
 Retrieve os string of transaction element. More...
 
int rpmteIsSource (rpmte te)
 Retrieve isSource attribute of transaction element. More...
 
rpm_color_t rpmteColor (rpmte te)
 Retrieve color bits of transaction element. More...
 
rpm_color_t rpmteSetColor (rpmte te, rpm_color_t color)
 Set color bits of transaction element. More...
 
unsigned int rpmteDBInstance (rpmte te)
 Retrieve last instance installed to the database. More...
 
void rpmteSetDBInstance (rpmte te, unsigned int instance)
 Set last instance installed to the database. More...
 
rpm_loff_t rpmtePkgFileSize (rpmte te)
 Retrieve size in bytes of package file. More...
 
int rpmteDepth (rpmte te)
 Retrieve dependency tree depth of transaction element. More...
 
int rpmteSetDepth (rpmte te, int ndepth)
 Set dependency tree depth of transaction element. More...
 
int rpmteBreadth (rpmte te)
 Retrieve dependency tree breadth of transaction element. More...
 
int rpmteSetBreadth (rpmte te, int nbreadth)
 Set dependency tree breadth of transaction element. More...
 
int rpmteNpreds (rpmte te)
 Retrieve tsort no. More...
 
int rpmteSetNpreds (rpmte te, int npreds)
 Set tsort no. More...
 
int rpmteTree (rpmte te)
 Retrieve tree index of transaction element. More...
 
int rpmteSetTree (rpmte te, int ntree)
 Set tree index of transaction element. More...
 
rpmte rpmteParent (rpmte te)
 Retrieve parent transaction element. More...
 
rpmte rpmteSetParent (rpmte te, rpmte pte)
 Set parent transaction element. More...
 
int rpmteDegree (rpmte te)
 Retrieve number of children of transaction element. More...
 
int rpmteSetDegree (rpmte te, int ndegree)
 Set number of children of transaction element. More...
 
tsortInfo rpmteTSI (rpmte te)
 Retrieve tsort info for transaction element. More...
 
void rpmteFreeTSI (rpmte te)
 Destroy tsort info of transaction element. More...
 
void rpmteNewTSI (rpmte te)
 Initialize tsort info of transaction element. More...
 
void rpmteCleanDS (rpmte te)
 Destroy dependency set info of transaction element. More...
 
void rpmteSetDependsOn (rpmte te, rpmte depends)
 Set dependent element of TR_REMOVED transaction element. More...
 
rpmte rpmteDependsOn (rpmte te)
 Retrieve dependent element of TR_REMOVED transaction element. More...
 
int rpmteDBOffset (rpmte te)
 Retrieve rpmdb instance of TR_REMOVED transaction element. More...
 
const char * rpmteEVR (rpmte te)
 Retrieve [epoch:]version-release string from transaction element. More...
 
const char * rpmteNEVR (rpmte te)
 Retrieve name-[epoch:]version-release string from transaction element. More...
 
const char * rpmteNEVRA (rpmte te)
 Retrieve name-[epoch:]version-release.arch string from transaction element. More...
 
FD_t rpmteFd (rpmte te)
 Retrieve file handle from transaction element. More...
 
fnpyKey rpmteKey (rpmte te)
 Retrieve key from transaction element. More...
 
int rpmteFailed (rpmte te)
 Return failed status of transaction element. More...
 
rpmds rpmteDS (rpmte te, rpmTag tag)
 Retrieve dependency tag set from transaction element. More...
 
rpmfi rpmteFI (rpmte te)
 Retrieve file info tag set from transaction element. More...
 
void rpmteColorDS (rpmte te, rpmTag tag)
 Calculate transaction element dependency colors/refs from file info. More...
 
int rpmtsiOc (rpmtsi tsi)
 Return transaction element index. More...
 
rpmtsi rpmtsiFree (rpmtsi tsi)
 Destroy transaction element iterator. More...
 
rpmtsi rpmtsiInit (rpmts ts)
 Create transaction element iterator. More...
 
rpmte rpmtsiNext (rpmtsi tsi, rpmElementType type)
 Return next transaction element of type. More...
 

Variables

int _rpmte_debug
 

Detailed Description

Structures used for an "rpmte" transaction element.

Definition in file rpmte.h.

Typedef Documentation

◆ rpmElementType

Transaction element type.

◆ rpmtsi

typedef struct rpmtsi_s* rpmtsi

Transaction element iterator.

Definition at line 27 of file rpmte.h.

◆ tsortInfo

typedef struct tsortInfo_s* tsortInfo

Transaction element ordering chain linkage.

Definition at line 22 of file rpmte.h.

Enumeration Type Documentation

◆ rpmElementType_e

Transaction element type.

Enumerator
TR_ADDED 

Package will be installed.

TR_REMOVED 

Package will be removed.

Definition at line 32 of file rpmte.h.

Function Documentation

◆ rpmteA()

const char* rpmteA ( rpmte  te)

Retrieve arch string of transaction element.

Parameters
tetransaction element
Returns
arch string

◆ rpmteBreadth()

int rpmteBreadth ( rpmte  te)

Retrieve dependency tree breadth of transaction element.

Parameters
tetransaction element
Returns
breadth

◆ rpmteCleanDS()

void rpmteCleanDS ( rpmte  te)

Destroy dependency set info of transaction element.

Parameters
tetransaction element

◆ rpmteColor()

rpm_color_t rpmteColor ( rpmte  te)

Retrieve color bits of transaction element.

Parameters
tetransaction element
Returns
color bits

◆ rpmteColorDS()

void rpmteColorDS ( rpmte  te,
rpmTag  tag 
)

Calculate transaction element dependency colors/refs from file info.

Parameters
tetransaction element
tagdependency tag (RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME)

◆ rpmteDBInstance()

unsigned int rpmteDBInstance ( rpmte  te)

Retrieve last instance installed to the database.

Parameters
tetransaction element
Returns
last install instance.

◆ rpmteDBOffset()

int rpmteDBOffset ( rpmte  te)

Retrieve rpmdb instance of TR_REMOVED transaction element.

Parameters
tetransaction element
Returns
rpmdb instance

◆ rpmteDegree()

int rpmteDegree ( rpmte  te)

Retrieve number of children of transaction element.

Parameters
tetransaction element
Returns
tree index

◆ rpmteDependsOn()

rpmte rpmteDependsOn ( rpmte  te)

Retrieve dependent element of TR_REMOVED transaction element.

Parameters
tetransaction element
Returns
dependent transaction element

◆ rpmteDepth()

int rpmteDepth ( rpmte  te)

Retrieve dependency tree depth of transaction element.

Parameters
tetransaction element
Returns
depth

◆ rpmteDS()

rpmds rpmteDS ( rpmte  te,
rpmTag  tag 
)

Retrieve dependency tag set from transaction element.

Parameters
tetransaction element
tagdependency tag
Returns
dependency tag set

◆ rpmteE()

const char* rpmteE ( rpmte  te)

Retrieve epoch string of transaction element.

Parameters
tetransaction element
Returns
epoch string

◆ rpmteEVR()

const char* rpmteEVR ( rpmte  te)

Retrieve [epoch:]version-release string from transaction element.

Parameters
tetransaction element
Returns
[epoch:]version-release string

◆ rpmteFailed()

int rpmteFailed ( rpmte  te)

Return failed status of transaction element.

Parameters
tetransaction element
Returns
1 if transaction element (or its parents) failed

◆ rpmteFd()

FD_t rpmteFd ( rpmte  te)

Retrieve file handle from transaction element.

Parameters
tetransaction element
Returns
file handle

◆ rpmteFI()

rpmfi rpmteFI ( rpmte  te)

Retrieve file info tag set from transaction element.

Parameters
tetransaction element
Returns
file info tag set

◆ rpmteFree()

rpmte rpmteFree ( rpmte  te)

Destroy a transaction element.

Parameters
tetransaction element
Returns
NULL always

◆ rpmteFreeTSI()

void rpmteFreeTSI ( rpmte  te)

Destroy tsort info of transaction element.

Parameters
tetransaction element

◆ rpmteHeader()

Header rpmteHeader ( rpmte  te)

Retrieve header from transaction element.

Parameters
tetransaction element
Returns
header

◆ rpmteIsSource()

int rpmteIsSource ( rpmte  te)

Retrieve isSource attribute of transaction element.

Parameters
tetransaction element
Returns
isSource attribute

◆ rpmteKey()

fnpyKey rpmteKey ( rpmte  te)

Retrieve key from transaction element.

Parameters
tetransaction element
Returns
key

◆ rpmteN()

const char* rpmteN ( rpmte  te)

Retrieve name string of transaction element.

Parameters
tetransaction element
Returns
name string

◆ rpmteNEVR()

const char* rpmteNEVR ( rpmte  te)

Retrieve name-[epoch:]version-release string from transaction element.

Parameters
tetransaction element
Returns
name-[epoch:]version-release string

◆ rpmteNEVRA()

const char* rpmteNEVRA ( rpmte  te)

Retrieve name-[epoch:]version-release.arch string from transaction element.

Parameters
tetransaction element
Returns
name-[epoch:]version-release.arch string

◆ rpmteNew()

rpmte rpmteNew ( const rpmts  ts,
Header  h,
rpmElementType  type,
fnpyKey  key,
rpmRelocation relocs,
int  dboffset 
)

Create a transaction element.

Parameters
tstransaction set
hheader
typeTR_ADDED/TR_REMOVED
key(TR_ADDED) package retrieval key (e.g. file name)
relocs(TR_ADDED) package file relocations
dboffsetunused
Returns
new transaction element

◆ rpmteNewTSI()

void rpmteNewTSI ( rpmte  te)

Initialize tsort info of transaction element.

Parameters
tetransaction element

◆ rpmteNpreds()

int rpmteNpreds ( rpmte  te)

Retrieve tsort no.

of predecessors of transaction element.

Parameters
tetransaction element
Returns
no. of predecessors

◆ rpmteO()

const char* rpmteO ( rpmte  te)

Retrieve os string of transaction element.

Parameters
tetransaction element
Returns
os string

◆ rpmteParent()

rpmte rpmteParent ( rpmte  te)

Retrieve parent transaction element.

Parameters
tetransaction element
Returns
parent transaction element

◆ rpmtePkgFileSize()

rpm_loff_t rpmtePkgFileSize ( rpmte  te)

Retrieve size in bytes of package file.

Todo:
Signature header is estimated at 256b.
Parameters
tetransaction element
Returns
size in bytes of package file.

◆ rpmteR()

const char* rpmteR ( rpmte  te)

Retrieve release string of transaction element.

Parameters
tetransaction element
Returns
release string

◆ rpmteSetBreadth()

int rpmteSetBreadth ( rpmte  te,
int  nbreadth 
)

Set dependency tree breadth of transaction element.

Parameters
tetransaction element
nbreadthnew breadth
Returns
previous breadth

◆ rpmteSetColor()

rpm_color_t rpmteSetColor ( rpmte  te,
rpm_color_t  color 
)

Set color bits of transaction element.

Parameters
tetransaction element
colornew color bits
Returns
previous color bits

◆ rpmteSetDBInstance()

void rpmteSetDBInstance ( rpmte  te,
unsigned int  instance 
)

Set last instance installed to the database.

Parameters
tetransaction element
instanceDatabase instance of last install element.
Returns
last install instance.

◆ rpmteSetDegree()

int rpmteSetDegree ( rpmte  te,
int  ndegree 
)

Set number of children of transaction element.

Parameters
tetransaction element
ndegreenew number of children
Returns
previous number of children

◆ rpmteSetDependsOn()

void rpmteSetDependsOn ( rpmte  te,
rpmte  depends 
)

Set dependent element of TR_REMOVED transaction element.

Parameters
tetransaction element
dependsdependent transaction element

◆ rpmteSetDepth()

int rpmteSetDepth ( rpmte  te,
int  ndepth 
)

Set dependency tree depth of transaction element.

Parameters
tetransaction element
ndepthnew depth
Returns
previous depth

◆ rpmteSetHeader()

Header rpmteSetHeader ( rpmte  te,
Header  h 
)

Save header into transaction element.

Parameters
tetransaction element
hheader
Returns
NULL always

◆ rpmteSetNpreds()

int rpmteSetNpreds ( rpmte  te,
int  npreds 
)

Set tsort no.

of predecessors of transaction element.

Parameters
tetransaction element
npredsnew no. of predecessors
Returns
previous no. of predecessors

◆ rpmteSetParent()

rpmte rpmteSetParent ( rpmte  te,
rpmte  pte 
)

Set parent transaction element.

Parameters
tetransaction element
ptenew parent transaction element
Returns
previous parent transaction element

◆ rpmteSetTree()

int rpmteSetTree ( rpmte  te,
int  ntree 
)

Set tree index of transaction element.

Parameters
tetransaction element
ntreenew tree index
Returns
previous tree index

◆ rpmteTree()

int rpmteTree ( rpmte  te)

Retrieve tree index of transaction element.

Parameters
tetransaction element
Returns
tree index

◆ rpmteTSI()

tsortInfo rpmteTSI ( rpmte  te)

Retrieve tsort info for transaction element.

Parameters
tetransaction element
Returns
tsort info

◆ rpmteType()

rpmElementType rpmteType ( rpmte  te)

Retrieve type of transaction element.

Parameters
tetransaction element
Returns
type

◆ rpmteV()

const char* rpmteV ( rpmte  te)

Retrieve version string of transaction element.

Parameters
tetransaction element
Returns
version string

◆ rpmtsiFree()

rpmtsi rpmtsiFree ( rpmtsi  tsi)

Destroy transaction element iterator.

Parameters
tsitransaction element iterator
Returns
NULL always

◆ rpmtsiInit()

rpmtsi rpmtsiInit ( rpmts  ts)

Create transaction element iterator.

Parameters
tstransaction set
Returns
transaction element iterator

◆ rpmtsiNext()

rpmte rpmtsiNext ( rpmtsi  tsi,
rpmElementType  type 
)

Return next transaction element of type.

Parameters
tsitransaction element iterator
typetransaction element type selector (0 for any)
Returns
next transaction element of type, NULL on termination

◆ rpmtsiOc()

int rpmtsiOc ( rpmtsi  tsi)

Return transaction element index.

Parameters
tsitransaction element iterator
Returns
transaction element index

Variable Documentation

◆ _rpmte_debug

int _rpmte_debug