rpm  5.4.15
Macros | Functions | Variables
rpmte.c File Reference

Routine(s) to handle an "rpmte" transaction element. More...

#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include <rpmdb.h>
#include <pkgio.h>
#include "rpmds.h"
#include "rpmfi.h"
#include "rpmte.h"
#include "rpmts.h"
#include "debug.h"
Include dependency graph for rpmte.c:

Go to the source code of this file.

Macros

#define _RPMFI_INTERNAL   /* pre/post trans scripts */
 
#define _RPMTE_INTERNAL
 

Functions

void rpmteCleanDS (rpmte te)
 Destroy dependency set info of transaction element. More...
 
static void delTE (rpmte p)
 Destroy transaction element data. More...
 
static void addTE (rpmts ts, rpmte p, Header h, fnpyKey key, rpmRelocation relocs)
 Initialize transaction element data from header. More...
 
static void rpmteFini (void *_te)
 
static rpmte rpmteGetPool (rpmioPool pool)
 
rpmte rpmteNew (const rpmts ts, Header h, rpmElementType type, fnpyKey key, rpmRelocation relocs, uint32_t dboffset, alKey pkgKey)
 Create a transaction element. More...
 
uint32_t 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...
 
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 * rpmteD (rpmte te)
 Retrieve distepoch 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...
 
rpmuint32_t rpmteColor (rpmte te)
 Retrieve color bits of transaction element. More...
 
rpmuint32_t rpmteSetColor (rpmte te, rpmuint32_t color)
 Set color bits of transaction element. More...
 
rpmuint32_t rpmtePkgFileSize (rpmte te)
 Retrieve size in bytes of package file. More...
 
rpmuint32_trpmteOriginTid (rpmte te)
 Retrieve transaction start time that package was first installed. More...
 
rpmuint32_trpmteOriginTime (rpmte te)
 Retrieve time that package was first installed. 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...
 
alKey rpmteAddedKey (rpmte te)
 
alKey rpmteSetAddedKey (rpmte te, alKey npkgKey)
 
int rpmteDBOffset (rpmte te)
 Retrieve rpmdb instance of TR_REMOVED transaction element. More...
 
const char * rpmteNEVR (rpmte te)
 Retrieve name-version-release string from transaction element. More...
 
const char * rpmteNEVRA (rpmte te)
 Retrieve name-version-release.arch string from transaction element. More...
 
const char * rpmtePkgid (rpmte te)
 Retrieve pkgid string from transaction element. More...
 
const char * rpmteHdrid (rpmte te)
 Retrieve hdrid string from transaction element. More...
 
const char * rpmteSourcerpm (rpmte te)
 Retrieve sourcerpm 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...
 
rpmds rpmteDS (rpmte te, rpmTag tag)
 Retrieve dependency tag set from transaction element. More...
 
rpmfi rpmteFI (rpmte te, rpmTag tag)
 Retrieve file info tag set from transaction element. More...
 
rpmfi rpmteSetFI (rpmte te, rpmfi fi)
 
void rpmteColorDS (rpmte te, rpmTag tag)
 Calculate transaction element dependency colors/refs from file info. More...
 
int rpmteChain (rpmte p, rpmte q, Header oh, const char *msg)
 Chain p <-> q forward/backward transaction element links. More...
 
int rpmtsiOc (rpmtsi tsi)
 Return transaction element index. More...
 
static void rpmtsiFini (void *_tsi)
 
static rpmtsi rpmtsiGetPool (rpmioPool pool)
 
rpmtsi XrpmtsiInit (rpmts ts, const char *fn, unsigned int ln)
 Create transaction element iterator. More...
 
static rpmte rpmtsiNextElement (rpmtsi tsi)
 Return next transaction element. More...
 
rpmte rpmtsiNext (rpmtsi tsi, rpmElementType type)
 Return next transaction element of type. More...
 
Header rpmteDBHeader (rpmts ts, uint32_t rec)
 
Header rpmteFDHeader (rpmts ts, rpmte te)
 
int rpmteOpen (rpmte te, rpmts ts, int reload_fi)
 
int rpmteClose (rpmte te, rpmts ts, int reset_fi)
 
int rpmteFailed (rpmte te)
 
int rpmteHaveTransScript (rpmte te, rpmTag tag)
 

Variables

int _rpmte_debug = 0
 
