1 #ifndef _RPMTE_INTERNAL_H
2 #define _RPMTE_INTERNAL_H
8 * Dependncy ordering information.
12 rpmte rel_suc; // pkg requiring this package
13 rpmsenseFlags rel_flags; // accumulated flags of the requirements
14 struct relation_s * rel_next;
17 typedef struct relation_s * relation;
20 int tsi_count; // #pkgs this pkg requires
21 int tsi_qcnt; // #pkgs requiring this package
22 int tsi_reqx; // requires Idx/mark as (queued/loop)
23 struct relation_s * tsi_relations;
24 struct relation_s * tsi_forward_relations;
25 rpmte tsi_suc; // used for queuing (addQ)
26 int tsi_SccIdx; // # of the SCC the node belongs to
27 // (1 for trivial SCCs)
28 int tsi_SccLowlink; // used for SCC detection
33 typedef struct sharedFileInfo_s * sharedFileInfo;
36 * Transaction element file states.
38 typedef struct rpmfs_s * rpmfs;
42 struct sharedFileInfo_s {
48 typedef char rpm_fstate_t;
53 rpm_fstate_t * states;
54 rpmFileAction * actions; /*!< File disposition(s). */
56 sharedFileInfo replaced; /*!< (TR_ADDED) to be replaced files in the rpmdb */
58 int allocatedReplaced;
62 * Iterator across transaction elements, forward on install, backward on erase.
65 rpmts ts; /*!< transaction set. */
66 int reverse; /*!< reversed traversal? */
67 int ocsave; /*!< last returned iterator index. */
68 int oc; /*!< iterator index. */
72 rpmfi rpmteSetFI(rpmte te, rpmfi fi);
75 FD_t rpmteSetFd(rpmte te, FD_t fd);
78 int rpmteOpen(rpmte te, rpmts ts, int reload_fi);
81 int rpmteClose(rpmte te, rpmts ts, int reset_fi);
84 int rpmteMarkFailed(rpmte te, rpmts ts);
87 int rpmteHaveTransScript(rpmte te, rpmTag tag);
90 rpmps rpmteProblems(rpmte te);
93 rpmfs rpmteGetFileStates(rpmte te);
96 rpmfs rpmfsNew(unsigned int fc, rpmElementType type);
99 rpmfs rpmfsFree(rpmfs fs);
102 rpm_count_t rpmfsFC(rpmfs fs);
105 void rpmfsAddReplaced(rpmfs fs, int pkgFileNum, int otherPkg, int otherFileNum);
108 sharedFileInfo rpmfsGetReplaced(rpmfs fs);
111 sharedFileInfo rpmfsNextReplaced(rpmfs fs , sharedFileInfo replaced);
114 void rpmfsSetState(rpmfs fs, unsigned int ix, rpmfileState state);
117 rpmfileState rpmfsGetState(rpmfs fs, unsigned int ix);
123 rpm_fstate_t * rpmfsGetStates(rpmfs fs);
126 rpmFileAction rpmfsGetAction(rpmfs fs, unsigned int ix);
129 void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action);
131 /* XXX here for now... */
133 * Relocate files in header.
134 * @todo multilib file dispositions need to be checked.
135 * @param relocations relocations
136 * @param numRelocations number of relocations
137 * @param fs file state set
138 * @param h package header to relocate
141 void rpmRelocateFileList(rpmRelocation *relocs, int numRelocations, rpmfs fs, Header h);
143 #endif /* _RPMTE_INTERNAL_H */