summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rules.c2
-rw-r--r--src/solver.c5
-rw-r--r--src/solver.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/rules.c b/src/rules.c
index 00d5c33..bf98b18 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -665,7 +665,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
{
int noobs = solv->noobsoletes.size && MAPTST(&solv->noobsoletes, n);
int isinstalled = (installed && s->repo == installed);
- if (s->obsoletes && !noobs)
+ if (s->obsoletes && (!noobs || solv->keepexplicitobsoletes))
{
obsp = s->repo->idarraydata + s->obsoletes;
/* foreach obsoletes */
diff --git a/src/solver.c b/src/solver.c
index f19d7da..ef116c2 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1473,6 +1473,8 @@ solver_get_flag(Solver *solv, int flag)
return solv->addalreadyrecommended;
case SOLVER_FLAG_NO_INFARCHCHECK:
return solv->noinfarchcheck;
+ case SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES:
+ return solv->keepexplicitobsoletes;
default:
break;
}
@@ -1515,6 +1517,9 @@ solver_set_flag(Solver *solv, int flag, int value)
case SOLVER_FLAG_NO_INFARCHCHECK:
solv->noinfarchcheck = value;
break;
+ case SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES:
+ solv->keepexplicitobsoletes = value;
+ break;
default:
break;
}
diff --git a/src/solver.h b/src/solver.h
index 84ffb8e..ddab97b 100644
--- a/src/solver.h
+++ b/src/solver.h
@@ -194,6 +194,7 @@ struct _Solver {
int dontshowinstalledrecommended; /* true: do not show recommended packages that are already installed */
int noinfarchcheck; /* true: do not forbid inferior architectures */
+ int keepexplicitobsoletes; /* true: honor obsoletes during multiinstall */
Map dupmap; /* dup these packages*/
@@ -283,6 +284,7 @@ typedef struct _Solver Solver;
#define SOLVER_FLAG_ADD_ALREADY_RECOMMENDED 8
#define SOLVER_FLAG_NO_INFARCHCHECK 9
#define SOLVER_FLAG_ALLOW_NAMECHANGE 10
+#define SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES 11
extern Solver *solver_create(Pool *pool);
extern void solver_free(Solver *solv);