rpmioPool _rpmtePool
 
static int __mydebug = 0
 
rpmioPool _rpmtsiPool
 

Detailed Description

Routine(s) to handle an "rpmte" transaction element.

Definition in file rpmte.c.

Macro Definition Documentation

#define _RPMFI_INTERNAL   /* pre/post trans scripts */

Definition at line 16 of file rpmte.c.

#define _RPMTE_INTERNAL

Definition at line 19 of file rpmte.c.

Function Documentation

static void addTE ( rpmts  ts,
rpmte  p,
Header  h,
fnpyKey  key,
rpmRelocation  relocs 
)
static

Initialize transaction element data from header.

Parameters
tstransaction set
ptransaction element
hheader
key(TR_ADDED) package retrieval key (e.g. file name)
relocs(TR_ADDED) package file relocations

Definition at line 104 of file rpmte.c.

References _free(), alloca(), _HE_s::c, headerGet(), headerIsEntry(), i, key, _HE_s::p, rpmDataType_u::ptr, rpmdsNewPRCO(), rpmfiDupeRelocations(), rpmfiNew(), RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_DISTEPOCH, RPMTAG_EPOCH, RPMTAG_HDRID, RPMTAG_NAME, RPMTAG_NVRA, RPMTAG_OS, RPMTAG_PKGID, RPMTAG_PROVIDENAME, RPMTAG_RELEASE, RPMTAG_REQUIRENAME, RPMTAG_SOURCERPM, RPMTAG_VERSION, rpmteColorDS(), rpmtsSetRelocateElement(), rpmDataType_u::str, _HE_s::tag, rpmDataType_u::ui32p, rpmDataType_u::ui8p, xmalloc, and xstrdup().

Referenced by rpmteNew().

static void delTE ( rpmte  p)
static

Destroy transaction element data.

Parameters
ptransaction element

Definition at line 47 of file rpmte.c.

References _free(), argvFree(), fdFree(), headerFree(), rpmfiFree(), rpmfiFreeRelocations(), and rpmteCleanDS().

Referenced by rpmteFini().

const char* rpmteA ( rpmte  te)

Retrieve arch string of transaction element.

Parameters
tetransaction element
Returns
arch string

Definition at line 345 of file rpmte.c.

Referenced by _rpmtsCheck(), rpmpsmStage(), rpmte_A(), rpmte_print(), rpmtsAddInstallElement(), rpmtsProcess(), and rpmtsSanityCheck().

alKey rpmteAddedKey ( rpmte  te)
int rpmteBreadth ( rpmte  te)

Retrieve dependency tree breadth of transaction element.

Parameters
tetransaction element
Returns
breadth

Definition at line 405 of file rpmte.c.

Referenced by rpmte_Breadth().

int rpmteChain ( rpmte  p,
rpmte  q,
Header  oh,
const char *  msg 
)

Chain p <-> q forward/backward transaction element links.

Parameters
pinstalled element (needs backward link)
qerased element (needs forward link)
oherased element header
msgoperation identifier for debugging (NULL uses "")
Returns
0 on success

Definition at line 682 of file rpmte.c.

References _free(), alloca(), argvAdd(), _HE_s::c, headerGet(), i, _HE_s::p, rpmDataType_u::ptr, RPMTAG_HDRID, RPMTAG_NVRA, RPMTAG_PKGID, rpmDataType_u::str, _HE_s::tag, rpmDataType_u::ui8p, and xmalloc.

Referenced by findErases(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), and rpmtsEraseDebuginfo().

void rpmteCleanDS ( rpmte  te)

Destroy dependency set info of transaction element.

Parameters
tetransaction element

Definition at line 38 of file rpmte.c.

References rpmdsFreePRCO().

Referenced by delTE(), and rpmtsClean().

int rpmteClose ( rpmte  te,
rpmts  ts,
int  reset_fi 
)
rpmuint32_t rpmteColor ( rpmte  te)

Retrieve color bits of transaction element.

Parameters
tetransaction element
Returns
color bits

Definition at line 360 of file rpmte.c.

Referenced by _rpmtsCheck(), addQ(), populateInstallHeader(), rpmte_Color(), and rpmtsProcess().

void rpmteColorDS ( rpmte  te,
rpmTag  tag 
)

Calculate transaction element dependency colors/refs from file info.

