rpm  5.4.10
rpmts.h
Go to the documentation of this file.
1 #ifndef H_RPMTS
2 #define H_RPMTS
3 
9 #include "rpmps.h"
10 #include "rpmsw.h"
11 #include <rpmpgp.h> /* XXX pgpVSFlags */
12 #if defined(_RPMTS_INTERNAL)
13 #include <rpmbag.h>
14 #endif
15 
16 /*@-exportlocal@*/
17 /*@unchecked@*/
18 extern int _rpmts_debug;
19 /*@unchecked@*/
20 extern int _rpmts_macros;
21 /*@unchecked@*/
22 extern int _rpmts_stats;
23 /*@unchecked@*/
24 extern int _fps_debug;
25 /*@=exportlocal@*/
26 
31 
36 typedef enum rpmdepFlags_e {
44  RPMDEPS_FLAG_ANACONDA = (1 << 6),
48 } rpmdepFlags;
49 
54 typedef enum rpmtransFlags_e {
56  RPMTRANS_FLAG_TEST = (1 << 0),
59  RPMTRANS_FLAG_JUSTDB = (1 << 3),
61  RPMTRANS_FLAG_NODOCS = (1 << 5),
63  /* 7 unused */
69 /*@-enummemuse@*/
70  RPMTRANS_FLAG_PKGUNDO = (1 << 12),
71 /*@=enummemuse@*/
72  RPMTRANS_FLAG_COMMIT = (1 << 13),
73 /*@-enummemuse@*/
74  RPMTRANS_FLAG_UNDO = (1 << 14),
75 /*@=enummemuse@*/
77 
79  RPMTRANS_FLAG_NOPRE = (1 << 17),
80  RPMTRANS_FLAG_NOPOST = (1 << 18),
83  RPMTRANS_FLAG_NOPREUN = (1 << 21),
84  RPMTRANS_FLAG_NOPOSTUN = (1 << 22),
86 /*@-enummemuse@*/
88 /*@=enummemuse@*/
89  RPMTRANS_FLAG_NORPMDB = (1 << 25),
90  RPMTRANS_FLAG_NOPOLICY = (1 << 26),
95  /* 31 unused */
97 
98 #define _noTransScripts \
99  ( RPMTRANS_FLAG_NOPRETRANS | \
100  RPMTRANS_FLAG_NOPRE | \
101  RPMTRANS_FLAG_NOPOST | \
102  RPMTRANS_FLAG_NOPREUN | \
103  RPMTRANS_FLAG_NOPOSTUN | \
104  RPMTRANS_FLAG_NOPOSTTRANS \
105  )
106 
107 #define _noTransTriggers \
108  ( RPMTRANS_FLAG_NOTRIGGERPREIN | \
109  RPMTRANS_FLAG_NOTRIGGERIN | \
110  RPMTRANS_FLAG_NOTRIGGERUN | \
111  RPMTRANS_FLAG_NOTRIGGERPOSTUN \
112  )
113 
117 typedef enum rpmtsOpX_e {
140 } rpmtsOpX;
141 
145 typedef enum rpmTSType_e {
149 } rpmTSType;
150 
153 typedef enum tsStage_e {
157 } tsmStage;
158 
159 #if defined(_RPMTS_INTERNAL)
160 
161 #include <rpmbf.h>
162 #include "rpmhash.h" /* XXX hashTable */
163 #include "rpmkeyring.h"
164 #include <rpmtxn.h>
165 #include "rpmal.h" /* XXX availablePackage/relocateFileList ,*/
166 
167 /*@unchecked@*/
168 /*@-exportlocal@*/
169 extern int _cacheDependsRC;
170 /*@=exportlocal@*/
171 
174 typedef /*@abstract@*/ struct diskspaceInfo_s * rpmDiskSpaceInfo;
175 
179 struct diskspaceInfo_s {
180  unsigned long f_bsize;
181  unsigned long f_frsize;
182  unsigned long long f_blocks;
183  unsigned long long f_bfree;
184  signed long long f_bavail;
185  unsigned long long f_files;
186  unsigned long long f_ffree;
187  signed long long f_favail;
188  unsigned long f_fsid;
189  unsigned long f_flag;
190  unsigned long f_namemax;
192  signed long long bneeded;
193  signed long long ineeded;
194  signed long long obneeded;
195  signed long long oineeded;
196  dev_t dev;
197 };
198 
202 #define adj_fs_blocks(_nb) (((_nb) * 21) / 20)
203 
204 #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))
205 
209 struct rpmts_s {
210  struct rpmioItem_s _item;
211  rpmdepFlags depFlags;
212  rpmtransFlags transFlags;
213  tsmStage goal;
214  rpmTSType type;
216 /*@refcounted@*/ /*@null@*/
217  rpmbag bag;
218 /*@null@*/
219  int (*solve) (rpmts ts, rpmds key, const void * data)
220  /*@modifies ts @*/;
221 /*@relnull@*/
222  const void * solveData;
223  int nsuggests;
224 /*@only@*/ /*@null@*/
225  const void ** suggests;
227 /*@observer@*/ /*@null@*/
228  rpmCallbackFunction notify;
229 /*@observer@*/ /*@null@*/
230  rpmCallbackData notifyData;
232 /*@null@*/
233  rpmPRCO PRCO;
235 /*@refcounted@*/ /*@null@*/
236  rpmps probs;
237  rpmprobFilterFlags ignoreSet;
240  rpmuint32_t filesystemCount;
241 /*@dependent@*/ /*@null@*/
242  const char ** filesystems;
243 /*@only@*/ /*@relnull@*/
244  rpmDiskSpaceInfo dsi;
246 /*@refcounted@*/ /*@null@*/
247  rpmdb rdb;
248  int dbmode;
249 /*@only@*/
250  hashTable ht;
251 /*@null@*/
252  rpmtxn txn;
254 /*@refcounted@*/ /*@null@*/
255  rpmbf rbf;
256 /*@only@*/ /*@null@*/
257  uint32_t * removedPackages;
258  int numRemovedPackages;
259  int allocedRemovedPackages;
261 /*@only@*/
262  rpmal addedPackages;
263  int numAddedPackages;
264  int numAddedFiles;
266 /*@only@*/
267  rpmal erasedPackages;
268  int numErasedPackages;
269  int numErasedFiles;
271 #ifndef DYING
272 /*@only@*/
273  rpmal availablePackages;
274  int numAvailablePackages;
275 #endif
276 
277 /*@null@*/
278  rpmte relocateElement;
280 /*@owned@*/ /*@relnull@*/
281  rpmte * order;
282  int orderCount;
283  int orderAlloced;
284  int unorderedSuccessors;
285  int ntrees;
286  int maxDepth;
288 /*@dependent@*/ /*@relnull@*/
289  rpmte teInstall;
290 /*@dependent@*/ /*@relnull@*/
291  rpmte teErase;
293  int selinuxEnabled;
294  int chrootDone;
295 /*@only@*/ /*@null@*/
296  const char * rootDir;
297 /*@only@*/ /*@null@*/
298  const char * currDir;
299 /*@null@*/
300  FD_t scriptFd;
301  int delta;
302  rpmuint32_t tid[2];
304  rpmuint32_t color;
305  rpmuint32_t prefcolor;
307 /*@observer@*/ /*@dependent@*/ /*@null@*/
308  const char * fn;
310 /*@refcounted@*/ /*@relnull@*/
311  rpmKeyring keyring;
312 /*@relnull@*/
313  void * hkp;
315  struct rpmop_s ops[RPMTS_OP_MAX];
316 
317 /*@refcounted@*/ /*@relnull@*/
318  pgpDig dig;
320 /*@null@*/
321  Spec spec;
323  rpmuint32_t arbgoal;
325 #if defined(__LCLINT__)
326 /*@refs@*/
327  int nrefs;
328 #endif
329 };
330 #endif /* _RPMTS_INTERNAL */
331 
332 #ifdef __cplusplus
333 extern "C" {
334 #endif
335 
346 extern int (*rpmtsCheck) (rpmts ts)
347  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
348  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
349 int _rpmtsCheck(rpmts ts)
350  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
351  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
352 
369 extern int (*rpmtsOrder) (rpmts ts)
370  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
371  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
372 int _rpmtsOrder(rpmts ts)
373  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
374  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
375 int _orgrpmtsOrder(rpmts ts)
376  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
377  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
378 
396 extern int (*rpmtsRun) (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
397  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
398  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
399 int _rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
400  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
401  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
402 
412  int running, rpmte rbte)
413  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
414  /*@modifies rbts, rbte, rpmGlobalMacroContext, fileSystem, internalState @*/;
415 
422 /*@unused@*/ /*@null@*/
423 rpmts rpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
424  const char * msg)
425  /*@modifies ts @*/;
426 #define rpmtsUnlink(_ts, _msg) \
427  ((rpmts) rpmioUnlinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__))
428 
435 /*@unused@*/ /*@newref@*/
436 rpmts rpmtsLink (rpmts ts, const char * msg)
437  /*@modifies ts @*/;
438 #define rpmtsLink(_ts, _msg) \
439  ((rpmts) rpmioLinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__))
440 
446 int rpmtsCloseDB(rpmts ts)
447  /*@globals fileSystem @*/
448  /*@modifies ts, fileSystem @*/;
449 
456 int rpmtsOpenDB(rpmts ts, int dbmode)
457  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
458  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
459 
467 static inline /*@unused@*/
468 int rpmtsInitDB(/*@unused@*/ rpmts ts, /*@unused@*/ int dbmode)
469  /*@*/
470 {
471  return -1;
472 }
473 
479 int rpmtsRebuildDB(rpmts ts)
480  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
481  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
482 
489 static inline /*@unused@*/
490 int rpmtsVerifyDB(/*@unused@*/ rpmts ts)
491  /*@*/
492 {
493  return -1;
494 }
495 
504 /*@only@*/ /*@null@*/
505 rpmmi rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
506  /*@null@*/ const void * keyp, size_t keylen)
507  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
508  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
509 
516 /*@-exportlocal@*/
517 rpmRC rpmtsFindPubkey(rpmts ts, /*@null@*/ void * _dig)
518  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
519  /*@modifies ts, _dig, rpmGlobalMacroContext, fileSystem, internalState */;
520 /*@=exportlocal@*/
521 
527 /*@-exportlocal@*/
528 int rpmtsCloseSDB(rpmts ts)
529  /*@globals fileSystem @*/
530  /*@modifies ts, fileSystem @*/;
531 /*@=exportlocal@*/
532 
539 /*@-exportlocal@*/
540 int rpmtsOpenSDB(rpmts ts, int dbmode)
541  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
542  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
543 /*@=exportlocal@*/
544 
552 /*@-exportlocal@*/
553 int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
554  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
555  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
556 /*@=exportlocal@*/
557 
565 /*@unused@*/
566 int rpmtsAvailable(rpmts ts, const rpmds ds)
567  /*@globals fileSystem, internalState @*/
568  /*@modifies ts, fileSystem, internalState @*/;
569 
578  int (*solve) (rpmts ts, rpmds ds, const void * data),
579  const void * solveData)
580  /*@modifies ts @*/;
581 
588  /*@*/;
589 
600 void rpmtsSetType(rpmts ts, rpmTSType type)
601  /*@modifies ts @*/;
602 
609  /*@*/;
610 
616 void rpmtsSetARBGoal(rpmts ts, rpmuint32_t goal)
617  /*@modifies ts @*/;
618 
624 /*@null@*/
626  /*@modifies ts @*/;
627 
632 void rpmtsCleanDig(rpmts ts)
633  /*@globals fileSystem @*/
634  /*@modifies ts, fileSystem @*/;
635 
640 void rpmtsClean(rpmts ts)
641  /*@globals fileSystem, internalState @*/
642  /*@modifies ts, fileSystem , internalState@*/;
643 
648 void rpmtsEmpty(rpmts ts)
649  /*@globals fileSystem, internalState @*/
650  /*@modifies ts, fileSystem, internalState @*/;
651 
657 /*@null@*/
658 rpmts rpmtsFree(/*@killref@*/ /*@null@*/ rpmts ts)
659  /*@globals fileSystem, internalState @*/
660  /*@modifies ts, fileSystem, internalState @*/;
661 #define rpmtsFree(_ts) \
662  ((rpmts) rpmioFreePoolItem((rpmioItem)(_ts), __FUNCTION__, __FILE__, __LINE__))
663 
670 void * rpmtsGetKeyring(rpmts ts, int autoload)
671  /*@*/;
672 
679 int rpmtsSetKeyring(rpmts ts, void * _keyring)
680  /*modifies ts, _keyring @*/;
681 
688  /*@*/;
689 
697  /*@modifies ts @*/;
698 
705 int rpmtsUnorderedSuccessors(rpmts ts, int first)
706  /*@modifies ts @*/;
707 
713 /*@observer@*/ /*@null@*/
714 extern const char * rpmtsRootDir(rpmts ts)
715  /*@*/;
716 
722 void rpmtsSetRootDir(rpmts ts, /*@null@*/ const char * rootDir)
723  /*@modifies ts @*/;
724 
730 /*@observer@*/ /*@null@*/
731 extern const char * rpmtsCurrDir(rpmts ts)
732  /*@*/;
733 
739 void rpmtsSetCurrDir(rpmts ts, /*@null@*/ const char * currDir)
740  /*@modifies ts @*/;
741 
742 #if defined(_RPMTS_INTERNAL) /* XXX avoid FD_t in API. */
743 
748 /*@null@*/
750  /*@*/;
751 
757 void rpmtsSetScriptFd(rpmts ts, /*@null@*/ FD_t scriptFd)
758  /*@globals fileSystem @*/
759  /*@modifies ts, scriptFd, fileSystem @*/;
760 #endif
761 
768  /*@*/;
769 
775 int rpmtsChrootDone(rpmts ts)
776  /*@*/;
777 
784 int rpmtsSetChrootDone(rpmts ts, int chrootDone)
785  /*@modifies ts @*/;
786 
793  /*@*/;
794 
802  /*@modifies ts @*/;
803 
810  /*@globals fileSystem @*/
811  /*@modifies fileSystem @*/;
812 
818 /*@-exportlocal@*/
819 /*@exposed@*/ /*@null@*/
821  /*@globals fileSystem @*/
822  /*@modifies fileSystem @*/;
823 /*@=exportlocal@*/
824 
830 /*@null@*/
832  /*@*/;
833 
839 /*@null@*/
841  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
842  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
843 
849 int rpmtsInitDSI(const rpmts ts)
850  /*@globals fileSystem, internalState @*/
851  /*@modifies ts, fileSystem, internalState @*/;
852 
862 void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
863  rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize,
864  int _action)
865  /*@modifies ts @*/;
866 
872 void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
873  /*@modifies ts @*/;
874 
886 /*@null@*/
887 void * rpmtsNotify(rpmts ts, rpmte te,
888  rpmCallbackType what, rpmuint64_t amount, rpmuint64_t total)
889  /*@modifies te @*/;
890 
896 int rpmtsNElements(rpmts ts)
897  /*@*/;
898 
905 /*@null@*/ /*@dependent@*/
906 rpmte rpmtsElement(rpmts ts, int ix)
907  /*@*/;
908 
915  /*@*/;
916 
923  /*@*/;
924 
932  /*@modifies ts @*/;
933 
940  /*@*/;
941 
949  /*@modifies ts @*/;
950 
956 /*@null@*/
957 Spec rpmtsSpec(rpmts ts)
958  /*@*/;
959 
966 /*@null@*/
967 Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec)
968  /*@modifies ts @*/;
969 
975 /*@null@*/
977  /*@*/;
978 
985 /*@null@*/
986 rpmte rpmtsSetRelocateElement(rpmts ts, /*@null@*/ rpmte relocateElement)
987  /*@modifies ts @*/;
988 
995  /*@*/;
996 
1004  /*@modifies ts @*/;
1005 
1011 int rpmtsDBMode(rpmts ts)
1012  /*@*/;
1013 
1020 int rpmtsSetDBMode(rpmts ts, int dbmode)
1021  /*@modifies ts @*/;
1022 
1029  /*@*/;
1030 
1037  /*@*/;
1038 
1046  /*@modifies ts @*/;
1047 
1054 /*@relnull@*/
1055 rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
1056  /*@*/;
1057 
1070  /*@observer@*/ rpmCallbackFunction notify,
1071  /*@observer@*/ rpmCallbackData notifyData)
1072  /*@modifies ts @*/;
1073 
1078 /*@newref@*/
1079 rpmts rpmtsCreate(void)
1080  /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
1081  /*@modifies rpmGlobalMacroContext, internalState @*/;
1082 
1083 /*@-redecl@*/
1084 /*@unchecked@*/
1085 extern int rpmcliPackagesTotal;
1086 /*@=redecl@*/
1087 
1102  /*@exposed@*/ /*@null@*/ const fnpyKey key, int upgrade,
1103  /*@null@*/ rpmRelocation relocs)
1104  /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
1105  fileSystem, internalState @*/
1106  /*@modifies ts, h, rpmcliPackagesTotal, rpmGlobalMacroContext,
1107  fileSystem, internalState @*/;
1108 
1116 int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t hdrNum)
1117  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
1118  /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
1119 
1120 #if !defined(SWIG)
1121 #if defined(_RPMTS_PRINT)
1122 
1128 /*@unused@*/ static inline
1129 int rpmtsPrint(/*@null@*/ rpmts ts, /*@null@*/ FILE * fp)
1130  /*@globals fileSystem @*/
1131  /*@modifies ts, *fp, fileSystem @*/
1132 {
1133  rpmuint32_t tid = rpmtsGetTid(ts);
1134  time_t ttid = tid;
1135  rpmtsi tsi;
1136  rpmte te;
1137 
1138  if (fp == NULL)
1139  fp = stderr;
1140 
1141  fprintf(fp, _("=== Transaction at %-24.24s (0x%08x):\n"), ctime(&ttid),tid);
1142  tsi = rpmtsiInit(ts);
1143  while ((te = rpmtsiNext(tsi, (rpmElementType)0)) != NULL)
1144  fprintf(fp, "t%s> %s\n", (rpmteType(te) == TR_ADDED ? "I" : "E"),
1145  rpmteNEVRA(te));
1146  tsi = rpmtsiFree(tsi);
1147  return 0;
1148 }
1149 #endif /* defined(_RPMTS_PRINT) */
1150 #endif /* !defined(SWIG) */
1151 
1152 #ifdef __cplusplus
1153 }
1154 #endif
1155 
1156 
1157 #endif /* H_RPMTS */
rpmdepFlags_e
Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.
Definition: rpmts.h:36
int _rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
Definition: transaction.c:2195
int _rpmts_debug
Definition: rpmts.c:93
int rpmtsSetDBMode(rpmts ts, int dbmode)
Set dbmode of transaction set.
Definition: rpmts.c:1440
int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t hdrNum)
Add package to be erased to transaction set.
Definition: depends.c:839
void *(* rpmCallbackFunction)(const void *h, const rpmCallbackType what, const rpmuint64_t amount, const rpmuint64_t total, fnpyKey key, rpmCallbackData data)
Definition: rpmiotypes.h:419
static struct fsinfo * filesystems
Definition: fs.c:31
void rpmtsSetType(rpmts ts, rpmTSType type)
Set transaction type.
Definition: rpmts.c:873
OpenPGP constants and structures from RFC-2440.
#define rpmtsUnlink(_ts, _msg)
Definition: rpmts.h:426
int rpmcliPackagesTotal
Definition: rpminstall.c:63
rpmps rpmtsProblems(rpmts ts)
Return current transaction set problems.
Definition: rpmts.c:582
struct pgpDigParams_s * pgpDigParams
Definition: rpmiotypes.h:87
int rpmtsInitDSI(const rpmts ts)
Initialize disk space info for each and every mounted file systems.
Definition: rpmts.c:1065
enum rpmprobFilterFlags_e rpmprobFilterFlags
int rpmtsCloseDB(rpmts ts)
Close the database used by the transaction.
Definition: rpmts.c:101
rpmte rpmtsRelocateElement(rpmts ts)
Get current relocate transaction element.
Definition: rpmts.c:1404
rpmuint32_t rpmtsGetTid(rpmts ts)
Get transaction id, i.e.
Definition: rpmts.c:1022
tsmStage rpmtsSetGoal(rpmts ts, tsmStage goal)
Set goal of transaction set.
Definition: rpmts.c:1425
rpmuint32_t rpmtsSetColor(rpmts ts, rpmuint32_t color)
Set color bits of transaction set.
Definition: rpmts.c:1455
The Header data structure.
int(* rpmtsCheck)(rpmts ts)
Perform dependency resolution on the transaction set.
Definition: depends.c:2080
Spec rpmtsSetSpec(rpmts ts, Spec spec)
Set a spec control structure in transaction set.
Definition: rpmts.c:1395
static int rpmtsVerifyDB(rpmts ts)
Verify the database used by the transaction.
Definition: rpmts.h:490
#define rpmtsFree(_ts)
Definition: rpmts.h:661
int(* rpmtsOrder)(rpmts ts)
Determine package order in a transaction set according to dependencies.
static rpmVSFlags vsflags
Definition: rpmcache.c:547
Definition: rpmdb.c:436
enum rpmCallbackType_e rpmCallbackType
Bit(s) to identify progress callbacks.
void * rpmtsNotify(rpmts ts, rpmte te, rpmCallbackType what, rpmuint64_t amount, rpmuint64_t total)
Perform transaction progress notify callback.
Definition: rpmts.c:1291
Hash table implemenation.
enum rpmTSType_e rpmTSType
Transaction Types.
int rpmtsOpenSDB(rpmts ts, int dbmode)
Open the database used by the transaction to solve dependencies.
Definition: rpmts.c:252
rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
Retrieve operation timestamp from a transaction set.
Definition: pkgio.c:133
int rpmtsAvailable(rpmts ts, const rpmds ds)
Attempt to solve a needed dependency using memory resident tables.
Definition: rpmts.c:543
enum rpmtsOpX_e rpmtsOpX
Indices for timestamps.
int rpmtsCloseSDB(rpmts ts)
Close the database used by the transaction to solve dependencies.
Definition: rpmts.c:222
int rpmtsUnorderedSuccessors(rpmts ts, int first)
Set index of 1st element of successors.
Definition: rpmts.c:890
rpmtsi rpmtsiFree(rpmtsi tsi)
Destroy transaction element iterator.
struct rpmtsi_s * rpmtsi
Transaction element iterator.
Definition: rpmte.h:25
int rpmtsSetSolveCallback(rpmts ts, int(*solve)(rpmts ts, rpmds ds, const void *data), const void *solveData)
Set dependency solver callback.
struct rpmps_s * rpmps
Transaction problems found while processing a transaction set/.
Definition: rpmps.h:22
rpmElementType rpmteType(rpmte te)
Retrieve type of transaction element.
Definition: rpmte.c:311
rpmRC rpmtsRollback(rpmts rbts, rpmprobFilterFlags ignoreSet, int running, rpmte rbte)
Rollback a failed transaction.
Definition: transaction.c:2060
const char * rpmtsRootDir(rpmts ts)
Get transaction rootDir, i.e.
Definition: rpmts.c:901
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
Definition: rpmtypes.h:28
int rpmtsOpenDB(rpmts ts, int dbmode)
Open the database used by the transaction.
Definition: rpmts.c:115
struct rpmPRCO_s * rpmPRCO
Container for commonly extracted dependency set(s).
Definition: rpmtypes.h:33
struct rpmte_s * rpmte
An element of a transaction set, i.e.
Definition: rpmtypes.h:38
int rpmtsSetChrootDone(rpmts ts, int chrootDone)
Set chrootDone flag, i.e.
Definition: rpmts.c:1010
int _cacheDependsRC
Definition: depends.c:38
rpmdepFlags rpmtsSetDFlags(rpmts ts, rpmdepFlags depFlags)
Set dependency flags, i.e.
Definition: rpmts.c:1378
rpmTSType rpmtsType(rpmts ts)
Return the type of a transaction.
Definition: rpmts.c:868
enum rpmElementType_e rpmElementType
Transaction element type.
void rpmtsEmpty(rpmts ts)
Re-create an empty transaction set.
Definition: rpmts.c:623
int rpmtsChrootDone(rpmts ts)
Get chrootDone flag, i.e.
Definition: rpmts.c:1005
int _rpmtsCheck(rpmts ts)
Definition: depends.c:1891
unsigned int rpmuint32_t
Definition: rpmiotypes.h:25
void rpmtsCleanDig(rpmts ts)
Free signature verification data.
Definition: pkgio.c:457
int _rpmts_stats
Definition: rpmts.c:96
Structures and prototypes used for an "rpmps" problem set.
const char * rpmtsCurrDir(rpmts ts)
Get transaction currDir, i.e.
Definition: rpmts.c:951
rpmte rpmtsSetRelocateElement(rpmts ts, rpmte relocateElement)
Set current relocate transaction element.
Definition: rpmts.c:1411
rpmtransFlags rpmtsFlags(rpmts ts)
Get transaction flags, i.e.
Definition: rpmts.c:1344
int _fps_debug
Definition: transaction.c:232
static int rpmtsInitDB(rpmts ts, int dbmode)
Initialize the database used by the transaction.
Definition: rpmts.h:468
enum rpmdepFlags_e rpmdepFlags
Bit(s) to control rpmtsCheck() and rpmtsOrder() operation.
unsigned long long rpmuint64_t
Definition: rpmiotypes.h:26
int rpmtsSetKeyring(rpmts ts, void *_keyring)
Set transaction keyring.
Definition: rpmts.c:807
enum pgpVSFlags_e pgpVSFlags
Bit(s) to control digest and signature verification.
Set of available packages, items, and directories.
Definition: rpmal.c:85
void * rpmtsGetKeyring(rpmts ts, int autoload)
Get transaction keyring.
Definition: rpmts.c:790
enum tsStage_e tsmStage
rpmprobFilterFlags rpmtsFilterFlags(rpmts ts)
Get problem ignore bit mask, i.e.
Definition: rpmts.c:1339
The FD_t File Handle data structure.
struct pgpDig_s * pgpDig
Definition: rpmiotypes.h:83
struct rpmdb_s * rpmdb
Database of headers and tag value indices.
Definition: rpmtypes.h:43
int _orgrpmtsOrder(rpmts ts)
const char * rpmteNEVRA(rpmte te)
Retrieve name-version-release.arch string from transaction element.
Definition: rpmte.c:541
The structure used to store values parsed from a spec file.
Definition: rpmspec.h:108
pgpVSFlags rpmVSFlags
Bit(s) to control digest and signature verification.
Definition: rpmts.h:30
int(* rpmtsRun)(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
Process all package elements in a transaction set.
Definition: transaction.c:2353
rpmte rpmtsElement(rpmts ts, int ix)
Return (ordered) transaction set element.
Definition: rpmts.c:1327
rpmuint32_t rpmtsPrefColor(rpmts ts)
Retrieve preferred file color.
Definition: rpmts.c:1465
rpmRC rpmtsFindPubkey(rpmts ts, void *_dig)
Retrieve pubkey from rpm database.
Definition: pkgio.c:162
rpmuint32_t rpmtsSetTid(rpmts ts, rpmuint32_t tid)
Set transaction id, i.e.
Definition: rpmts.c:1031
rpmmi rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)
Return transaction database iterator.
Definition: rpmts.c:212
Cumulative statistics for an operation.
Definition: rpmsw.h:33
int rpmtsDBMode(rpmts ts)
Retrieve dbmode of transaction set.
Definition: rpmts.c:1435
rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
Return next transaction element of type.
Definition: rpmte.c:831
void rpmtsUpdateDSI(const rpmts ts, dev_t dev, rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize, int _action)
Update disk space info for a file.
Definition: rpmts.c:1179
void * rpmCallbackData
Definition: rpmiotypes.h:149
rpmdb rpmtsGetRdb(rpmts ts)
Get transaction set database handle.
Definition: pkgio.c:151
rpmuint32_t rpmtsARBGoal(rpmts ts)
Return the autorollback goal.
Definition: rpmts.c:879
void rpmtsSetCurrDir(rpmts ts, const char *currDir)
Set transaction currDir, i.e.
Definition: rpmts.c:960
enum rpmRC_e rpmRC
RPM return codes.
Definition: rpmte.h:31
int rpmtsSolve(rpmts ts, rpmds ds, const void *data)
Attempt to solve a needed dependency using the solve database.
Definition: rpmts.c:351
int rpmtsNElements(rpmts ts)
Return number of (ordered) transaction set elements.
Definition: rpmts.c:1318
enum rpmtransFlags_e rpmtransFlags
Bit(s) to control rpmtsRun() operation.
int _rpmts_macros
Definition: rpmts.c:99
rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
Set verify signatures flag(s).
Definition: rpmts.c:843
void rpmtsSetRootDir(rpmts ts, const char *rootDir)
Set transaction rootDir, i.e.
Definition: rpmts.c:925
struct rpmts_s * rpmts
The RPM Transaction Set.
Definition: rpmtypes.h:14
rpmPRCO rpmtsPRCO(rpmts ts)
Get transaction set dependencies.
Definition: rpmts.c:1042
tsStage_e
Definition: rpmts.h:153
const void * fnpyKey
Definition: rpmiotypes.h:118
rpmtransFlags_e
Bit(s) to control rpmtsRun() operation.
Definition: rpmts.h:54
Spec rpmtsSpec(rpmts ts)
Get spec control structure from transaction set.
Definition: rpmts.c:1388
rpmtsOpX_e
Indices for timestamps.
Definition: rpmts.h:117
void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
Check a transaction element for disk space problems.
Definition: rpmts.c:1242
rpmVSFlags rpmtsVSFlags(rpmts ts)
Get verify signatures flag(s).
Definition: rpmts.c:838
Structures used for managing added/available package lists.
void rpmtsSetARBGoal(rpmts ts, rpmuint32_t goal)
Set autorollback goal.
Definition: rpmts.c:884
#define _(Text)
Definition: system.h:30
int rpmtsRebuildDB(rpmts ts)
Rebuild the database used by the transaction.
Definition: rpmts.c:136
int _rpmtsOrder(rpmts ts)
rpmTSType_e
Transaction Types.
Definition: rpmts.h:145
void rpmtsClean(rpmts ts)
Free memory needed only for dependency checks and ordering.
Definition: rpmts.c:596
rpmdepFlags rpmtsDFlags(rpmts ts)
Get dependency flags, i.e.
Definition: rpmts.c:1373
rpmtsi rpmtsiInit(rpmts ts)
Create transaction element iterator.
int rpmtsAddInstallElement(rpmts ts, Header h, const fnpyKey key, int upgrade, rpmRelocation relocs)
Add package to be installed to transaction set.
Definition: depends.c:552
enum rpmTag_e rpmTag
Definition: rpmtag.h:471
rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
Set transaction flags, i.e.
Definition: rpmts.c:1357
rpmts rpmtsCreate(void)
Create an empty transaction set.
Definition: rpmts.c:1480
rpmuint32_t rpmtsColor(rpmts ts)
Retrieve color bits of transaction set.
Definition: rpmts.c:1450
pgpDig rpmtsDig(rpmts ts)
Get OpenPGP packet parameters, i.e.
Definition: pkgio.c:442
pgpDigParams rpmtsPubkey(const rpmts ts)
Return OpenPGP pubkey constants.
Definition: pkgio.c:144
int rpmtsSetNotifyCallback(rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData)
Set transaction notify callback function and argument.
Definition: rpmts.c:1470
int rpmtsSELinuxEnabled(rpmts ts)
Get selinuxEnabled flag, i.e.
Definition: rpmts.c:997
void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd)
Definition: rpmts.c:980
FD_t rpmtsScriptFd(rpmts ts)
Definition: rpmts.c:969
tsmStage rpmtsGoal(rpmts ts)
Retrieve goal of transaction set.
Definition: rpmts.c:1420
#define rpmtsLink(_ts, _msg)
Definition: rpmts.h:438