rpm
5.4.14
|
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"
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_t * | rpmteOriginTid (rpmte te) |
Retrieve transaction start time that package was first installed. More... | |
rpmuint32_t * | rpmteOriginTime (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 |
Routine(s) to handle an "rpmte" transaction element.
Definition in file rpmte.c.
Initialize transaction element data from header.
ts | transaction set |
p | transaction element |
h | header |
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(), assert(), _HE_s::c, headerGet(), headerIsEntry(), i, key, memset(), NULL, _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(), sprintf(), rpmDataType_u::str, t, _HE_s::tag, rpmDataType_u::ui32p, rpmDataType_u::ui8p, unsigned, void, xmalloc, xstrdup(), and xx.
Referenced by rpmteNew().
Destroy transaction element data.
p | transaction element |
Definition at line 47 of file rpmte.c.
References _free(), argvFree(), assert(), fdFree(), headerFree, NULL, rpmfiFree(), rpmfiFreeRelocations(), rpmteCleanDS(), and void.
Referenced by rpmteFini().
Definition at line 515 of file rpmte.c.
References NULL, and RPMAL_NOMATCH.
Referenced by rpmtsAddInstallElement(), rpmtsAddObsoletes(), and rpmtsAddUpgrades().
Definition at line 922 of file rpmte.c.
References NULL, ptr, RPMCALLBACK_INST_CLOSE_FILE, rpmteSetFI(), rpmteSetHeader(), rpmtsNotify(), TR_ADDED, TR_REMOVED, and void.
Referenced by rpmteFDHeader(), rpmtsProcess(), and rpmtsRunScript().
Definition at line 843 of file rpmte.c.
References h, headerLink(), mi, NULL, RPMDBI_PACKAGES, rpmmiFree(), rpmmiNext(), and rpmtsInitIterator().
Referenced by rpmteOpen().
Definition at line 856 of file rpmte.c.
References h, NULL, RPMCALLBACK_INST_OPEN_FILE, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), rpmteClose(), rpmteFd(), rpmteNEVR(), rpmtsNotify(), rpmtsSetVSFlags(), rpmtsVSFlags(), RPMVSF_NEEDPAYLOAD, and void.
Referenced by rpmteOpen(), and rpmtsProcess().
Definition at line 229 of file rpmte.c.
References _rpmte_debug, _rpmtePool, memset(), NULL, rpmioGetPool(), rpmioNewPool(), rpmteFini(), and te.
Referenced by rpmteNew().
Definition at line 950 of file rpmte.c.
References fi, NULL, rc, RPMTAG_POSTTRANS, and RPMTAG_PRETRANS.
Referenced by rpmtsRunScript().
Definition at line 880 of file rpmte.c.
References exit, h, headerFree, NULL, rc, rpmfiNew(), RPMTAG_BASENAMES, rpmteDBHeader(), rpmteDBInstance(), rpmteFDHeader(), rpmteSetHeader(), rpmteType(), TR_ADDED, TR_REMOVED, and void.
Referenced by rpmtsProcess(), and rpmtsRunScript().
Definition at line 520 of file rpmte.c.
References NULL, and RPMAL_NOMATCH.
Referenced by rpmtsAddInstallElement().
Definition at line 601 of file rpmte.c.
References NULL, rpmfiFree(), and rpmfiLink().
Referenced by rpmteClose(), and rpmtsPrepare().
Definition at line 761 of file rpmte.c.
References NULL, rpmtsFree(), and void.
Referenced by rpmtsiGetPool().
Definition at line 775 of file rpmte.c.
References _rpmte_debug, _rpmtsiPool, memset(), NULL, rpmioGetPool(), rpmioNewPool(), and rpmtsiFini().
Referenced by XrpmtsiInit().
Return next transaction element.
tsi | transaction element iterator |
Definition at line 811 of file rpmte.c.
References NULL, oc, rpmtsElement(), rpmtsNElements(), and te.
Referenced by rpmtsiNext().
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().