Parameters
tetransaction element
tagdependency tag (RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME)

Definition at line 613 of file rpmte.c.

References alloca(), fi, i, rpmdsCount(), rpmdsInit(), rpmdsNext(), rpmdsSetColor(), rpmdsSetRefs(), rpmfiFC(), rpmfiFColor(), rpmfiFDepends(), rpmfiInit(), rpmfiNext(), RPMTAG_BASENAMES, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, rpmteDS(), and rpmteFI().

Referenced by addTE().

const char* rpmteD ( rpmte  te)

Retrieve distepoch string of transaction element.

Parameters
tetransaction element
Returns
distepoch string

Definition at line 336 of file rpmte.c.

Referenced by ensureOlder(), rpmpsmStage(), and rpmtsSanityCheck().

Header rpmteDBHeader ( rpmts  ts,
uint32_t  rec 
)

Definition at line 843 of file rpmte.c.

References headerLink(), RPMDBI_PACKAGES, rpmmiFree(), rpmmiNext(), and rpmtsInitIterator().

Referenced by rpmteOpen().

uint32_t rpmteDBInstance ( rpmte  te)

Retrieve last instance installed to the database.

Parameters
tetransaction element
Returns
last install instance.

Definition at line 279 of file rpmte.c.

Referenced by rpmteOpen().

int rpmteDBOffset ( rpmte  te)

Retrieve rpmdb instance of TR_REMOVED transaction element.

Parameters
tetransaction element
Returns
rpmdb instance

Definition at line 531 of file rpmte.c.

Referenced by rpmte_DBOffset(), and rpmtsPrepare().

int rpmteDegree ( rpmte  te)

Retrieve number of children of transaction element.

Parameters
tetransaction element
Returns
tree index

Definition at line 467 of file rpmte.c.

Referenced by _rpmtsOrder(), collectTE(), and rpmte_Degree().

int rpmteDepth ( rpmte  te)

Retrieve dependency tree depth of transaction element.

Parameters
tetransaction element
Returns
depth

Definition at line 390 of file rpmte.c.

Referenced by _rpmtsOrder(), addRelation(), collectTE(), orgrpmAddRelation(), and rpmte_Depth().

rpmds rpmteDS ( rpmte  te,
rpmTag  tag 
)

Retrieve dependency tag set from transaction element.

Parameters
tetransaction element
tagdependency tag
Returns
dependency tag set

Definition at line 573 of file rpmte.c.

References rpmdsFromPRCO().

Referenced by _orgrpmtsOrder(), _rpmtsCheck(), _rpmtsOrder(), rpmte_DS(), rpmteColorDS(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), and zapRelation().

const char* rpmteE ( rpmte  te)

Retrieve epoch string of transaction element.

Parameters
tetransaction element
Returns
epoch string

Definition at line 321 of file rpmte.c.

Referenced by ensureOlder(), rpmpsmStage(), rpmte_E(), and rpmtsSanityCheck().

int rpmteFailed ( rpmte  te)

Definition at line 945 of file rpmte.c.

Referenced by rpmtsProcess().

FD_t rpmteFd ( rpmte  te)

Retrieve file handle from transaction element.

Parameters
tetransaction element
Returns
file handle

Definition at line 561 of file rpmte.c.

Referenced by rpmpsmStage(), rpmteFDHeader(), and rpmtsProcess().

Header rpmteFDHeader ( rpmts  ts,
rpmte  te 
)
rpmfi rpmteFI ( rpmte  te,
rpmTag  tag 
)

Retrieve file info tag set from transaction element.

Parameters
tetransaction element
tagfile info tag (RPMTAG_BASENAMES)
Returns
file info tag set

Definition at line 587 of file rpmte.c.

References RPMTAG_BASENAMES.

Referenced by _orgrpmtsOrder(), _rpmtsCheck(), _rpmtsOrder(), addRelation(), handleOverlappedFiles(), orgrpmAddRelation(), removePackage(), rpmInstallSourcePackage(), rpmte_FI(), rpmteColorDS(), rpmtsAddFingerprints(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), rpmtsCheckInstalledFiles(), rpmtsFindBaseNamesInDB(), and rpmtsPrepare().

static void rpmteFini ( void *  _te)
static

Definition at line 218 of file rpmte.c.

References delTE().

Referenced by rpmteGetPool().

