X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftransaction.h;h=c84083815480fe26b358e2e39f59a0a7c54acdcc;hb=e9cad17338196026836b555dd971ba84ed011a9d;hp=c9f93435698e9539ed4c670c67c4fff735ce8b38;hpb=ce30350582fa39699ad597d74a21db7e8ebadd58;p=platform%2Fupstream%2Flibsolv.git diff --git a/src/transaction.h b/src/transaction.h index c9f9343..c840838 100644 --- a/src/transaction.h +++ b/src/transaction.h @@ -13,14 +13,14 @@ #ifndef LIBSOLV_TRANSACTION_H #define LIBSOLV_TRANSACTION_H -#ifdef __cplusplus -extern "C" { -#endif - #include "pooltypes.h" #include "queue.h" #include "bitmap.h" +#ifdef __cplusplus +extern "C" { +#endif + struct _Pool; struct _DUChanges; struct _TransactionOrderdata; @@ -34,7 +34,7 @@ typedef struct _Transaction { Queue transaction_info; Id *transaction_installed; Map transactsmap; - Map noobsmap; + Map multiversionmap; struct _TransactionOrderdata *orderdata; #endif @@ -77,18 +77,25 @@ typedef struct _Transaction { #define SOLVER_TRANSACTION_KEEP_PSEUDO (1 << 8) +#define SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE (1 << 9) + /* extra classifications */ #define SOLVER_TRANSACTION_ARCHCHANGE 0x100 #define SOLVER_TRANSACTION_VENDORCHANGE 0x101 /* order flags */ #define SOLVER_TRANSACTION_KEEP_ORDERDATA (1 << 0) +#define SOLVER_TRANSACTION_KEEP_ORDERCYCLES (1 << 1) + +/* cycle severities */ +#define SOLVER_ORDERCYCLE_HARMLESS 0 +#define SOLVER_ORDERCYCLE_NORMAL 1 +#define SOLVER_ORDERCYCLE_CRITICAL 2 extern Transaction *transaction_create(struct _Pool *pool); -extern Transaction *transaction_create_decisionq(struct _Pool *pool, Queue *decisionq, Map *noobsmap); +extern Transaction *transaction_create_decisionq(struct _Pool *pool, Queue *decisionq, Map *multiversionmap); extern Transaction *transaction_create_clone(Transaction *srctrans); extern void transaction_free(Transaction *trans); -extern void transaction_free_orderdata(Transaction *trans); /* if p is installed, returns with pkg(s) obsolete p */ /* if p is not installed, returns with pkg(s) we obsolete */ @@ -111,10 +118,12 @@ extern int transaction_installedresult(Transaction *trans, Queue *installedq); int transaction_calc_installsizechange(Transaction *trans); void transaction_calc_duchanges(Transaction *trans, struct _DUChanges *mps, int nmps); + + /* order a transaction */ extern void transaction_order(Transaction *trans, int flags); -/* roll your own order funcion: +/* roll your own order funcion: * add pkgs free for installation to queue choices after chosen was * installed. start with chosen = 0 * needs an ordered transaction created with SOLVER_TRANSACTION_KEEP_ORDERDATA */ @@ -125,6 +134,12 @@ extern void transaction_add_obsoleted(Transaction *trans); /* debug function, report problems found in the order */ extern void transaction_check_order(Transaction *trans); +/* order cycle introspection */ +extern void transaction_order_get_cycleids(Transaction *trans, Queue *q, int minseverity); +extern int transaction_order_get_cycle(Transaction *trans, Id cid, Queue *q); + +extern void transaction_free_orderdata(Transaction *trans); +extern void transaction_clone_orderdata(Transaction *trans, Transaction *srctrans); #ifdef __cplusplus }