summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-04-24 16:22:37 +0200
committerMichael Schroeder <mls@suse.de>2013-04-24 16:22:37 +0200
commitc6a683fc85284ba9ff774650005235001f853c2f (patch)
tree7f0ea8fc31e9e2b82dc59e0f23baa5b15ba27a3a /src
parent4b5801decc6940c8a4d14fa0ca54df24456977eb (diff)
downloadlibsolv-c6a683fc85284ba9ff774650005235001f853c2f.tar.gz
libsolv-c6a683fc85284ba9ff774650005235001f853c2f.tar.bz2
libsolv-c6a683fc85284ba9ff774650005235001f853c2f.zip
terminate solver_create_decisions_obsoletesmap function
Diffstat (limited to 'src')
-rw-r--r--src/libsolv.ver1
-rw-r--r--src/solver.h3
-rw-r--r--src/solverdebug.c94
-rw-r--r--src/solverdebug.h1
4 files changed, 0 insertions, 99 deletions
diff --git a/src/libsolv.ver b/src/libsolv.ver
index e17bb7e..5cf7fa8 100644
--- a/src/libsolv.ver
+++ b/src/libsolv.ver
@@ -307,7 +307,6 @@ SOLV_1.0 {
solver_calculate_multiversionmap;
solver_calculate_noobsmap;
solver_create;
- solver_create_decisions_obsoletesmap;
solver_create_state_maps;
solver_create_transaction;
solver_describe_decision;
diff --git a/src/solver.h b/src/solver.h
index 7e4be95..5fa0a12 100644
--- a/src/solver.h
+++ b/src/solver.h
@@ -297,9 +297,6 @@ extern void solver_calculate_multiversionmap(Pool *pool, Queue *job, Map *multiv
extern void solver_calculate_noobsmap(Pool *pool, Queue *job, Map *multiversionmap); /* obsolete */
extern void solver_create_state_maps(Solver *solv, Map *installedmap, Map *conflictsmap);
-/* XXX: why is this not static? */
-extern Id *solver_create_decisions_obsoletesmap(Solver *solv);
-
extern void solver_calc_duchanges(Solver *solv, DUChanges *mps, int nmps);
extern int solver_calc_installsizechange(Solver *solv);
extern void solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res);
diff --git a/src/solverdebug.c b/src/solverdebug.c
index ab8afd7..4b907ee 100644
--- a/src/solverdebug.c
+++ b/src/solverdebug.c
@@ -28,100 +28,6 @@
#include "policy.h"
-/*
- * create obsoletesmap from solver decisions
- *
- * for solvables in installed repo:
- * 0 - not obsoleted
- * p - one of the packages that obsolete us
- * for all others:
- * n - number of packages this package obsoletes
- *
- */
-
-/* OBSOLETE: use transaction code instead! */
-
-Id *
-solver_create_decisions_obsoletesmap(Solver *solv)
-{
- Pool *pool = solv->pool;
- Repo *installed = solv->installed;
- Id p, *obsoletesmap = NULL;
- int i;
- Solvable *s;
-
- obsoletesmap = (Id *)solv_calloc(pool->nsolvables, sizeof(Id));
- if (installed)
- {
- for (i = 0; i < solv->decisionq.count; i++)
- {
- Id pp, n;
- int multi;
-
- n = solv->decisionq.elements[i];
- if (n < 0)
- continue;
- if (n == SYSTEMSOLVABLE)
- continue;
- s = pool->solvables + n;
- if (s->repo == installed) /* obsoletes don't count for already installed packages */
- continue;
- multi = solv->multiversion.size && MAPTST(&solv->multiversion, n);
- FOR_PROVIDES(p, pp, s->name)
- {
- Solvable *ps = pool->solvables + p;
- if (multi && (s->name != ps->name || s->evr != ps->evr || s->arch != ps->arch))
- continue;
- if (!pool->implicitobsoleteusesprovides && s->name != ps->name)
- continue;
- if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
- continue;
- if (ps->repo == installed && !obsoletesmap[p])
- {
- obsoletesmap[p] = n;
- obsoletesmap[n]++;
- }
- }
- }
- for (i = 0; i < solv->decisionq.count; i++)
- {
- Id obs, *obsp;
- Id pp, n;
-
- n = solv->decisionq.elements[i];
- if (n < 0)
- continue;
- if (n == SYSTEMSOLVABLE)
- continue;
- s = pool->solvables + n;
- if (s->repo == installed) /* obsoletes don't count for already installed packages */
- continue;
- if (!s->obsoletes)
- continue;
- if (solv->multiversion.size && MAPTST(&solv->multiversion, n))
- continue;
- obsp = s->repo->idarraydata + s->obsoletes;
- while ((obs = *obsp++) != 0)
- {
- FOR_PROVIDES(p, pp, obs)
- {
- Solvable *ps = pool->solvables + p;
- if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, ps, obs))
- continue;
- if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
- continue;
- if (pool->solvables[p].repo == installed && !obsoletesmap[p])
- {
- obsoletesmap[p] = n;
- obsoletesmap[n]++;
- }
- }
- }
- }
- }
- return obsoletesmap;
-}
-
void
solver_printruleelement(Solver *solv, int type, Rule *r, Id v)
{
diff --git a/src/solverdebug.h b/src/solverdebug.h
index 3da4629..32e427e 100644
--- a/src/solverdebug.h
+++ b/src/solverdebug.h
@@ -21,7 +21,6 @@
extern "C" {
#endif
-extern Id *solver_create_decisions_obsoletesmap(Solver *solv);
extern void solver_printruleelement(Solver *solv, int type, Rule *r, Id v);
extern void solver_printrule(Solver *solv, int type, Rule *r);
extern void solver_printruleclass(Solver *solv, int type, Rule *r);