void rpmteFreeTSI ( rpmte  te)

Destroy tsort info of transaction element.

Parameters
tetransaction element

Definition at line 489 of file rpmte.c.

References _free(), and rpmteTSI().

Referenced by _orgrpmtsOrder(), _rpmtsOrder(), and rpmteNewTSI().

static rpmte rpmteGetPool ( rpmioPool  pool)
static

Definition at line 229 of file rpmte.c.

References _rpmte_debug, _rpmtePool, rpmioGetPool(), rpmioNewPool(), and rpmteFini().

Referenced by rpmteNew().

int rpmteHaveTransScript ( rpmte  te,
rpmTag  tag 
)

Definition at line 950 of file rpmte.c.

References fi, RPMTAG_POSTTRANS, and RPMTAG_PRETRANS.

Referenced by rpmtsRunScript().

const char* rpmteHdrid ( rpmte  te)

Retrieve hdrid string from transaction element.

Parameters
tetransaction element
Returns
hdrid string

Definition at line 551 of file rpmte.c.

Referenced by rpmpsmStage(), and rpmte_Hdrid().

Header rpmteHeader ( rpmte  te)

Retrieve header from transaction element.

Parameters
tetransaction element
Returns
header

Definition at line 291 of file rpmte.c.

References headerLink().

Referenced by rpmgiNext().

int rpmteIsSource ( rpmte  te)

Retrieve isSource attribute of transaction element.

Parameters
tetransaction element
Returns
isSource attribute

Definition at line 355 of file rpmte.c.

Referenced by rpmtsAddInstallElement(), and rpmtsProcess().

fnpyKey rpmteKey ( rpmte  te)

Retrieve key from transaction element.

Parameters
tetransaction element
Returns
key

Definition at line 568 of file rpmte.c.

Referenced by ensureOlder(), handleInstInstalledFile(), handleOverlappedFiles(), relocateFileList(), rpmte_Key(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), rpmtsNotify(), and rpmtsSanityCheck().

const char* rpmteN ( rpmte  te)

Retrieve name string of transaction element.

Parameters
tetransaction element
Returns
name string

Definition at line 316 of file rpmte.c.

