diff options
author | Michael Schroeder <mls@suse.de> | 2013-04-24 11:53:00 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-04-24 11:53:00 +0200 |
commit | b524d2b3431088271c73fbd33ac08ab5bf4ad374 (patch) | |
tree | 06474180382e22301beee638096816b394c61f59 /src/transaction.c | |
parent | 17e78ff9180750da4d830a88dc9b4a68d3e29b5a (diff) | |
download | libsolv-b524d2b3431088271c73fbd33ac08ab5bf4ad374.tar.gz libsolv-b524d2b3431088271c73fbd33ac08ab5bf4ad374.tar.bz2 libsolv-b524d2b3431088271c73fbd33ac08ab5bf4ad374.zip |
add SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE helper flag
Many users don't want to show the obsoletes as extra part of the
classification. Only makes sense when SOLVER_TRANSACTION_SHOW_OBSOLETES
is also specified.
Diffstat (limited to 'src/transaction.c')
-rw-r--r-- | src/transaction.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transaction.c b/src/transaction.c index 071f156..94f0236 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -260,15 +260,19 @@ transaction_type(Transaction *trans, Id p, int mode) if (s->repo == pool->installed && (mode & SOLVER_TRANSACTION_SHOW_ACTIVE) == 0) { /* erase element and we're showing the passive side */ - if ((mode & SOLVER_TRANSACTION_SHOW_OBSOLETES) == 0 && type == SOLVER_TRANSACTION_OBSOLETED) + if (type == SOLVER_TRANSACTION_OBSOLETED && (mode & SOLVER_TRANSACTION_SHOW_OBSOLETES) == 0) type = SOLVER_TRANSACTION_ERASE; + if (type == SOLVER_TRANSACTION_OBSOLETED && (mode & SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE) != 0) + type = SOLVER_TRANSACTION_UPGRADED; return type; } if (s->repo != pool->installed && (mode & SOLVER_TRANSACTION_SHOW_ACTIVE) != 0) { /* install element and we're showing the active side */ - if ((mode & SOLVER_TRANSACTION_SHOW_OBSOLETES) == 0 && type == SOLVER_TRANSACTION_OBSOLETES) + if (type == SOLVER_TRANSACTION_OBSOLETES && (mode & SOLVER_TRANSACTION_SHOW_OBSOLETES) == 0) type = SOLVER_TRANSACTION_INSTALL; + if (type == SOLVER_TRANSACTION_OBSOLETES && (mode & SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE) != 0) + type = SOLVER_TRANSACTION_UPGRADE; return type; } |