35 #if defined(_RPMTE_INTERNAL) 40 typedef struct relation_s * relation;
42 #if defined(_RPMTS_ORDER_INTERNAL) 46 struct relation_s * rel_next;
65 relation tsi_relations;
66 relation tsi_forward_relations;
76 struct rpmChainLink_s {
87 typedef struct sharedFileInfo_s * sharedFileInfo;
92 struct sharedFileInfo_s {
117 const char * sourcerpm;
126 #ifdef RPM_VENDOR_MANDRIVA 142 uint32_t db_instance;
172 sharedFileInfo replaced;
175 struct rpmChainLink_s blink;
176 struct rpmChainLink_s flink;
194 #if defined(__LCLINT__) 210 #if defined(__LCLINT__) 259 #define rpmteFree(_te) \ 260 ((rpmte) rpmioFreePoolItem((rpmioItem)(_te), __FUNCTION__, __FILE__, __LINE__)) 573 #if defined(_RPMTE_INTERNAL) 716 #define RPMTE_CHAIN_END "CHAIN END" 723 int rpmtsiOc(rpmtsi tsi) 735 #define rpmtsiFree(_tsi) \ 736 ((rpmtsi)rpmioFreePoolItem((rpmioItem)(_tsi), __FUNCTION__, __FILE__, __LINE__)) 756 const char * fn,
unsigned int ln)
758 #define rpmtsiInit(_ts) XrpmtsiInit(_ts, __FILE__, __LINE__) 774 static inline void rpmtePrintID(
rpmte p)
779 if (p->blink.Pkgid)
argvPrint(
"blink.Pkgid", p->blink.Pkgid, NULL);
780 if (p->blink.Hdrid)
argvPrint(
"blink.Hdrid", p->blink.Hdrid, NULL);
781 if (p->blink.NEVRA)
argvPrint(
"blink.NEVRA", p->blink.NEVRA, NULL);
782 if (p->flink.Pkgid)
argvPrint(
"flink.Pkgid", p->flink.Pkgid, NULL);
783 if (p->flink.Hdrid)
argvPrint(
"flink.Hdrid", p->flink.Hdrid, NULL);
784 if (p->flink.NEVRA)
argvPrint(
"flink.NEVRA", p->flink.NEVRA, NULL);
790 static inline void hdrPrintInstalled(
Header h)
794 const char * qfmt =
"[%{erasednevra} O:%{packageorigin} P:%{erasedpkgid} H:%{erasedhdrid}\n]";
795 const char * errstr =
"(unknown error)";
801 fprintf(stderr,
"error: %s\n", errstr);
803 fprintf(stderr,
"%s", str);
810 static inline void hdrPrintErased(
Header h)
814 const char * qfmt =
"[%{installednevra} O:%{packageorigin} P:%{installedpkgid} H:%{installedhdrid}\n]";
815 const char * errstr =
"(unknown error)";
820 fprintf(stderr,
"error: %s\n", errstr);
822 fprintf(stderr,
"%s", str);
833 typedef struct rpmfs_s * rpmfs;
837 struct sharedFileInfo_s {
843 typedef char rpm_fstate_t;
848 rpm_fstate_t * states;
849 rpmFileAction * actions;
851 sharedFileInfo replaced;
853 int allocatedReplaced;
859 rpmfs rpmteGetFileStates(
rpmte te);
861 rpmfs rpmfsFree(rpmfs fs);
862 rpm_count_t rpmfsFC(rpmfs fs);
863 void rpmfsAddReplaced(rpmfs fs,
int pkgFileNum,
int otherPkg,
int otherFileNum);
864 sharedFileInfo rpmfsGetReplaced(rpmfs fs);
865 sharedFileInfo rpmfsNextReplaced(rpmfs fs , sharedFileInfo replaced);
866 void rpmfsSetState(rpmfs fs,
unsigned int ix,
rpmfileState state);
869 rpm_fstate_t * rpmfsGetStates(rpmfs fs);
870 void rpmfsSetAction(rpmfs fs,
unsigned int ix, rpmFileAction action);
void rpmteColorDS(rpmte te, rpmTag tag)
Calculate transaction element dependency colors/refs from file info.
rpmElementType rpmteType(rpmte te)
Retrieve type of transaction element.
int rpmteClose(rpmte te, rpmts ts, int reset_fi)
rpmuint32_t rpmteSetColor(rpmte te, rpmuint32_t color)
Set color bits of transaction element.
headerTagTableEntry rpmTagTable
Automatically generated table of tag name/value pairs.
int rpmteOpen(rpmte te, rpmts ts, int reload_fi)
Header rpmteFDHeader(rpmts ts, rpmte te)
Header rpmteDBHeader(rpmts ts, uint32_t rec)
int rpmteSetDegree(rpmte te, int ndegree)
Set number of children of transaction element.
const char * rpmteN(rpmte te)
Retrieve name string of transaction element.
void rpmteFreeTSI(rpmte te)
Destroy tsort info of transaction element.
rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
Return next transaction element of type.
Structure(s) used for file info tag sets.
rpmds rpmteDS(rpmte te, rpmTag tag)
Retrieve dependency tag set from transaction element.
uint32_t rpmteDBInstance(rpmte te)
Retrieve last instance installed to the database.
#define reverse(bot, top)
const char * rpmteR(rpmte te)
Retrieve release string of transaction element.
struct rpmtsi_s * rpmtsi
Transaction element iterator.
int rpmteSetBreadth(rpmte te, int nbreadth)
Set dependency tree breadth of transaction element.
struct rpmps_s * rpmps
Transaction problems found while processing a transaction set/.
FD_t rpmteFd(rpmte te)
Retrieve file handle from transaction element.
int rpmteIsSource(rpmte te)
Retrieve isSource attribute of transaction element.
void rpmteSetDBInstance(rpmte te, unsigned int instance)
Set last instance installed to the database.
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
int rpmteHaveTransScript(rpmte te, rpmTag tag)
struct rpmPRCO_s * rpmPRCO
Container for commonly extracted dependency set(s).
int rpmteDepth(rpmte te)
Retrieve dependency tree depth of transaction element.
rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, fnpyKey key, rpmRelocation relocs, uint32_t dboffset, alKey pkgKey)
Create a transaction element.
int rpmteSetTree(rpmte te, int ntree)
Set tree index of transaction element.
char * headerSprintf(Header h, const char *fmt, headerTagTableEntry tags, headerSprintfExtension exts, errmsg_t *errmsg)
Return formatted output string from header tags.
const char * rpmteNEVR(rpmte te)
Retrieve name-version-release string from transaction element.
struct rpmte_s * rpmte
An element of a transaction set, i.e.
struct tsortInfo_s * tsortInfo
Transaction element ordering chain linkage.
alKey rpmteSetAddedKey(rpmte te, alKey npkgKey)
enum rpmElementType_e rpmElementType
Transaction element type.
void rpmteCleanDS(rpmte te)
Destroy dependency set info of transaction element.
const char * rpmteE(rpmte te)
Retrieve epoch string of transaction element.
const char * rpmteV(rpmte te)
Retrieve version string of transaction element.
void rpmteNewTSI(rpmte te)
Initialize tsort info of transaction element.
rpmuint32_t rpmteColor(rpmte te)
Retrieve color bits of transaction element.
alKey rpmteAddedKey(rpmte te)
int rpmteDegree(rpmte te)
Retrieve number of children of transaction element.
const char * rpmteA(rpmte te)
Retrieve arch string of transaction element.
int rpmteBreadth(rpmte te)
Retrieve dependency tree breadth of transaction element.
struct rpmfi_s * rpmfi
File info tag sets from a header, so that a header can be discarded early.
enum evrFlags_e rpmsenseFlags
rpmuint32_t rpmtePkgFileSize(rpmte te)
Retrieve size in bytes of package file.
int rpmteDBOffset(rpmte te)
Retrieve rpmdb instance of TR_REMOVED transaction element.
The FD_t File Handle data structure.
int rpmteChain(rpmte p, rpmte q, Header oh, const char *msg)
Chain p <-> q forward/backward transaction element links.
rpmuint32_t * rpmteOriginTime(rpmte te)
Retrieve time that package was first installed.
void * alKey
An added/available package retrieval key.
rpmElementType_e
Transaction element type.
const char * rpmteHdrid(rpmte te)
Retrieve hdrid string from transaction element.
void argvPrint(const char *msg, ARGV_t argv, FILE *fp)
Print argv array elements.
const char * rpmteNEVRA(rpmte te)
Retrieve name-version-release.arch string from transaction element.
enum rpmfileState_e rpmfileState
File States (when installed).
rpmte rpmteSetParent(rpmte te, rpmte pte)
Set parent transaction element.
rpmuint32_t * rpmteOriginTid(rpmte te)
Retrieve transaction start time that package was first installed.
rpmte rpmteParent(rpmte te)
Retrieve parent transaction element.
const char * rpmteSourcerpm(rpmte te)
Retrieve sourcerpm string from transaction element.
struct rpmts_s * rpmts
The RPM Transaction Set.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
rpmfi rpmteSetFI(rpmte te, rpmfi fi)
const char * rpmteD(rpmte te)
Retrieve distepoch string of transaction element.
rpmfi rpmteFI(rpmte te, rpmTag tag)
Retrieve file info tag set from transaction element.
const char * rpmtePkgid(rpmte te)
Retrieve pkgid string from transaction element.
Header rpmteHeader(rpmte te)
Retrieve header from transaction element.
int rpmteSetDepth(rpmte te, int ndepth)
Set dependency tree depth of transaction element.
int rpmteNpreds(rpmte te)
Retrieve tsort no.
Structures used for managing added/available package lists.
int rpmteSetNpreds(rpmte te, int npreds)
Set tsort no.
int rpmteFailed(rpmte te)
int rpmteTree(rpmte te)
Retrieve tree index of transaction element.
Header rpmteSetHeader(rpmte te, Header h)
Save header into transaction element.
fnpyKey rpmteKey(rpmte te)
Retrieve key from transaction element.
const char * rpmteO(rpmte te)
Retrieve os string of transaction element.
rpmtsi XrpmtsiInit(rpmts ts, const char *fn, unsigned int ln)
Create transaction element iterator.
tsortInfo rpmteTSI(rpmte te)
Retrieve tsort info for transaction element.