- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# lib/rpmts.h

Go to the documentation of this file.

    00001 #ifndef H_RPMTS
    00002 #define H_RPMTS
    00003
    00009 #include "rpmps.h"
    00010 #include "rpmfi.h"
    00011 #include "rpmsw.h"
    00012 #include "rpmsx.h"
    00013 #include <rpmpgp.h>             /* XXX pgpVSFlags */
    00014
    00015 /*@-exportlocal@*/
    00016 /*@unchecked@*/
    00017 extern int _rpmts_debug;
    00018 /*@unchecked@*/
    00019 extern int _rpmts_macros;
    00020 /*@unchecked@*/
    00021 extern int _rpmts_stats;
    00022 /*@unchecked@*/
    00023 extern int _fps_debug;
    00024 /*@=exportlocal@*/
    00025
    00029 typedef pgpVSFlags rpmVSFlags;
    00030
    00035 typedef enum rpmdepFlags_e {
    00036     RPMDEPS_FLAG_NONE           = 0,
    00037     RPMDEPS_FLAG_NOUPGRADE      = (1 <<  0),
    00038     RPMDEPS_FLAG_NOREQUIRES     = (1 <<  1),
    00039     RPMDEPS_FLAG_NOCONFLICTS    = (1 <<  2),
    00040     RPMDEPS_FLAG_NOOBSOLETES    = (1 <<  3),
    00041     RPMDEPS_FLAG_NOPARENTDIRS   = (1 <<  4),
    00042     RPMDEPS_FLAG_NOLINKTOS      = (1 <<  5),
    00043     RPMDEPS_FLAG_ANACONDA       = (1 <<  6),
    00044     RPMDEPS_FLAG_NOSUGGEST      = (1 <<  7),
    00045     RPMDEPS_FLAG_ADDINDEPS      = (1 <<  8),
    00046     RPMDEPS_FLAG_DEPLOOPS       = (1 <<  9)
    00047 } rpmdepFlags;
    00048
    00053 typedef enum rpmtransFlags_e {
    00054     RPMTRANS_FLAG_NONE          = 0,
    00055     RPMTRANS_FLAG_TEST          = (1 <<  0),
    00056     RPMTRANS_FLAG_BUILD_PROBS   = (1 <<  1),
    00057     RPMTRANS_FLAG_NOSCRIPTS     = (1 <<  2),
    00058     RPMTRANS_FLAG_JUSTDB        = (1 <<  3),
    00059     RPMTRANS_FLAG_NOTRIGGERS    = (1 <<  4),
    00060     RPMTRANS_FLAG_NODOCS        = (1 <<  5),
    00061     RPMTRANS_FLAG_ALLFILES      = (1 <<  6),
    00062 /*@-enummemuse@*/
    00063     RPMTRANS_FLAG_KEEPOBSOLETE  = (1 <<  7),
    00064 /*@=enummemuse@*/
    00065     RPMTRANS_FLAG_NOCONTEXTS    = (1 <<  8),
    00066     RPMTRANS_FLAG_DIRSTASH      = (1 <<  9),
    00067     RPMTRANS_FLAG_REPACKAGE     = (1 << 10),
    00069     RPMTRANS_FLAG_PKGCOMMIT     = (1 << 11),
    00070 /*@-enummemuse@*/
    00071     RPMTRANS_FLAG_PKGUNDO       = (1 << 12),
    00072 /*@=enummemuse@*/
    00073     RPMTRANS_FLAG_COMMIT        = (1 << 13),
    00074 /*@-enummemuse@*/
    00075     RPMTRANS_FLAG_UNDO          = (1 << 14),
    00076 /*@=enummemuse@*/
    00077     /* 15 unused */
    00078
    00079     RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16),
    00080     RPMTRANS_FLAG_NOPRE         = (1 << 17),
    00081     RPMTRANS_FLAG_NOPOST        = (1 << 18),
    00082     RPMTRANS_FLAG_NOTRIGGERIN   = (1 << 19),
    00083     RPMTRANS_FLAG_NOTRIGGERUN   = (1 << 20),
    00084     RPMTRANS_FLAG_NOPREUN       = (1 << 21),
    00085     RPMTRANS_FLAG_NOPOSTUN      = (1 << 22),
    00086     RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23),
    00087 /*@-enummemuse@*/
    00088     RPMTRANS_FLAG_NOPAYLOAD     = (1 << 24),
    00089 /*@=enummemuse@*/
    00090     RPMTRANS_FLAG_APPLYONLY     = (1 << 25),
    00091
    00092     /* 26 unused */
    00093     RPMTRANS_FLAG_NOFDIGESTS    = (1 << 27),
    00094     /* 28-29 unused */
    00095     RPMTRANS_FLAG_NOCONFIGS     = (1 << 30),
    00096     /* 31 unused */
    00097 } rpmtransFlags;
    00098
    00099 #define _noTransScripts         \
    00100   ( RPMTRANS_FLAG_NOPRE |       \
    00101     RPMTRANS_FLAG_NOPOST |      \
    00102     RPMTRANS_FLAG_NOPREUN |     \
    00103     RPMTRANS_FLAG_NOPOSTUN      \
    00104   )
    00105
    00106 #define _noTransTriggers        \
    00107   ( RPMTRANS_FLAG_NOTRIGGERPREIN | \
    00108     RPMTRANS_FLAG_NOTRIGGERIN | \
    00109     RPMTRANS_FLAG_NOTRIGGERUN | \
    00110     RPMTRANS_FLAG_NOTRIGGERPOSTUN \
    00111   )
    00112
    00116 typedef enum rpmtsOpX_e {
    00117     RPMTS_OP_TOTAL              =  0,
    00118     RPMTS_OP_CHECK              =  1,
    00119     RPMTS_OP_ORDER              =  2,
    00120     RPMTS_OP_FINGERPRINT        =  3,
    00121     RPMTS_OP_REPACKAGE          =  4,
    00122     RPMTS_OP_INSTALL            =  5,
    00123     RPMTS_OP_ERASE              =  6,
    00124     RPMTS_OP_SCRIPTLETS         =  7,
    00125     RPMTS_OP_COMPRESS           =  8,
    00126     RPMTS_OP_UNCOMPRESS         =  9,
    00127     RPMTS_OP_DIGEST             = 10,
    00128     RPMTS_OP_SIGNATURE          = 11,
    00129     RPMTS_OP_DBADD              = 12,
    00130     RPMTS_OP_DBREMOVE           = 13,
    00131     RPMTS_OP_DBGET              = 14,
    00132     RPMTS_OP_DBPUT              = 15,
    00133     RPMTS_OP_DBDEL              = 16,
    00134     RPMTS_OP_READHDR            = 17,
    00135     RPMTS_OP_HDRLOAD            = 18,
    00136     RPMTS_OP_HDRGET             = 19,
    00137     RPMTS_OP_DEBUG              = 20,
    00138     RPMTS_OP_MAX                = 20
    00139 } rpmtsOpX;
    00140
    00144 typedef enum rpmTSType_e {
    00145         RPMTRANS_TYPE_NORMAL       = 0,
    00146         RPMTRANS_TYPE_ROLLBACK     = (1 << 0),
    00147         RPMTRANS_TYPE_AUTOROLLBACK = (1 << 1)
    00148 } rpmTSType;
    00149
    00152 typedef enum tsStage_e {
    00153     TSM_UNKNOWN         =  0,
    00154     TSM_INSTALL         =  7,
    00155     TSM_ERASE           =  8,
    00156 } tsmStage;
    00157
    00158 #if defined(_RPMTS_INTERNAL)
    00159
    00160 #include "rpmhash.h"    /* XXX hashTable */
    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     rpmdepFlags depFlags;
    00205     rpmtransFlags transFlags;
    00206     tsmStage goal;
    00207     rpmTSType type;
    00209 /*@refcounted@*/ /*@null@*/
    00210     rpmdb sdb;
    00211     int sdbmode;
    00212 /*@null@*/
    00213     int (*solve) (rpmts ts, rpmds key, const void * data)
    00214         /*@modifies ts @*/;
    00215 /*@relnull@*/
    00216     const void * solveData;
    00217     int nsuggests;
    00218 /*@only@*/ /*@null@*/
    00219     const void ** suggests;
    00221 /*@observer@*/ /*@null@*/
    00222     rpmCallbackFunction notify;
    00223 /*@observer@*/ /*@null@*/
    00224     rpmCallbackData notifyData;
    00226 /*@null@*/
    00227     rpmPRCO PRCO;
    00229 /*@refcounted@*/ /*@null@*/
    00230     rpmps probs;
    00231     rpmprobFilterFlags ignoreSet;
    00234     uint32_t filesystemCount;
    00235 /*@dependent@*/ /*@null@*/
    00236     const char ** filesystems;
    00237 /*@only@*/ /*@relnull@*/
    00238     rpmDiskSpaceInfo dsi;
    00240 /*@refcounted@*/ /*@null@*/
    00241     rpmdb rdb;
    00242     int dbmode;
    00243 /*@only@*/
    00244     hashTable ht;
    00246 /*@only@*/ /*@null@*/
    00247     int * removedPackages;
    00248     int numRemovedPackages;
    00249     int allocedRemovedPackages;
    00251 /*@only@*/
    00252     rpmal addedPackages;
    00253     int numAddedPackages;
    00255 /*@only@*/
    00256     rpmal erasedPackages;
    00257     int numErasedPackages;
    00259 #ifndef DYING
    00260 /*@only@*/
    00261     rpmal availablePackages;
    00262     int numAvailablePackages;
    00263 #endif
    00264
    00265 /*@refcounted@*/ /*@null@*/
    00266     rpmsx sx;
    00268 /*@null@*/
    00269     rpmte relocateElement;
    00271 /*@owned@*/ /*@relnull@*/
    00272     rpmte * order;
    00273     int orderCount;
    00274     int orderAlloced;
    00275     int unorderedSuccessors;
    00276     int ntrees;
    00277     int maxDepth;
    00279 /*@dependent@*/
    00280     rpmte teInstall;
    00281 /*@dependent@*/
    00282     rpmte teErase;
    00284     int selinuxEnabled;
    00285     int chrootDone;
    00286 /*@only@*/ /*@null@*/
    00287     const char * rootDir;
    00288 /*@only@*/ /*@null@*/
    00289     const char * currDir;
    00290 /*@null@*/
    00291     FD_t scriptFd;
    00292     int delta;
    00293     uint32_t tid;
    00295     uint32_t color;
    00296     uint32_t prefcolor;
    00298 /*@observer@*/ /*@dependent@*/ /*@null@*/
    00299     const char * fn;
    00301 /*@only@*/ /*@relnull@*/
    00302     const unsigned char * pkpkt;
    00303     size_t pkpktlen;
    00304     unsigned char pksignid[8];
    00306     struct rpmop_s ops[RPMTS_OP_MAX];
    00307
    00308 /*@refcounted@*/ /*@relnull@*/
    00309     pgpDig dig;
    00311 /*@null@*/
    00312     Spec spec;
    00314     uint32_t arbgoal;
    00316 /*@refs@*/
    00317     int nrefs;
    00318 };
    00319 #endif  /* _RPMTS_INTERNAL */
    00320
    00321 #ifdef __cplusplus
    00322 extern "C" {
    00323 #endif
    00324
    00335 int rpmtsCheck(rpmts ts)
    00336         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00337         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00338
    00355 int rpmtsOrder(rpmts ts)
    00356         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00357         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00358
    00376 int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
    00377         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00378         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00379
    00388 rpmRC rpmtsRollback(rpmts rbts, rpmprobFilterFlags ignoreSet,
    00389                 int running, rpmte rbte)
    00390         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00391         /*@modifies rbts, rbte, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00392
    00399 /*@unused@*/ /*@null@*/
    00400 rpmts rpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
    00401                 const char * msg)
    00402         /*@modifies ts @*/;
    00403
    00405 /*@-exportlocal@*/
    00406 /*@null@*/
    00407 rpmts XrpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
    00408                 const char * msg, const char * fn, unsigned ln)
    00409         /*@modifies ts @*/;
    00410 /*@=exportlocal@*/
    00411 #define rpmtsUnlink(_ts, _msg)  XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)
    00412
    00419 /*@unused@*/
    00420 rpmts rpmtsLink (rpmts ts, const char * msg)
    00421         /*@modifies ts @*/;
    00422
    00424 rpmts XrpmtsLink (rpmts ts,
    00425                 const char * msg, const char * fn, unsigned ln)
    00426         /*@modifies ts @*/;
    00427 #define rpmtsLink(_ts, _msg)    XrpmtsLink(_ts, _msg, __FILE__, __LINE__)
    00428
    00434 int rpmtsCloseDB(rpmts ts)
    00435         /*@globals fileSystem @*/
    00436         /*@modifies ts, fileSystem @*/;
    00437
    00444 int rpmtsOpenDB(rpmts ts, int dbmode)
    00445         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00446         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00447
    00455 int rpmtsInitDB(rpmts ts, int dbmode)
    00456         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00457         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00458
    00464 int rpmtsRebuildDB(rpmts ts)
    00465         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00466         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00467
    00473 int rpmtsVerifyDB(rpmts ts)
    00474         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00475         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00476
    00485 /*@only@*/ /*@null@*/
    00486 rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
    00487                         /*@null@*/ const void * keyp, size_t keylen)
    00488         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00489         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00490
    00497 /*@-exportlocal@*/
    00498 rpmRC rpmtsFindPubkey(rpmts ts, /*@null@*/ void * _dig)
    00499         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00500         /*@modifies ts, _dig, rpmGlobalMacroContext, fileSystem, internalState */;
    00501 /*@=exportlocal@*/
    00502
    00511 rpmRC rpmtsImportPubkey(const rpmts ts,
    00512                 const unsigned char * pkt, ssize_t pktlen)
    00513         /*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
    00514                 fileSystem, internalState @*/
    00515         /*@modifies ts, rpmGlobalMacroContext,
    00516                 fileSystem, internalState @*/;
    00517
    00523 /*@-exportlocal@*/
    00524 int rpmtsCloseSDB(rpmts ts)
    00525         /*@globals fileSystem @*/
    00526         /*@modifies ts, fileSystem @*/;
    00527 /*@=exportlocal@*/
    00528
    00535 /*@-exportlocal@*/
    00536 int rpmtsOpenSDB(rpmts ts, int dbmode)
    00537         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00538         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00539 /*@=exportlocal@*/
    00540
    00548 /*@-exportlocal@*/
    00549 int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
    00550         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00551         /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00552 /*@=exportlocal@*/
    00553
    00561 /*@unused@*/
    00562 int rpmtsAvailable(rpmts ts, const rpmds ds)
    00563         /*@globals fileSystem, internalState @*/
    00564         /*@modifies ts, fileSystem, internalState @*/;
    00565
    00573 int rpmtsSetSolveCallback(rpmts ts,
    00574                 int (*solve) (rpmts ts, rpmds ds, const void * data),
    00575                 const void * solveData)
    00576         /*@modifies ts @*/;
    00577
    00583 rpmTSType rpmtsType(rpmts ts)
    00584         /*@*/;
    00585
    00596 void rpmtsSetType(rpmts ts, rpmTSType type)
    00597         /*@modifies ts @*/;
    00598
    00604 uint32_t rpmtsARBGoal(rpmts ts)
    00605         /*@*/;
    00606
    00612 void rpmtsSetARBGoal(rpmts ts, uint32_t goal)
    00613         /*@modifies ts @*/;
    00614
    00620 /*@null@*/
    00621 rpmps rpmtsProblems(rpmts ts)
    00622         /*@modifies ts @*/;
    00623
    00628 void rpmtsCleanDig(rpmts ts)
    00629         /*@modifies ts @*/;
    00630
    00635 void rpmtsClean(rpmts ts)
    00636         /*@globals fileSystem, internalState @*/
    00637         /*@modifies ts, fileSystem , internalState@*/;
    00638
    00643 void rpmtsEmpty(rpmts ts)
    00644         /*@globals fileSystem, internalState @*/
    00645         /*@modifies ts, fileSystem, internalState @*/;
    00646
    00652 /*@null@*/
    00653 rpmts rpmtsFree(/*@killref@*/ /*@only@*//*@null@*/ rpmts ts)
    00654         /*@globals fileSystem, internalState @*/
    00655         /*@modifies ts, fileSystem, internalState @*/;
    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
    00722 /*@null@*/
    00723 FD_t rpmtsScriptFd(rpmts ts)
    00724         /*@*/;
    00725
    00731 void rpmtsSetScriptFd(rpmts ts, /*@null@*/ FD_t scriptFd)
    00732         /*@modifies ts, scriptFd @*/;
    00733
    00739 int rpmtsSELinuxEnabled(rpmts ts)
    00740         /*@*/;
    00741
    00747 int rpmtsChrootDone(rpmts ts)
    00748         /*@*/;
    00749
    00756 int rpmtsSetChrootDone(rpmts ts, int chrootDone)
    00757         /*@modifies ts @*/;
    00758
    00764 /*@null@*/
    00765 rpmsx rpmtsREContext(const rpmts ts)
    00766         /*@modifies ts @*/;
    00767
    00774 int rpmtsSetREContext(rpmts ts, rpmsx sx)
    00775         /*@modifies ts, sx @*/;
    00776
    00782 uint32_t rpmtsGetTid(rpmts ts)
    00783         /*@*/;
    00784
    00791 uint32_t rpmtsSetTid(rpmts ts, uint32_t tid)
    00792         /*@modifies ts @*/;
    00793
    00799 pgpDig rpmtsDig(rpmts ts)
    00800         /*@*/;
    00801
    00807 /*@-exportlocal@*/
    00808 /*@exposed@*/ /*@null@*/
    00809 pgpDigParams rpmtsPubkey(const rpmts ts)
    00810         /*@*/;
    00811 /*@=exportlocal@*/
    00812
    00818 /*@null@*/
    00819 rpmdb rpmtsGetRdb(rpmts ts)
    00820         /*@*/;
    00821
    00827 /*@null@*/
    00828 rpmPRCO rpmtsPRCO(rpmts ts)
    00829         /*@*/;
    00830
    00836 int rpmtsInitDSI(const rpmts ts)
    00837         /*@globals fileSystem, internalState @*/
    00838         /*@modifies ts, fileSystem, internalState @*/;
    00839
    00849 void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
    00850                 uint32_t fileSize, uint32_t prevSize, uint32_t fixupSize,
    00851                 fileAction action)
    00852         /*@modifies ts @*/;
    00853
    00859 void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
    00860         /*@modifies ts @*/;
    00861
    00873 /*@null@*/
    00874 void * rpmtsNotify(rpmts ts, rpmte te,
    00875                 rpmCallbackType what, uint64_t amount, uint64_t total)
    00876         /*@*/;
    00877
    00883 int rpmtsNElements(rpmts ts)
    00884         /*@*/;
    00885
    00892 /*@null@*/ /*@dependent@*/
    00893 rpmte rpmtsElement(rpmts ts, int ix)
    00894         /*@*/;
    00895
    00901 rpmprobFilterFlags rpmtsFilterFlags(rpmts ts)
    00902         /*@*/;
    00903
    00909 rpmtransFlags rpmtsFlags(rpmts ts)
    00910         /*@*/;
    00911
    00918 rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
    00919         /*@modifies ts @*/;
    00920
    00926 rpmdepFlags rpmtsDFlags(rpmts ts)
    00927         /*@*/;
    00928
    00935 rpmdepFlags rpmtsSetDFlags(rpmts ts, rpmdepFlags depFlags)
    00936         /*@modifies ts @*/;
    00937
    00943 /*@null@*/
    00944 Spec rpmtsSpec(rpmts ts)
    00945         /*@*/;
    00946
    00953 /*@null@*/
    00954 Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec)
    00955         /*@modifies ts @*/;
    00956
    00962 /*@null@*/
    00963 rpmte rpmtsRelocateElement(rpmts ts)
    00964         /*@*/;
    00965
    00972 /*@null@*/
    00973 rpmte rpmtsSetRelocateElement(rpmts ts, /*@null@*/ rpmte relocateElement)
    00974         /*@modifies ts @*/;
    00975
    00981 tsmStage rpmtsGoal(rpmts ts)
    00982         /*@*/;
    00983
    00990 tsmStage rpmtsSetGoal(rpmts ts, tsmStage goal)
    00991         /*@modifies ts @*/;
    00992
    00998 int rpmtsDBMode(rpmts ts)
    00999         /*@*/;
    01000
    01007 int rpmtsSetDBMode(rpmts ts, int dbmode)
    01008         /*@modifies ts @*/;
    01009
    01015 uint32_t rpmtsColor(rpmts ts)
    01016         /*@*/;
    01017
    01023 uint32_t rpmtsPrefColor(rpmts ts)
    01024         /*@*/;
    01025
    01032 uint32_t rpmtsSetColor(rpmts ts, uint32_t color)
    01033         /*@modifies ts @*/;
    01034
    01041 /*@relnull@*/
    01042 rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
    01043         /*@*/;
    01044
    01056 int rpmtsSetNotifyCallback(rpmts ts,
    01057                 /*@observer@*/ rpmCallbackFunction notify,
    01058                 /*@observer@*/ rpmCallbackData notifyData)
    01059         /*@modifies ts @*/;
    01060
    01065 /*@newref@*/
    01066 rpmts rpmtsCreate(void)
    01067         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    01068         /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
    01069
    01070 /*@-redecl@*/
    01071 /*@unchecked@*/
    01072 extern int rpmcliPackagesTotal;
    01073 /*@=redecl@*/
    01074
    01088 int rpmtsAddInstallElement(rpmts ts, Header h,
    01089                 /*@exposed@*/ /*@null@*/ const fnpyKey key, int upgrade,
    01090                 /*@null@*/ rpmRelocation relocs)
    01091         /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
    01092                 fileSystem, internalState @*/
    01093         /*@modifies ts, h, rpmcliPackagesTotal, rpmGlobalMacroContext,
    01094                 fileSystem, internalState @*/;
    01095
    01103 int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
    01104         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    01105         /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
    01106
    01107 #if !defined(SWIG)
    01108 #if defined(_RPMTS_PRINT)
    01109
    01115 /*@unused@*/ static inline
    01116 int rpmtsPrint(/*@null@*/ rpmts ts, /*@null@*/ FILE * fp)
    01117         /*@globals fileSystem @*/
    01118         /*@modifies ts, *fp, fileSystem @*/
    01119 {
    01120     int tid = rpmtsGetTid(ts);
    01121     time_t ttid = tid;
    01122     rpmtsi tsi;
    01123     rpmte te;
    01124
    01125     if (fp == NULL)
    01126         fp = stderr;
    01127
    01128     fprintf(fp, _("=== Transaction at %-24.24s (0x%08x):\n"), ctime(&ttid),tid);
    01129     tsi = rpmtsiInit(ts);
    01130     while ((te = rpmtsiNext(tsi, 0)) != NULL)
    01131         fprintf(fp, "t%s> %s\n", (rpmteType(te) == TR_ADDED ? "I" : "E"),
    01132                 rpmteNEVRA(te));
    01133     tsi = rpmtsiFree(tsi);
    01134     return 0;
    01135 }
    01136 #endif  /* defined(_RPMTS_PRINT) */
    01137 #endif  /* !defined(SWIG) */
    01138
    01139 #ifdef __cplusplus
    01140 }
    01141 #endif
    01142
    01143
    01144 #endif  /* H_RPMTS */