rpm
5.2.1
|
00001 #ifndef H_RPMTS 00002 #define H_RPMTS 00003 00009 #include "rpmps.h" 00010 #include "rpmsw.h" 00011 #include "rpmsx.h" 00012 #include <rpmpgp.h> /* XXX pgpVSFlags */ 00013 00014 /*@-exportlocal@*/ 00015 /*@unchecked@*/ 00016 extern int _rpmts_debug; 00017 /*@unchecked@*/ 00018 extern int _rpmts_macros; 00019 /*@unchecked@*/ 00020 extern int _rpmts_stats; 00021 /*@unchecked@*/ 00022 extern int _fps_debug; 00023 /*@=exportlocal@*/ 00024 00028 typedef pgpVSFlags rpmVSFlags; 00029 00034 typedef enum rpmdepFlags_e { 00035 RPMDEPS_FLAG_NONE = 0, 00036 RPMDEPS_FLAG_NOUPGRADE = (1 << 0), 00037 RPMDEPS_FLAG_NOREQUIRES = (1 << 1), 00038 RPMDEPS_FLAG_NOCONFLICTS = (1 << 2), 00039 RPMDEPS_FLAG_NOOBSOLETES = (1 << 3), 00040 RPMDEPS_FLAG_NOPARENTDIRS = (1 << 4), 00041 RPMDEPS_FLAG_NOLINKTOS = (1 << 5), 00042 RPMDEPS_FLAG_ANACONDA = (1 << 6), 00043 RPMDEPS_FLAG_NOSUGGEST = (1 << 7), 00044 RPMDEPS_FLAG_ADDINDEPS = (1 << 8), 00045 RPMDEPS_FLAG_DEPLOOPS = (1 << 9) 00046 } rpmdepFlags; 00047 00052 typedef enum rpmtransFlags_e { 00053 RPMTRANS_FLAG_NONE = 0, 00054 RPMTRANS_FLAG_TEST = (1 << 0), 00055 RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), 00056 RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), 00057 RPMTRANS_FLAG_JUSTDB = (1 << 3), 00058 RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), 00059 RPMTRANS_FLAG_NODOCS = (1 << 5), 00060 RPMTRANS_FLAG_ALLFILES = (1 << 6), 00061 /* 7 unused */ 00062 RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), 00063 RPMTRANS_FLAG_DIRSTASH = (1 << 9), 00064 RPMTRANS_FLAG_REPACKAGE = (1 << 10), 00066 RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), 00067 /*@-enummemuse@*/ 00068 RPMTRANS_FLAG_PKGUNDO = (1 << 12), 00069 /*@=enummemuse@*/ 00070 RPMTRANS_FLAG_COMMIT = (1 << 13), 00071 /*@-enummemuse@*/ 00072 RPMTRANS_FLAG_UNDO = (1 << 14), 00073 /*@=enummemuse@*/ 00074 RPMTRANS_FLAG_APPLYONLY = (1 << 25), 00075 00076 RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16), 00077 RPMTRANS_FLAG_NOPRE = (1 << 17), 00078 RPMTRANS_FLAG_NOPOST = (1 << 18), 00079 RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), 00080 RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), 00081 RPMTRANS_FLAG_NOPREUN = (1 << 21), 00082 RPMTRANS_FLAG_NOPOSTUN = (1 << 22), 00083 RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), 00084 /*@-enummemuse@*/ 00085 RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), 00086 /*@=enummemuse@*/ 00087 RPMTRANS_FLAG_NORPMDB = (1 << 25), 00088 /* 26 unused */ 00089 RPMTRANS_FLAG_NOFDIGESTS = (1 << 27), 00090 RPMTRANS_FLAG_NOPRETRANS = (1 << 28), 00091 RPMTRANS_FLAG_NOPOSTTRANS = (1 << 29), 00092 RPMTRANS_FLAG_NOCONFIGS = (1 << 30), 00093 /* 31 unused */ 00094 } rpmtransFlags; 00095 00096 #define _noTransScripts \ 00097 ( RPMTRANS_FLAG_NOPRETRANS | \ 00098 RPMTRANS_FLAG_NOPRE | \ 00099 RPMTRANS_FLAG_NOPOST | \ 00100 RPMTRANS_FLAG_NOPREUN | \ 00101 RPMTRANS_FLAG_NOPOSTUN | \ 00102 RPMTRANS_FLAG_NOPOSTTRANS \ 00103 ) 00104 00105 #define _noTransTriggers \ 00106 ( RPMTRANS_FLAG_NOTRIGGERPREIN | \ 00107 RPMTRANS_FLAG_NOTRIGGERIN | \ 00108 RPMTRANS_FLAG_NOTRIGGERUN | \ 00109 RPMTRANS_FLAG_NOTRIGGERPOSTUN \ 00110 ) 00111 00115 typedef enum rpmtsOpX_e { 00116 RPMTS_OP_TOTAL = 0, 00117 RPMTS_OP_CHECK = 1, 00118 RPMTS_OP_ORDER = 2, 00119 RPMTS_OP_FINGERPRINT = 3, 00120 RPMTS_OP_REPACKAGE = 4, 00121 RPMTS_OP_INSTALL = 5, 00122 RPMTS_OP_ERASE = 6, 00123 RPMTS_OP_SCRIPTLETS = 7, 00124 RPMTS_OP_COMPRESS = 8, 00125 RPMTS_OP_UNCOMPRESS = 9, 00126 RPMTS_OP_DIGEST = 10, 00127 RPMTS_OP_SIGNATURE = 11, 00128 RPMTS_OP_DBADD = 12, 00129 RPMTS_OP_DBREMOVE = 13, 00130 RPMTS_OP_DBGET = 14, 00131 RPMTS_OP_DBPUT = 15, 00132 RPMTS_OP_DBDEL = 16, 00133 RPMTS_OP_READHDR = 17, 00134 RPMTS_OP_HDRLOAD = 18, 00135 RPMTS_OP_HDRGET = 19, 00136 RPMTS_OP_DEBUG = 20, 00137 RPMTS_OP_MAX = 20 00138 } rpmtsOpX; 00139 00143 typedef enum rpmTSType_e { 00144 RPMTRANS_TYPE_NORMAL = 0, 00145 RPMTRANS_TYPE_ROLLBACK = (1 << 0), 00146 RPMTRANS_TYPE_AUTOROLLBACK = (1 << 1) 00147 } rpmTSType; 00148 00151 typedef enum tsStage_e { 00152 TSM_UNKNOWN = 0, 00153 TSM_INSTALL = 7, 00154 TSM_ERASE = 8, 00155 } tsmStage; 00156 00157 #if defined(_RPMTS_INTERNAL) 00158 00159 #include "rpmhash.h" /* XXX hashTable */ 00160 #include "rpmkeyring.h" 00161 #include "rpmal.h" /* XXX availablePackage/relocateFileList ,*/ 00162 00163 /*@unchecked@*/ 00164 /*@-exportlocal@*/ 00165 extern int _cacheDependsRC; 00166 /*@=exportlocal@*/ 00167 00170 typedef /*@abstract@*/ struct diskspaceInfo_s * rpmDiskSpaceInfo; 00171 00175 struct diskspaceInfo_s { 00176 unsigned long f_bsize; 00177 unsigned long f_frsize; 00178 unsigned long long f_blocks; 00179 unsigned long long f_bfree; 00180 signed long long f_bavail; 00181 unsigned long long f_files; 00182 unsigned long long f_ffree; 00183 signed long long f_favail; 00184 unsigned long f_fsid; 00185 unsigned long f_flag; 00186 unsigned long f_namemax; 00188 signed long long bneeded; 00189 signed long long ineeded; 00190 dev_t dev; 00191 }; 00192 00196 #define adj_fs_blocks(_nb) (((_nb) * 21) / 20) 00197 00198 #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block)) 00199 00203 struct rpmts_s { 00204 struct rpmioItem_s _item; 00205 rpmdepFlags depFlags; 00206 rpmtransFlags transFlags; 00207 tsmStage goal; 00208 rpmTSType type; 00210 /*@refcounted@*/ /*@null@*/ 00211 rpmdb sdb; 00212 int sdbmode; 00213 /*@null@*/ 00214 int (*solve) (rpmts ts, rpmds key, const void * data) 00215 /*@modifies ts @*/; 00216 /*@relnull@*/ 00217 const void * solveData; 00218 int nsuggests; 00219 /*@only@*/ /*@null@*/ 00220 const void ** suggests; 00222 /*@observer@*/ /*@null@*/ 00223 rpmCallbackFunction notify; 00224 /*@observer@*/ /*@null@*/ 00225 rpmCallbackData notifyData; 00227 /*@null@*/ 00228 rpmPRCO PRCO; 00230 /*@refcounted@*/ /*@null@*/ 00231 rpmps probs; 00232 rpmprobFilterFlags ignoreSet; 00235 rpmuint32_t filesystemCount; 00236 /*@dependent@*/ /*@null@*/ 00237 const char ** filesystems; 00238 /*@only@*/ /*@relnull@*/ 00239 rpmDiskSpaceInfo dsi; 00241 /*@refcounted@*/ /*@null@*/ 00242 rpmdb rdb; 00243 int dbmode; 00244 /*@only@*/ 00245 hashTable ht; 00247 /*@only@*/ /*@null@*/ 00248 int * removedPackages; 00249 int numRemovedPackages; 00250 int allocedRemovedPackages; 00252 /*@only@*/ 00253 rpmal addedPackages; 00254 int numAddedPackages; 00256 /*@only@*/ 00257 rpmal erasedPackages; 00258 int numErasedPackages; 00260 #ifndef DYING 00261 /*@only@*/ 00262 rpmal availablePackages; 00263 int numAvailablePackages; 00264 #endif 00265 00266 /*@refcounted@*/ /*@null@*/ 00267 rpmsx sx; 00269 /*@null@*/ 00270 rpmte relocateElement; 00272 /*@owned@*/ /*@relnull@*/ 00273 rpmte * order; 00274 int orderCount; 00275 int orderAlloced; 00276 int unorderedSuccessors; 00277 int ntrees; 00278 int maxDepth; 00280 /*@dependent@*/ /*@relnull@*/ 00281 rpmte teInstall; 00282 /*@dependent@*/ /*@relnull@*/ 00283 rpmte teErase; 00285 int selinuxEnabled; 00286 int chrootDone; 00287 /*@only@*/ /*@null@*/ 00288 const char * rootDir; 00289 /*@only@*/ /*@null@*/ 00290 const char * currDir; 00291 /*@null@*/ 00292 FD_t scriptFd; 00293 int delta; 00294 rpmuint32_t tid[2]; 00296 rpmuint32_t color; 00297 rpmuint32_t prefcolor; 00299 /*@observer@*/ /*@dependent@*/ /*@null@*/ 00300 const char * fn; 00302 /*@refcounted@*/ /*@relnull@*/ 00303 rpmKeyring keyring; 00304 /*@relnull@*/ 00305 rpmuint8_t * pkpkt; 00306 size_t pkpktlen; 00307 rpmuint8_t pksignid[8]; 00309 struct rpmop_s ops[RPMTS_OP_MAX]; 00310 00311 /*@refcounted@*/ /*@relnull@*/ 00312 pgpDig dig; 00314 /*@null@*/ 00315 Spec spec; 00317 rpmuint32_t arbgoal; 00319 #if defined(__LCLINT__) 00320 /*@refs@*/ 00321 int nrefs; 00322 #endif 00323 }; 00324 #endif /* _RPMTS_INTERNAL */ 00325 00326 #ifdef __cplusplus 00327 extern "C" { 00328 #endif 00329 00340 int rpmtsCheck(rpmts ts) 00341 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00342 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00343 00360 int rpmtsOrder(rpmts ts) 00361 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00362 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00363 00381 int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) 00382 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00383 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00384 00393 rpmRC rpmtsRollback(rpmts rbts, rpmprobFilterFlags ignoreSet, 00394 int running, rpmte rbte) 00395 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00396 /*@modifies rbts, rbte, rpmGlobalMacroContext, fileSystem, internalState @*/; 00397 00404 /*@unused@*/ /*@null@*/ 00405 rpmts rpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts, 00406 const char * msg) 00407 /*@modifies ts @*/; 00408 #define rpmtsUnlink(_ts, _msg) \ 00409 ((rpmts) rpmioUnlinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__)) 00410 00417 /*@unused@*/ /*@newref@*/ 00418 rpmts rpmtsLink (rpmts ts, const char * msg) 00419 /*@modifies ts @*/; 00420 #define rpmtsLink(_ts, _msg) \ 00421 ((rpmts) rpmioLinkPoolItem((rpmioItem)(_ts), _msg, __FILE__, __LINE__)) 00422 00428 int rpmtsCloseDB(rpmts ts) 00429 /*@globals fileSystem @*/ 00430 /*@modifies ts, fileSystem @*/; 00431 00438 int rpmtsOpenDB(rpmts ts, int dbmode) 00439 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00440 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00441 00449 int rpmtsInitDB(rpmts ts, int dbmode) 00450 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00451 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00452 00458 int rpmtsRebuildDB(rpmts ts) 00459 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00460 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00461 00467 int rpmtsVerifyDB(rpmts ts) 00468 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00469 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00470 00479 /*@only@*/ /*@null@*/ 00480 rpmmi rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, 00481 /*@null@*/ const void * keyp, size_t keylen) 00482 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00483 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00484 00491 /*@-exportlocal@*/ 00492 rpmRC rpmtsFindPubkey(rpmts ts, /*@null@*/ void * _dig) 00493 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00494 /*@modifies ts, _dig, rpmGlobalMacroContext, fileSystem, internalState */; 00495 /*@=exportlocal@*/ 00496 00502 /*@-exportlocal@*/ 00503 int rpmtsCloseSDB(rpmts ts) 00504 /*@globals fileSystem @*/ 00505 /*@modifies ts, fileSystem @*/; 00506 /*@=exportlocal@*/ 00507 00514 /*@-exportlocal@*/ 00515 int rpmtsOpenSDB(rpmts ts, int dbmode) 00516 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00517 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00518 /*@=exportlocal@*/ 00519 00527 /*@-exportlocal@*/ 00528 int rpmtsSolve(rpmts ts, rpmds ds, const void * data) 00529 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00530 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00531 /*@=exportlocal@*/ 00532 00540 /*@unused@*/ 00541 int rpmtsAvailable(rpmts ts, const rpmds ds) 00542 /*@globals fileSystem, internalState @*/ 00543 /*@modifies ts, fileSystem, internalState @*/; 00544 00552 int rpmtsSetSolveCallback(rpmts ts, 00553 int (*solve) (rpmts ts, rpmds ds, const void * data), 00554 const void * solveData) 00555 /*@modifies ts @*/; 00556 00562 rpmTSType rpmtsType(rpmts ts) 00563 /*@*/; 00564 00575 void rpmtsSetType(rpmts ts, rpmTSType type) 00576 /*@modifies ts @*/; 00577 00583 rpmuint32_t rpmtsARBGoal(rpmts ts) 00584 /*@*/; 00585 00591 void rpmtsSetARBGoal(rpmts ts, rpmuint32_t goal) 00592 /*@modifies ts @*/; 00593 00599 /*@null@*/ 00600 rpmps rpmtsProblems(rpmts ts) 00601 /*@modifies ts @*/; 00602 00607 void rpmtsCleanDig(rpmts ts) 00608 /*@globals fileSystem @*/ 00609 /*@modifies ts, fileSystem @*/; 00610 00615 void rpmtsClean(rpmts ts) 00616 /*@globals fileSystem, internalState @*/ 00617 /*@modifies ts, fileSystem , internalState@*/; 00618 00623 void rpmtsEmpty(rpmts ts) 00624 /*@globals fileSystem, internalState @*/ 00625 /*@modifies ts, fileSystem, internalState @*/; 00626 00632 /*@null@*/ 00633 rpmts rpmtsFree(/*@killref@*/ /*@null@*/ rpmts ts) 00634 /*@globals fileSystem, internalState @*/ 00635 /*@modifies ts, fileSystem, internalState @*/; 00636 #define rpmtsFree(_ts) \ 00637 ((rpmts) rpmioFreePoolItem((rpmioItem)(_ts), __FUNCTION__, __FILE__, __LINE__)) 00638 00645 void * rpmtsGetKeyring(rpmts ts, int autoload) 00646 /*@*/; 00647 00654 int rpmtsSetKeyring(rpmts ts, void * _keyring) 00655 /*modifies ts, _keyring @*/; 00656 00662 rpmVSFlags rpmtsVSFlags(rpmts ts) 00663 /*@*/; 00664 00671 rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags) 00672 /*@modifies ts @*/; 00673 00680 int rpmtsUnorderedSuccessors(rpmts ts, int first) 00681 /*@modifies ts @*/; 00682 00688 /*@observer@*/ /*@null@*/ 00689 extern const char * rpmtsRootDir(rpmts ts) 00690 /*@*/; 00691 00697 void rpmtsSetRootDir(rpmts ts, /*@null@*/ const char * rootDir) 00698 /*@modifies ts @*/; 00699 00705 /*@observer@*/ /*@null@*/ 00706 extern const char * rpmtsCurrDir(rpmts ts) 00707 /*@*/; 00708 00714 void rpmtsSetCurrDir(rpmts ts, /*@null@*/ const char * currDir) 00715 /*@modifies ts @*/; 00716 00717 #if defined(_RPMTS_INTERNAL) /* XXX avoid FD_t in API. */ 00718 00723 /*@null@*/ 00724 FD_t rpmtsScriptFd(rpmts ts) 00725 /*@*/; 00726 00732 void rpmtsSetScriptFd(rpmts ts, /*@null@*/ FD_t scriptFd) 00733 /*@globals fileSystem @*/ 00734 /*@modifies ts, scriptFd, fileSystem @*/; 00735 #endif 00736 00742 int rpmtsSELinuxEnabled(rpmts ts) 00743 /*@*/; 00744 00750 int rpmtsChrootDone(rpmts ts) 00751 /*@*/; 00752 00759 int rpmtsSetChrootDone(rpmts ts, int chrootDone) 00760 /*@modifies ts @*/; 00761 00767 rpmuint32_t rpmtsGetTid(rpmts ts) 00768 /*@*/; 00769 00776 rpmuint32_t rpmtsSetTid(rpmts ts, rpmuint32_t tid) 00777 /*@modifies ts @*/; 00778 00784 pgpDig rpmtsDig(rpmts ts) 00785 /*@globals fileSystem @*/ 00786 /*@modifies fileSystem @*/; 00787 00793 /*@-exportlocal@*/ 00794 /*@exposed@*/ /*@null@*/ 00795 pgpDigParams rpmtsPubkey(const rpmts ts) 00796 /*@globals fileSystem @*/ 00797 /*@modifies fileSystem @*/; 00798 /*@=exportlocal@*/ 00799 00805 /*@null@*/ 00806 rpmdb rpmtsGetRdb(rpmts ts) 00807 /*@*/; 00808 00814 /*@null@*/ 00815 rpmPRCO rpmtsPRCO(rpmts ts) 00816 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00817 /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; 00818 00824 int rpmtsInitDSI(const rpmts ts) 00825 /*@globals fileSystem, internalState @*/ 00826 /*@modifies ts, fileSystem, internalState @*/; 00827 00837 void rpmtsUpdateDSI(const rpmts ts, dev_t dev, 00838 rpmuint32_t fileSize, rpmuint32_t prevSize, rpmuint32_t fixupSize, 00839 int _action) 00840 /*@modifies ts @*/; 00841 00847 void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te) 00848 /*@modifies ts @*/; 00849 00861 /*@null@*/ 00862 void * rpmtsNotify(rpmts ts, rpmte te, 00863 rpmCallbackType what, rpmuint64_t amount, rpmuint64_t total) 00864 /*@modifies te @*/; 00865 00871 int rpmtsNElements(rpmts ts) 00872 /*@*/; 00873 00880 /*@null@*/ /*@dependent@*/ 00881 rpmte rpmtsElement(rpmts ts, int ix) 00882 /*@*/; 00883 00889 rpmprobFilterFlags rpmtsFilterFlags(rpmts ts) 00890 /*@*/; 00891 00897 rpmtransFlags rpmtsFlags(rpmts ts) 00898 /*@*/; 00899 00906 rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags) 00907 /*@modifies ts @*/; 00908 00914 rpmdepFlags rpmtsDFlags(rpmts ts) 00915 /*@*/; 00916 00923 rpmdepFlags rpmtsSetDFlags(rpmts ts, rpmdepFlags depFlags) 00924 /*@modifies ts @*/; 00925 00931 /*@null@*/ 00932 Spec rpmtsSpec(rpmts ts) 00933 /*@*/; 00934 00941 /*@null@*/ 00942 Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec) 00943 /*@modifies ts @*/; 00944 00950 /*@null@*/ 00951 rpmte rpmtsRelocateElement(rpmts ts) 00952 /*@*/; 00953 00960 /*@null@*/ 00961 rpmte rpmtsSetRelocateElement(rpmts ts, /*@null@*/ rpmte relocateElement) 00962 /*@modifies ts @*/; 00963 00969 tsmStage rpmtsGoal(rpmts ts) 00970 /*@*/; 00971 00978 tsmStage rpmtsSetGoal(rpmts ts, tsmStage goal) 00979 /*@modifies ts @*/; 00980 00986 int rpmtsDBMode(rpmts ts) 00987 /*@*/; 00988 00995 int rpmtsSetDBMode(rpmts ts, int dbmode) 00996 /*@modifies ts @*/; 00997 01003 rpmuint32_t rpmtsColor(rpmts ts) 01004 /*@*/; 01005 01011 rpmuint32_t rpmtsPrefColor(rpmts ts) 01012 /*@*/; 01013 01020 rpmuint32_t rpmtsSetColor(rpmts ts, rpmuint32_t color) 01021 /*@modifies ts @*/; 01022 01029 /*@relnull@*/ 01030 rpmop rpmtsOp(rpmts ts, rpmtsOpX opx) 01031 /*@*/; 01032 01044 int rpmtsSetNotifyCallback(rpmts ts, 01045 /*@observer@*/ rpmCallbackFunction notify, 01046 /*@observer@*/ rpmCallbackData notifyData) 01047 /*@modifies ts @*/; 01048 01053 /*@newref@*/ 01054 rpmts rpmtsCreate(void) 01055 /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ 01056 /*@modifies rpmGlobalMacroContext, internalState @*/; 01057 01058 /*@-redecl@*/ 01059 /*@unchecked@*/ 01060 extern int rpmcliPackagesTotal; 01061 /*@=redecl@*/ 01062 01076 int rpmtsAddInstallElement(rpmts ts, Header h, 01077 /*@exposed@*/ /*@null@*/ const fnpyKey key, int upgrade, 01078 /*@null@*/ rpmRelocation relocs) 01079 /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno, 01080 fileSystem, internalState @*/ 01081 /*@modifies ts, h, rpmcliPackagesTotal, rpmGlobalMacroContext, 01082 fileSystem, internalState @*/; 01083 01091 int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset) 01092 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 01093 /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/; 01094 01095 #if !defined(SWIG) 01096 #if defined(_RPMTS_PRINT) 01097 01103 /*@unused@*/ static inline 01104 int rpmtsPrint(/*@null@*/ rpmts ts, /*@null@*/ FILE * fp) 01105 /*@globals fileSystem @*/ 01106 /*@modifies ts, *fp, fileSystem @*/ 01107 { 01108 rpmuint32_t tid = rpmtsGetTid(ts); 01109 time_t ttid = tid; 01110 rpmtsi tsi; 01111 rpmte te; 01112 01113 if (fp == NULL) 01114 fp = stderr; 01115 01116 fprintf(fp, _("=== Transaction at %-24.24s (0x%08x):\n"), ctime(&ttid),tid); 01117 tsi = rpmtsiInit(ts); 01118 while ((te = rpmtsiNext(tsi, 0)) != NULL) 01119 fprintf(fp, "t%s> %s\n", (rpmteType(te) == TR_ADDED ? "I" : "E"), 01120 rpmteNEVRA(te)); 01121 tsi = rpmtsiFree(tsi); 01122 return 0; 01123 } 01124 #endif /* defined(_RPMTS_PRINT) */ 01125 #endif /* !defined(SWIG) */ 01126 01127 #ifdef __cplusplus 01128 } 01129 #endif 01130 01131 01132 #endif /* H_RPMTS */