41 #if defined(_RPMTE_INTERNAL)
46 typedef struct relation_s * relation;
48 #if defined(_RPMTS_ORDER_INTERNAL)
52 struct relation_s * rel_next;
71 relation tsi_relations;
72 relation tsi_forward_relations;
82 struct rpmChainLink_s {
93 typedef struct sharedFileInfo_s * sharedFileInfo;
98 struct sharedFileInfo_s {
123 const char * sourcerpm;
132 #ifdef RPM_VENDOR_MANDRIVA
148 uint32_t db_instance;
178 sharedFileInfo replaced;
181 struct rpmChainLink_s blink;
182 struct rpmChainLink_s flink;
200 #if defined(__LCLINT__)
216 #if defined(__LCLINT__)
265 #define rpmteFree(_te) \
266 ((rpmte) rpmioFreePoolItem((rpmioItem)(_te), __FUNCTION__, __FILE__, __LINE__))
579 #if defined(_RPMTE_INTERNAL)
722 #define RPMTE_CHAIN_END "CHAIN END"
729 int rpmtsiOc(rpmtsi tsi)
741 #define rpmtsiFree(_tsi) \
742 ((rpmtsi)rpmioFreePoolItem((rpmioItem)(_tsi), __FUNCTION__, __FILE__, __LINE__))
762 const char *
fn,
unsigned int ln)
764 #define rpmtsiInit(_ts) XrpmtsiInit(_ts, __FILE__, __LINE__)
780 static inline void rpmtePrintID(
rpmte p)
785 if (p->blink.Pkgid)
argvPrint(
"blink.Pkgid", p->blink.Pkgid,
NULL);
786 if (p->blink.Hdrid)
argvPrint(
"blink.Hdrid", p->blink.Hdrid,
NULL);
787 if (p->blink.NEVRA)
argvPrint(
"blink.NEVRA", p->blink.NEVRA,
NULL);
788 if (p->flink.Pkgid)
argvPrint(
"flink.Pkgid", p->flink.Pkgid,
NULL);
789 if (p->flink.Hdrid)
argvPrint(
"flink.Hdrid", p->flink.Hdrid,
NULL);
790 if (p->flink.NEVRA)
argvPrint(
"flink.NEVRA", p->flink.NEVRA,
NULL);
796 static inline void hdrPrintInstalled(
Header h)
800 const char * qfmt =
"[%{erasednevra} O:%{packageorigin} P:%{erasedpkgid} H:%{erasedhdrid}\n]";
801 const char * errstr =
"(unknown error)";
807 fprintf(stderr,
"error: %s\n", errstr);
816 static inline void hdrPrintErased(
Header h)
820 const char * qfmt =
"[%{installednevra} O:%{packageorigin} P:%{installedpkgid} H:%{installedhdrid}\n]";
821 const char * errstr =
"(unknown error)";
826 fprintf(stderr,
"error: %s\n", errstr);
839 typedef struct rpmfs_s * rpmfs;
843 struct sharedFileInfo_s {
849 typedef char rpm_fstate_t;
854 rpm_fstate_t * states;
855 rpmFileAction * actions;
857 sharedFileInfo replaced;
859 int allocatedReplaced;
865 rpmfs rpmteGetFileStates(
rpmte te);
867 rpmfs rpmfsFree(rpmfs fs);
868 rpm_count_t rpmfsFC(rpmfs fs);
869 void rpmfsAddReplaced(rpmfs fs,
int pkgFileNum,
int otherPkg,
int otherFileNum);
870 sharedFileInfo rpmfsGetReplaced(rpmfs fs);
871 sharedFileInfo rpmfsNextReplaced(rpmfs fs , sharedFileInfo replaced);
872 void rpmfsSetState(rpmfs fs,
unsigned int ix,
rpmfileState state);
875 rpm_fstate_t * rpmfsGetStates(rpmfs fs);
876 void rpmfsSetAction(rpmfs fs,
unsigned int ix, rpmFileAction action);
const char * rpmteV(rpmte te)
Retrieve version string of transaction element.
int rpmteBreadth(rpmte te)
Retrieve dependency tree breadth of transaction element.
const char * rpmteNEVRA(rpmte te)
Retrieve name-version-release.arch string from transaction element.
int rpmteClose(rpmte te, rpmts ts, int reset_fi)
rpmuint32_t * rpmteOriginTime(rpmte te)
Retrieve time that package was first installed.
headerTagTableEntry rpmTagTable
Automatically generated table of tag name/value pairs.
const char * rpmtePkgid(rpmte te)
Retrieve pkgid string from transaction element.
int rpmteTree(rpmte te)
Retrieve tree index of transaction element.
int rpmteOpen(rpmte te, rpmts ts, int reload_fi)
void rpmteFreeTSI(rpmte te)
Destroy tsort info of transaction element.
rpmuint32_t rpmteColor(rpmte te)
Retrieve color bits of transaction element.
Header rpmteFDHeader(rpmts ts, rpmte te)
struct rpmte_s * rpmte
An element of a transaction set, i.e.
Header rpmteDBHeader(rpmts ts, uint32_t rec)
rpmte rpmteSetParent(rpmte te, rpmte pte)
Set parent transaction element.
static PyObject *int type
void * alKey
An added/available package retrieval key.
struct rpmPRCO_s * rpmPRCO
Container for commonly extracted dependency set(s).
int rpmteSetNpreds(rpmte te, int npreds)
Set tsort no.
Structure(s) used for file info tag sets.
rpmfi rpmteFI(rpmte te, rpmTag tag)
Retrieve file info tag set from transaction element.
rpmuint32_t * rpmteOriginTid(rpmte te)
Retrieve transaction start time that package was first installed.
struct rpmts_s * rpmts
The RPM Transaction Set.
int rpmteDepth(rpmte te)
Retrieve dependency tree depth of transaction element.
int rpmteNpreds(rpmte te)
Retrieve tsort no.
int rpmteSetBreadth(rpmte te, int nbreadth)
Set dependency tree breadth of transaction element.
#define reverse(bot, top)
rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
Return next transaction element of type.
FD_t rpmteFd(rpmte te)
Retrieve file handle from transaction element.
struct rpmps_s * rpmps
Transaction problems found while processing a transaction set/.
const char * rpmteN(rpmte te)
Retrieve name string of transaction element.
int rpmteHaveTransScript(rpmte te, rpmTag tag)
const char * rpmteA(rpmte te)
Retrieve arch string of transaction element.
int rpmteSetDegree(rpmte te, int ndegree)
Set number of children of transaction element.
rpmds rpmteDS(rpmte te, rpmTag tag)
Retrieve dependency tag set from transaction element.
alKey rpmteSetAddedKey(rpmte te, alKey npkgKey)
int rpmteChain(rpmte p, rpmte q, Header oh, const char *msg)
Chain p <-> q forward/backward transaction element links.
enum rpmElementType_e rpmElementType
Transaction element type.
rpmuint32_t rpmteSetColor(rpmte te, rpmuint32_t color)
Set color bits of transaction element.
rpmElementType_e
Transaction element type.
int rpmteSetTree(rpmte te, int ntree)
Set tree index of transaction element.
void rpmteColorDS(rpmte te, rpmTag tag)
Calculate transaction element dependency colors/refs from file info.
alKey rpmteAddedKey(rpmte te)
fprintf(stderr,"--> %s(%p,%p,%p) sig %p sigp %p\n", __FUNCTION__, dig, t, rsactx, sig, sigp)
enum evrFlags_e rpmsenseFlags
void rpmteNewTSI(rpmte te)
Initialize tsort info of transaction element.
struct tsortInfo_s * tsortInfo
Transaction element ordering chain linkage.
The FD_t File Handle data structure.
rpmtsi XrpmtsiInit(rpmts ts, const char *fn, unsigned int ln)
Create transaction element iterator.
int rpmteSetDepth(rpmte te, int ndepth)
Set dependency tree depth of transaction element.
const char * rpmteSourcerpm(rpmte te)
Retrieve sourcerpm string from transaction element.
rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, fnpyKey key, rpmRelocation relocs, uint32_t dboffset, alKey pkgKey)
Create a transaction element.
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
void argvPrint(const char *msg, ARGV_t argv, FILE *fp)
Print argv array elements.
Header rpmteSetHeader(rpmte te, Header h)
Save header into transaction element.
int rpmteDegree(rpmte te)
Retrieve number of children of transaction element.
int rpmteIsSource(rpmte te)
Retrieve isSource attribute of transaction element.
const char * rpmteD(rpmte te)
Retrieve distepoch string of transaction element.
void rpmteCleanDS(rpmte te)
Destroy dependency set info of transaction element.
enum rpmfileState_e rpmfileState
File States (when installed).
struct rpmtsi_s * rpmtsi
Transaction element iterator.
void rpmteSetDBInstance(rpmte te, unsigned int instance)
Set last instance installed to the database.
rpmte rpmteParent(rpmte te)
Retrieve parent transaction element.
const char * rpmteO(rpmte te)
Retrieve os string of transaction element.
static PyObject *rpmtransFlags transFlags
const char * rpmteE(rpmte te)
Retrieve epoch string of transaction element.
rpmfi rpmteSetFI(rpmte te, rpmfi fi)
rpmElementType rpmteType(rpmte te)
Retrieve type of transaction element.
Header rpmteHeader(rpmte te)
Retrieve header from transaction element.
tsortInfo rpmteTSI(rpmte te)
Retrieve tsort info for transaction element.
Structures used for managing added/available package lists.
const char * rpmteNEVR(rpmte te)
Retrieve name-version-release string from transaction element.
int rpmteFailed(rpmte te)
struct rpmfi_s * rpmfi
File info tag sets from a header, so that a header can be discarded early.
const char * rpmteR(rpmte te)
Retrieve release string of transaction element.
fnpyKey rpmteKey(rpmte te)
Retrieve key from transaction element.
int rpmteDBOffset(rpmte te)
Retrieve rpmdb instance of TR_REMOVED transaction element.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
uint32_t rpmteDBInstance(rpmte te)
Retrieve last instance installed to the database.
rpmuint32_t rpmtePkgFileSize(rpmte te)
Retrieve size in bytes of package file.
const char * rpmteHdrid(rpmte te)
Retrieve hdrid string from transaction element.