Referenced by ensureOlder(), ignoreDep(), rpmpsmStage(), rpmte_N(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsSanityCheck(), and runTriggers().

const char* rpmteNEVR ( rpmte  te)

Retrieve name-version-release string from transaction element.

Parameters
tetransaction element
Returns
name-version-release string

Definition at line 536 of file rpmte.c.

Referenced by _rpmtsCheck(), ensureOlder(), handleOverlappedFiles(), relocateFileList(), rpmpsmStage(), rpmte_NEVR(), rpmte_print(), rpmteFDHeader(), rpmtsCheckDSIProblems(), rpmtsProcess(), and rpmtsSanityCheck().

const char* rpmteNEVRA ( rpmte  te)

Retrieve name-version-release.arch string from transaction element.

Parameters
tetransaction element
Returns
name-version-release.arch string

Definition at line 541 of file rpmte.c.

Referenced by _rpmtsCheck(), _rpmtsOrder(), collectTE(), detectSCCs(), handleInstInstalledFile(), rpmte_NEVRA(), rpmtsAddObsoletes(), rpmtsAddUpgrades(), rpmtsEraseDebuginfo(), rpmtsProcess(), rpmtsRollback(), rpmtsSanityCheck(), and zapRelation().

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

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
dboffset(TR_REMOVED) rpmdb instance
pkgKeyassociated added package (if any)
Returns
new transaction element

Definition at line 245 of file rpmte.c.

References _free(), addTE(), alloca(), headerGet(), _HE_s::p, rpmDataType_u::ptr, RPMTAG_SIGSIZE, rpmteGetPool(), _HE_s::tag, TR_ADDED, TR_REMOVED, type, and rpmDataType_u::ui32p.

Referenced by removePackage(), and rpmtsAddInstallElement().

void rpmteNewTSI ( rpmte  te)

Initialize tsort info of transaction element.

Parameters
tetransaction element

Definition at line 507 of file rpmte.c.

References rpmteFreeTSI(), and xcalloc().

Referenced by _orgrpmtsOrder(), and _rpmtsOrder().

int rpmteNpreds ( rpmte  te)

Retrieve tsort no.

of predecessors of transaction element.

Parameters
tetransaction element
Returns
no. of predecessors

Definition at line 420 of file rpmte.c.

Referenced by _rpmtsOrder(), collectTE(), and rpmte_Npreds().

const char* rpmteO ( rpmte  te)

Retrieve os string of transaction element.

Parameters
tetransaction element
Returns
os string

Definition at line 350 of file rpmte.c.

Referenced by _rpmtsCheck(), rpmpsmStage(), rpmte_O(), rpmtsAddInstallElement(), rpmtsProcess(), and rpmtsSanityCheck().

int rpmteOpen ( rpmte  te,
rpmts  ts,
int  reload_fi 
)
rpmuint32_t* rpmteOriginTid ( rpmte  te)

Retrieve transaction start time that package was first installed.

Parameters
tetransaction element
Returns
origin time

Definition at line 380 of file rpmte.c.

Referenced by populateInstallHeader().

rpmuint32_t* rpmteOriginTime ( rpmte  te)

Retrieve time that package was first installed.

Parameters
tetransaction element
Returns
origin time

Definition at line 385 of file rpmte.c.

Referenced by populateInstallHeader().

rpmte rpmteParent ( rpmte  te)

Retrieve parent transaction element.

Parameters
tetransaction element
Returns
parent transaction element

Definition at line 450 of file rpmte.c.

Referenced by rpmte_Parent().

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

Definition at line 375 of file rpmte.c.

Referenced by _rpmtsOrder(), and rpmte_PkgFileSize().

const char* rpmtePkgid ( rpmte  te)

Retrieve pkgid string from transaction element.

Parameters
tetransaction element
Returns
pkgid string

Definition at line 546 of file rpmte.c.

Referenced by rpmte_Pkgid().

const char* rpmteR ( rpmte  te)

Retrieve release string of transaction element.

Parameters
tetransaction element
Returns
release string

Definition at line 331 of file rpmte.c.

Referenced by ensureOlder(), rpmpsmStage(), and rpmte_R().

alKey rpmteSetAddedKey ( rpmte  te,
alKey  npkgKey 
)

Definition at line 520 of file rpmte.c.

References RPMAL_NOMATCH.

Referenced by _orgrpmtsOrder(), _rpmtsOrder(), and rpmtsAddInstallElement().

int rpmteSetBreadth ( rpmte  te,
int  nbreadth 
)

Set dependency tree breadth of transaction element.

Parameters
tetransaction element
nbreadthnew breadth
Returns
previous breadth

Definition at line 410 of file rpmte.c.

Referenced by _rpmtsOrder().

rpmuint32_t rpmteSetColor ( rpmte  te,
rpmuint32_t  color 
)

Set color bits of transaction element.

Parameters
tetransaction element
colornew color bits
Returns
previous color bits

Definition at line 365 of file rpmte.c.

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.

Definition at line 285 of file rpmte.c.

Referenced by rpmpsmStage().

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

Definition at line 472 of file rpmte.c.

Referenced by _rpmtsOrder(), and collectTE().

int rpmteSetDepth ( rpmte  te,
int  ndepth 
)

Set dependency tree depth of transaction element.

Parameters
tetransaction element
ndepthnew depth
Returns
previous depth

Definition at line 395 of file rpmte.c.

Referenced by _orgrpmtsOrder(), _rpmtsOrder(), addRelation(), collectTE(), and orgrpmAddRelation().

rpmfi rpmteSetFI ( rpmte  te,
rpmfi  fi 
)

Definition at line 601 of file rpmte.c.

References rpmfiFree(), and rpmfiLink().

Referenced by rpmteClose(), and rpmtsPrepare().

Header rpmteSetHeader ( rpmte  te,
Header  h 
)

Save header into transaction element.

Parameters
tetransaction element
hheader
Returns
NULL always

Definition at line 298 of file rpmte.c.

References headerFree(), and headerLink().

Referenced by rpmInstallSourcePackage(), rpmpsmStage(), rpmteClose(), rpmteOpen(), and rpmtsAddInstallElement().

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

Definition at line 425 of file rpmte.c.

Referenced by _orgrpmtsOrder(), and _rpmtsOrder().

rpmte rpmteSetParent ( rpmte  te,
rpmte  pte 
)

Set parent transaction element.

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

Definition at line 455 of file rpmte.c.

Referenced by _rpmtsOrder(), and collectTE().

int rpmteSetTree ( rpmte  te,
int  ntree 
)

Set tree index of transaction element.

Parameters
tetransaction element
ntreenew tree index
Returns
previous tree index

Definition at line 440 of file rpmte.c.

Referenced by _orgrpmtsOrder(), _rpmtsOrder(), and collectTE().

const char* rpmteSourcerpm ( rpmte  te)

Retrieve sourcerpm string from transaction element.

Parameters
tetransaction element
Returns
sourcerpm string

Definition at line 556 of file rpmte.c.

Referenced by rpmtsEraseDebuginfo().

int rpmteTree ( rpmte  te)

Retrieve tree index of transaction element.

Parameters
tetransaction element
Returns
tree index

Definition at line 435 of file rpmte.c.

Referenced by _rpmtsOrder(), collectTE(), and rpmte_Tree().

tsortInfo rpmteTSI ( rpmte  te)

Retrieve tsort info for transaction element.

Parameters
tetransaction element
Returns
tsort info

Definition at line 482 of file rpmte.c.

Referenced by _orgrpmtsOrder(), _rpmtsOrder(), addQ(), addRelation(), collectSCC(), collectTE(), detectSCCs(), markLoop(), orgrpmAddRelation(), rpmteFreeTSI(), tarjan(), and zapRelation().

rpmElementType rpmteType ( rpmte  te)
const char* rpmteV ( rpmte  te)

Retrieve version string of transaction element.

Parameters
tetransaction element
Returns
version string

Definition at line 326 of file rpmte.c.

Referenced by ensureOlder(), rpmpsmStage(), and rpmte_V().

static void rpmtsiFini ( void *  _tsi)
static

Definition at line 761 of file rpmte.c.

References rpmtsFree().

Referenced by rpmtsiGetPool().

static rpmtsi rpmtsiGetPool ( rpmioPool  pool)
static

Definition at line 775 of file rpmte.c.

References _rpmte_debug, _rpmtsiPool, rpmioGetPool(), rpmioNewPool(), and rpmtsiFini().

Referenced by XrpmtsiInit().

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

Definition at line 831 of file rpmte.c.

References rpmtsiNextElement().

Referenced by _orgrpmtsOrder(), _rpmtsCheck(), _rpmtsOrder(), addRelation(), detectSCCs(), orgrpmAddRelation(), rpmgiNext(), rpmts_iternext(), rpmtsAddFingerprints(), rpmtsAddInstallElement(), rpmtsClean(), rpmtsEmpty(), rpmtsFindBaseNamesInDB(), rpmtsMarkLinkedFailed(), rpmtsPrepare(), rpmtsProcess(), rpmtsRepackage(), rpmtsRollback(), rpmtsRunScript(), rpmtsSanityCheck(), and rpmtsSetup().

static rpmte rpmtsiNextElement ( rpmtsi  tsi)
static

Return next transaction element.

Parameters
tsitransaction element iterator
Returns
transaction element, NULL on termination

Definition at line 811 of file rpmte.c.

References rpmtsElement(), and rpmtsNElements().

Referenced by rpmtsiNext().

int rpmtsiOc ( rpmtsi  tsi)

Return transaction element index.

Parameters
tsitransaction element iterator
Returns
transaction element index

Definition at line 755 of file rpmte.c.

Referenced by _rpmtsOrder(), rpmtsFindBaseNamesInDB(), and rpmtsProcess().

rpmtsi XrpmtsiInit ( rpmts  ts,
const char *  fn,
unsigned int  ln 
)

Create transaction element iterator.

Parameters
tstransaction set
fn
ln
Returns
transaction element iterator

Definition at line 791 of file rpmte.c.

References rpmioLinkPoolItem(), rpmtsiGetPool(), rpmtsLink(), and rpmtsNElements().

Variable Documentation

int __mydebug = 0
static

Definition at line 680 of file rpmte.c.

int _rpmte_debug = 0

Definition at line 26 of file rpmte.c.

Referenced by rpmte_Debug(), rpmteGetPool(), and rpmtsiGetPool().

rpmioPool _rpmtePool

Definition at line 227 of file rpmte.c.

Referenced by rpmteGetPool().

rpmioPool _rpmtsiPool

Definition at line 773 of file rpmte.c.

Referenced by rpmtsiGetPool().