rpm 5.3.7
|
00001 #ifndef H_RPMTS 00002 #define H_RPMTS 00003 00009 #include "rpmps.h" 00010 #include "rpmsw.h" 00011 #include <rpmpgp.h> /* XXX pgpVSFlags */ 00012 #if defined(_RPMTS_INTERNAL) 00013 #include <rpmbag.h> 00014 #endif 00015 00016 /*@-exportlocal@*/ 00017 /*@unchecked@*/ 00018 extern int _rpmts_debug; 00019 /*@unchecked@*/ 00020 extern int _rpmts_macros; 00021 /*@unchecked@*/ 00022 extern int _rpmts_stats; 00023 /*@unchecked@*/ 00024 extern int _fps_debug; 00025 /*@=exportlocal@*/ 00026 00030 typedef pgpVSFlags rpmVSFlags; 00031 00036 typedef enum rpmdepFlags_e { 00037 RPMDEPS_FLAG_NONE = 0, 00038 RPMDEPS_FLAG_NOUPGRADE = (1 << 0), 00039 RPMDEPS_FLAG_NOREQUIRES = (1 << 1), 00040 RPMDEPS_FLAG_NOCONFLICTS = (1 << 2), 00041 RPMDEPS_FLAG_NOOBSOLETES = (1 << 3), 00042 RPMDEPS_FLAG_NOPARENTDIRS = (1 << 4), 00043 RPMDEPS_FLAG_NOLINKTOS = (1 << 5), 00044 RPMDEPS_FLAG_ANACONDA = (1 << 6), 00045 RPMDEPS_FLAG_NOSUGGEST = (1 << 7), 00046 RPMDEPS_FLAG_ADDINDEPS = (1 << 8), 00047 RPMDEPS_FLAG_DEPLOOPS = (1 << 9) 00048 } rpmdepFlags; 00049 00054 typedef enum rpmtransFlags_e { 00055 RPMTRANS_FLAG_NONE = 0, 00056 RPMTRANS_FLAG_TEST = (1 << 0), 00057 RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), 00058 RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), 00059 RPMTRANS_FLAG_JUSTDB = (1 << 3), 00060 RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), 00061 RPMTRANS_FLAG_NODOCS = (1 << 5), 00062 RPMTRANS_FLAG_ALLFILES = (1 << 6), 00063 /* 7 unused */ 00064 RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), 00065 RPMTRANS_FLAG_DIRSTASH = (1 << 9), 00066 RPMTRANS_FLAG_REPACKAGE = (1 << 10), 00068 RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), 00069 /*@-enummemuse@*/ 00070 RPMTRANS_FLAG_PKGUNDO = (1 << 12), 00071 /*@=enummemuse@*/ 00072 RPMTRANS_FLAG_COMMIT = (1 << 13), 00073 /*@-enummemuse@*/ 00074 RPMTRANS_FLAG_UNDO = (1 << 14), 00075 /*@=enummemuse@*/ 00076 RPMTRANS_FLAG_APPLYONLY = (1 << 15), 00077 00078 RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16), 00079 RPMTRANS_FLAG_NOPRE = (1 << 17), 00080 RPMTRANS_FLAG_NOPOST = (1 << 18), 00081 RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), 00082 RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), 00083 RPMTRANS_FLAG_NOPREUN = (1 << 21), 00084 RPMTRANS_FLAG_NOPOSTUN = (1 << 22), 00085 RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), 00086 /*@-enummemuse@*/ 00087 RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), 00088 /*@=enummemuse@*/ 00089 RPMTRANS_FLAG_NORPMDB = (1 << 25), 00090 RPMTRANS_FLAG_NOPOLICY = (1 << 26), 00091 RPMTRANS_FLAG_NOFDIGESTS = (1 << 27), 00092 RPMTRANS_FLAG_NOPRETRANS = (1 << 28), 00093 RPMTRANS_FLAG_NOPOSTTRANS = (1 << 29), 00094 RPMTRANS_FLAG_NOCONFIGS = (1 << 30), 00095 /* 31 unused */ 00096 } rpmtransFlags; 00097 00098 #define _noTransScripts \ 00099 ( RPMTRANS_FLAG_NOPRETRANS | \ 00100 RPMTRANS_FLAG_NOPRE | \ 00101 RPMTRANS_FLAG_NOPOST | \ 00102 RPMTRANS_FLAG_NOPREUN | \ 00103 RPMTRANS_FLAG_NOPOSTUN | \ 00104 RPMTRANS_FLAG_NOPOSTTRANS \ 00105 ) 00106 00107 #define _noTransTriggers \ 00108 ( RPMTRANS_FLAG_NOTRIGGERPREIN | \ 00109 RPMTRANS_FLAG_NOTRIGGERIN | \ 00110 RPMTRANS_FLAG_NOTRIGGERUN | \ 00111 RPMTRANS_FLAG_NOTRIGGERPOSTUN \ 00112 ) 00113 00117 typedef enum rpmtsOpX_e { 00118 RPMTS_OP_TOTAL = 0, 00119 RPMTS_OP_CHECK = 1, 00120 RPMTS_OP_ORDER = 2, 00121 RPMTS_OP_FINGERPRINT = 3, 00122 RPMTS_OP_REPACKAGE = 4, 00123 RPMTS_OP_INSTALL = 5, 00124 RPMTS_OP_ERASE = 6, 00125 RPMTS_OP_SCRIPTLETS = 7, 00126 RPMTS_OP_COMPRESS = 8, 00127 RPMTS_OP_UNCOMPRESS = 9, 00128 RPMTS_OP_DIGEST = 10, 00129 RPMTS_OP_SIGNATURE = 11, 00130 RPMTS_OP_DBADD = 12, 00131 RPMTS_OP_DBREMOVE = 13, 00132 RPMTS_OP_DBGET = 14, 00133 RPMTS_OP_DBPUT = 15, 00134 RPMTS_OP_DBDEL = 16, 00135 RPMTS_OP_READHDR = 17, 00136 RPMTS_OP_HDRLOAD = 18, 00137 RPMTS_OP_HDRGET = 19, 00138 RPMTS_OP_DEBUG = 20, 00139 RPMTS_OP_MAX = 20 00140 } rpmtsOpX; 00141 00145 typedef enum rpmTSType_e { 00146 RPMTRANS_TYPE_NORMAL = 0, 00147 RPMTRANS_TYPE_ROLLBACK = (1 << 0), 00148 RPMTRANS_TYPE_AUTOROLLBACK = (1 << 1) 00149 } rpmTSType; 00150 00153 typedef enum tsStage_e { 00154 TSM_UNKNOWN = 0, 00155 TSM_INSTALL = 7, 00156 TSM_ERASE = 8, 00157 } tsmStage; 00158 00159 #if defined(_RPMTS_INTERNAL) 00160 00161 #include <rpmbf.h> 00162 #include "rpmhash.h" /* XXX hashTable */ 00163 #include "rpmkeyring.h" 00164 #include <rpmtxn.h> 00165 #include "rpmal.h" /* XXX availablePackage/relocateFileList ,*/ 00166 00167 /*@unchecked@*/ 00168 /*@-exportlocal@*/ 00169 extern int _cacheDependsRC; 00170 /*@=exportlocal@*/ 00171 00174 typedef /*@abstract@*/ struct diskspaceInfo_s * rpmDiskSpaceInfo; 00175 00179 struct diskspaceInfo_s { 00180 unsigned long f_bsize; 00181 unsigned long f_frsize; 00182 unsigned long long f_blocks; 00183 unsigned long long f_bfree; 00184 signed long long f_bavail; 00185 unsigned long long f_files; 00186 unsigned long long f_ffree; 00187 signed long long f_favail; 00188 unsigned long f_fsid; 00189 unsigned long f_flag; 00190 unsigned long f_namemax; 00192 signed long long bneeded; 00193 signed long long ineeded; 00194 signed long long obneeded; 00195 signed long long oineeded; 00196 dev_t dev; 00197 }; 00198 00202 #define adj_fs_blocks(_nb) (((_nb) * 21) / 20) 00203 00204 #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block)) 00205 00209 struct rpmts_s { 00210 struct rpmioItem_s _item; 00211 rpmdepFlags depFlags; 00212 rpmtransFlags transFlags; 00213 tsmStage goal; 00214 rpmTSType type; 00216 /*@refcounted@*/ /*@null@*/ 00217 rpmbag bag; 00218 /*@null@*/ 00219 int (*solve) (rpmts ts, rpmds key, const void * data) 00220 /*@modifies ts @*/; 00221 /*@relnull@*/ 00222 const void * solveData; 00223 int nsuggests; 00224 /*@only@*/ /*@null@*/ 00225 const void ** suggests; 00227 /*@observer@*/ /*@null@*/ 00228 rpmCallbackFunction notify; 00229 /*@observer@*/ /*@null@*/ 00230 rpmCallbackData notifyData; 00232 /*@null@*/ 00233 rpmPRCO PRCO; 00235 /*@refcounted@*/ /*@null@*/ 00236 rpmps probs; 00237 rpmprobFilterFlags ignoreSet; 00240 rpmuint32_t filesystemCount; 00241 /*@dependent@*/ /*@null@*/ 00242 const char ** filesystems; 00243 /*@only@*/ /*@relnull@*/ 00244 rpmDiskSpaceInfo dsi; 00246 /*@refcounted@*/ /*@null@*/ 00247 rpmdb rdb; 00248 int dbmode; 00249 /*@only@*/ 00250 hashTable ht; 00251 /*@null@*/ 00252 rpmtxn txn; 00254 /*@refcounted@*/ /*@null@*/ 00255 rpmbf rbf; 00256 /*@only@*/ /*@null@*/ 00257 uint32_t * removedPackages; 00258 int numRemovedPackages; 00259 int allocedRemovedPackages; 00261 /*@only@*/ 00262 rpmal addedPackages; 00263 int numAddedPackages; 00264 int numAddedFiles; 00266 /*@only@*/ 00267 rpmal erasedPackages; 00268 int numErasedPackages; 00269 int numErasedFiles; 00271 #ifndef DYING 00272 /*@only@*/ 00273 rpmal availablePackages; 00274 int numAvailablePackages; 00275 #endif 00276 00277 /*@null@*/ 00278 rpmte relocateElement; 00280 /*@owned@*/ /*@relnull@*/ 00281 rpmte * order; 00282 int orderCount; 00283 int orderAlloced; 00284 int unorderedSuccessors; 00285 int ntrees; 00286 int maxDepth; 00288 /*@dependent@*/ /*@relnull@*/ 00289 rpmte teInstall; 00290 /*@dependent@*/ /*@relnull@*/ 00291 rpmte teErase; 00293 int selinuxEnabled; 00294 int chrootDone; 00295 /*@only@*/ /*@null@*/ 00296 const char * rootDir; 00297 /*@only@*/ /*@null@*/ 00298 const char * currDir; 00299 /*@null@*/ 00300 FD_t scriptFd; 00301 int delta; 00302 rpmuint32_t tid[2]; 00304 rpmuint32_t color; 00305 rpmuint32_t prefcolor; 00307 /*@observer@*/ /*@dependent@*/ /*@null@*/ 00308 const char * fn; 00310 /*@refcounted@*/ /*@relnull@*/ 00311 rpmKeyring keyring; 00312 /*@relnull@*/ 00313 void * hkp; 00315 struct rpmop_s ops[RPMTS_OP_MAX]; 00316 00317 /*@refcounted@*/ /*@relnull@*/ 00318 pgpDig dig; 00320 /*@null@*/ 00321 Spec spec; 00323 rpmuint32_t arbgoal; 00325 #if defined(__LCLINT__) 00326 /*@refs@*/ 00327 int nrefs; 00328 #endif 00329 }; 00330 #endif /* _RPMTS_INTERNAL */ 00331 00332 #ifdef __cplusplus 00333 extern "C" { 00334 #endif 00335 00346 extern int (*rpmtsCheck) (rpmts ts) 00347 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00348 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00349 int _rpmtsCheck(rpmts ts) 00350 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00351 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00352 00369 extern int (*rpmtsOrder) (rpmts ts) 00370 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00371 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00372 int _rpmtsOrder(rpmts ts) 00373 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00374 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00375 int _orgrpmtsOrder(rpmts ts) 00376 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00377 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00378 00396 extern int (*rpmtsRun) (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) 00397 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00398 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00399 int _rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) 00400 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00401 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00402 00411 rpmRC rpmtsRollback(rpmts rbts, rpmprobFilterFlags ignoreSet, 00412 int running, rpmte rbte) 00413 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00414 /*@modifies rbts, rbte, rpmGlobalMacroContext, fileSystem, internalState @*/; 00415 00422 /*@unused@*/ /*@null@*/ 00423 rpmts rpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts, 00424 const char * msg) 00425 /*@modifies ts @*/; 00426 #define rpmtsUnlink(_ts, _msg) \ 00427 ((rpmts) rpmioUnlinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__)) 00428 00435 /*@unused@*/ /*@newref@*/ 00436 rpmts rpmtsLink (rpmts ts, const char * msg) 00437 /*@modifies ts @*/; 00438 #define rpmtsLink(_ts, _msg) \ 00439 ((rpmts) rpmioLinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__)) 00440 00446 int rpmtsCloseDB(rpmts ts) 00447 /*@globals fileSystem @*/ 00448 /*@modifies ts, fileSystem @*/; 00449 00456 int rpmtsOpenDB(rpmts ts, int dbmode) 00457 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00458 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00459 00467 static inline /*@unused@*/ 00468 int rpmtsInitDB(/*@unused@*/ rpmts ts, /*@unused@*/ int dbmode) 00469 /*@*/ 00470 { 00471 return -1; 00472 } 00473 00479 int rpmtsRebuildDB(rpmts ts) 00480 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00481 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00482 00489 static inline /*@unused@*/ 00490 int rpmtsVerifyDB(/*@unused@*/ rpmts ts) 00491 /*@*/ 00492 { 00493 return -1; 00494 } 00495 00504 /*@only@*/ /*@null@*/ 00505 rpmmi rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, 00506 /*@null@*/ const void * keyp, size_t keylen) 00507 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00508 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00509 00516 /*@-exportlocal@*/ 00517 rpmRC rpmtsFindPubkey(rpmts ts, /*@null@*/ void * _dig) 00518 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00519 /*@modifies ts, _dig, rpmGlobalMacroContext, fileSystem, internalState */; 00520 /*@=exportlocal@*/ 00521 00527 /*@-exportlocal@*/ 00528 int rpmtsCloseSDB(rpmts ts) 00529 /*@globals fileSystem @*/ 00530 /*@modifies ts, fileSystem @*/; 00531 /*@=exportlocal@*/ 00532 00539 /*@-exportlocal@*/ 00540 int rpmtsOpenSDB(rpmts ts, int dbmode) 00541 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00542 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00543 /*@=exportlocal@*/ 00544 00552 /*@-exportlocal@*/ 00553 int rpmtsSolve(rpmts ts, rpmds ds, const void * data) 00554 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00555 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00556 /*@=exportlocal@*/ 00557 00565 /*@unused@*/ 00566 int rpmtsAvailable(rpmts ts, const rpmds ds) 00567 /*@globals fileSystem, internalState @*/ 00568 /*@modifies ts, fileSystem, internalState @*/; 00569 00577 int rpmtsSetSolveCallback(rpmts ts, 00578 int (*solve) (rpmts ts, rpmds ds, const void * data), 00579 const void * solveData) 00580 /*@modifies ts @*/; 00581 00587 rpmTSType rpmtsType(rpmts ts) 00588 /*@*/; 00589 00600 void rpmtsSetType(rpmts ts, rpmTSType type) 00601 /*@modifies ts @*/; 00602 00608 rpmuint32_t rpmtsARBGoal(rpmts ts) 00609 /*@*/; 00610 00616 void rpmtsSetARBGoal(rpmts ts, rpmuint32_t goal) 00617 /*@modifies ts @*/; 00618 00624 /*@null@*/ 00625 rpmps rpmtsProblems(rpmts ts) 00626 /*@modifies ts @*/; 00627 00632 void rpmtsCleanDig(rpmts ts) 00633 /*@globals fileSystem @*/ 00634 /*@modifies ts, fileSystem @*/; 00635 00640 void rpmtsClean(rpmts ts) 00641 /*@globals fileSystem, internalState @*/ 00642 /*@modifies ts, fileSystem , internalState@*/; 00643 00648 void rpmtsEmpty(rpmts ts) 00649 /*@globals fileSystem, internalState @*/ 00650 /*@modifies ts, fileSystem, internalState @*/; 00651 00657 /*@null@*/ 00658 rpmts rpmtsFree(/*@killref@*/ /*@null@*/ rpmts ts) 00659 /*@globals fileSystem, internalState @*/ 00660 /*@modifies ts, fileSystem, internalState @*/; 00661 #define rpmtsFree(_ts) \ 00662 ((rpmts) rpmioFreePoolItem((rpmioItem)(_ts), __FUNCTION__, __FILE__, __LINE__)) 00663 00670 void * rpmtsGetKeyring(rpmts ts, int autoload) 00671 /*@*/; 00672 00679 int rpmtsSetKeyring(rpmts ts, void * _keyring) 00680 /*modifies ts, _keyring @*/; 00681 00687 rpmVSFlags rpmtsVSFlags(rpmts ts) 00688 /*@*/; 00689 00696 rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags) 00697 /*@modifies ts @*/; 00698 00705 int rpmtsUnorderedSuccessors(rpmts ts, int first) 00706 /*@modifies ts @*/; 00707 00713 /*@observer@*/ /*@null@*/ 00714 extern const char * rpmtsRootDir(rpmts ts) 00715 /*@*/; 00716 00722 void rpmtsSetRootDir(rpmts ts, /*@null@*/ const char * rootDir) 00723 /*@modifies ts @*/; 00724 00730 /*@observer@*/ /*@null@*/ 00731 extern const char * rpmtsCurrDir(rpmts ts) 00732 /*@*/; 00733 00739 void rpmtsSetCurrDir(rpmts ts, /*@null@*/ const char * currDir) 00740 /*@modifies ts @*/; 00741 00742 #if defined(_RPMTS_INTERNAL) /* XXX avoid FD_t in API. */ 00743 00748 /*@null@*/ 00749 FD_t rpmtsScriptFd(rpmts ts) 00750 /*@*/; 00751 00757 void rpmtsSetScriptFd(rpmts ts, /*@null@*/ FD_t scriptFd) 00758 /*@globals fileSystem @*/ 00759 /*@modifies ts, scriptFd, fileSystem @*/; 00760 #endif 00761 00767 int rpmtsSELinuxEnabled(rpmts ts) 00768 /*@*/; 00769 00775 int rpmtsChrootDone(rpmts ts) 00776 /*@*/; 00777 00784 int rpmtsSetChrootDone(rpmts ts, int chrootDone) 00785 /*@modifies ts @*/; 00786 00792 rpmuint32_t rpmtsGetTid(rpmts ts) 00793 /*@*/; 00794 00801 rpmuint32_t rpmtsSetTid(rpmts ts, rpmuint32_t tid) 00802 /*@modifies ts @*/; 00803 00809 pgpDig rpmtsDig(rpmts ts) 00810 /*@globals fileSystem @*/ 00811 /*@modifies fileSystem @*/; 00812 00818 /*@-exportlocal@*/ 00819 /*@exposed@*/ /*@null@*/ 00820 pgpDigParams rpmtsPubkey(const rpmts ts) 00821 /*@globals fileSystem @*/ 00822 /*@modifies fileSystem @*/; 00823 /*@=exportlocal@*/ 00824 00830 /*@null@*/ 00831 rpmdb rpmtsGetRdb(rpmts ts) 00832 /*@*/; 00833 00839 /*@null@*/ 00840 rpmPRCO rpmtsPRCO(rpmts ts) 00841 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00842 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00843 00849 int rpmtsInitDSI(const rpmts ts) 00850 /*@globals fileSystem, internalState @*/ 00851 /*@modifies ts, fileSystem, internalState @*/; 00852 00862 void rpmtsUpdateDSI(const rpmts ts, dev_t dev, 00863 rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize, 00864 int _action) 00865 /*@modifies ts @*/; 00866 00872 void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te) 00873 /*@modifies ts @*/; 00874 00886 /*@null@*/ 00887 void * rpmtsNotify(rpmts ts, rpmte te, 00888 rpmCallbackType what, rpmuint64_t amount, rpmuint64_t total) 00889 /*@modifies te @*/; 00890 00896 int rpmtsNElements(rpmts ts) 00897 /*@*/; 00898 00905 /*@null@*/ /*@dependent@*/ 00906 rpmte rpmtsElement(rpmts ts, int ix) 00907 /*@*/; 00908 00914 rpmprobFilterFlags rpmtsFilterFlags(rpmts ts) 00915 /*@*/; 00916 00922 rpmtransFlags rpmtsFlags(rpmts ts) 00923 /*@*/; 00924 00931 rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags) 00932 /*@modifies ts @*/; 00933 00939 rpmdepFlags rpmtsDFlags(rpmts ts) 00940 /*@*/; 00941 00948 rpmdepFlags rpmtsSetDFlags(rpmts ts, rpmdepFlags depFlags) 00949 /*@modifies ts @*/; 00950 00956 /*@null@*/ 00957 Spec rpmtsSpec(rpmts ts) 00958 /*@*/; 00959 00966 /*@null@*/ 00967 Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec) 00968 /*@modifies ts @*/; 00969 00975 /*@null@*/ 00976 rpmte rpmtsRelocateElement(rpmts ts) 00977 /*@*/; 00978 00985 /*@null@*/ 00986 rpmte rpmtsSetRelocateElement(rpmts ts, /*@null@*/ rpmte relocateElement) 00987 /*@modifies ts @*/; 00988 00994 tsmStage rpmtsGoal(rpmts ts) 00995 /*@*/; 00996 01003 tsmStage rpmtsSetGoal(rpmts ts, tsmStage goal) 01004 /*@modifies ts @*/; 01005 01011 int rpmtsDBMode(rpmts ts) 01012 /*@*/; 01013 01020 int rpmtsSetDBMode(rpmts ts, int dbmode) 01021 /*@modifies ts @*/; 01022 01028 rpmuint32_t rpmtsColor(rpmts ts) 01029 /*@*/; 01030 01036 rpmuint32_t rpmtsPrefColor(rpmts ts) 01037 /*@*/; 01038 01045 rpmuint32_t rpmtsSetColor(rpmts ts, rpmuint32_t color) 01046 /*@modifies ts @*/; 01047 01054 /*@relnull@*/ 01055 rpmop rpmtsOp(rpmts ts, rpmtsOpX opx) 01056 /*@*/; 01057 01069 int rpmtsSetNotifyCallback(rpmts ts, 01070 /*@observer@*/ rpmCallbackFunction notify, 01071 /*@observer@*/ rpmCallbackData notifyData) 01072 /*@modifies ts @*/; 01073 01078 /*@newref@*/ 01079 rpmts rpmtsCreate(void) 01080 /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ 01081 /*@modifies rpmGlobalMacroContext, internalState @*/; 01082 01083 /*@-redecl@*/ 01084 /*@unchecked@*/ 01085 extern int rpmcliPackagesTotal; 01086 /*@=redecl@*/ 01087 01101 int rpmtsAddInstallElement(rpmts ts, Header h, 01102 /*@exposed@*/ /*@null@*/ const fnpyKey key, int upgrade, 01103 /*@null@*/ rpmRelocation relocs) 01104 /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno, 01105 fileSystem, internalState @*/ 01106 /*@modifies ts, h, rpmcliPackagesTotal, rpmGlobalMacroContext, 01107 fileSystem, internalState @*/; 01108 01116 int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t hdrNum) 01117 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 01118 /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/; 01119 01120 #if !defined(SWIG) 01121 #if defined(_RPMTS_PRINT) 01122 01128 /*@unused@*/ static inline 01129 int rpmtsPrint(/*@null@*/ rpmts ts, /*@null@*/ FILE * fp) 01130 /*@globals fileSystem @*/ 01131 /*@modifies ts, *fp, fileSystem @*/ 01132 { 01133 rpmuint32_t tid = rpmtsGetTid(ts); 01134 time_t ttid = tid; 01135 rpmtsi tsi; 01136 rpmte te; 01137 01138 if (fp == NULL) 01139 fp = stderr; 01140 01141 fprintf(fp, _("=== Transaction at %-24.24s (0x%08x):\n"), ctime(&ttid),tid); 01142 tsi = rpmtsiInit(ts); 01143 while ((te = rpmtsiNext(tsi, 0)) != NULL) 01144 fprintf(fp, "t%s> %s\n", (rpmteType(te) == TR_ADDED ? "I" : "E"), 01145 rpmteNEVRA(te)); 01146 tsi = rpmtsiFree(tsi); 01147 return 0; 01148 } 01149 #endif /* defined(_RPMTS_PRINT) */ 01150 #endif /* !defined(SWIG) */ 01151 01152 #ifdef __cplusplus 01153 } 01154 #endif 01155 01156 01157 #endif /* H_RPMTS */