diff options
author | Michael Schroeder <mls@suse.de> | 2013-02-04 17:34:33 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-02-04 17:34:33 +0100 |
commit | 2bd102f701f4f018a2971c9e058538280785f24d (patch) | |
tree | fb1e60af2d8bf616473dc1dd45341ae34d67fd3f /src | |
parent | e06b8055a9168b7a7a24bff0ee8265a4df8124c2 (diff) | |
download | libsolv-2bd102f701f4f018a2971c9e058538280785f24d.tar.gz libsolv-2bd102f701f4f018a2971c9e058538280785f24d.tar.bz2 libsolv-2bd102f701f4f018a2971c9e058538280785f24d.zip |
do not call pool_freewhatprovides in pool_add_fileconflicts_deps
There may be precious job data in the whatprovides area.
Diffstat (limited to 'src')
-rw-r--r-- | src/pool.c | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -2098,6 +2098,39 @@ pool_lookup_deltalocation(Pool *pool, Id entry, unsigned int *medianrp) return loc; } +static void +add_new_provider(Pool *pool, Id id, Id p) +{ + Queue q; + Id *pp; + + while (ISRELDEP(id)) + { + Reldep *rd = GETRELDEP(pool, id); + id = rd->name; + } + + queue_init(&q); + for (pp = pool->whatprovidesdata + pool->whatprovides[id]; *pp; pp++) + { + if (*pp == p) + { + queue_free(&q); + return; + } + if (*pp > p) + { + queue_push(&q, p); + p = 0; + } + queue_push(&q, *pp); + } + if (p) + queue_push(&q, p); + pool->whatprovides[id] = pool_queuetowhatprovides(pool, &q); + queue_free(&q); +} + void pool_add_fileconflicts_deps(Pool *pool, Queue *conflicts) { @@ -2109,7 +2142,6 @@ pool_add_fileconflicts_deps(Pool *pool, Queue *conflicts) if (!conflicts->count) return; - pool_freewhatprovides(pool); for (i = 0; i < conflicts->count; i += 5) { fn = conflicts->elements[i]; @@ -2121,6 +2153,10 @@ pool_add_fileconflicts_deps(Pool *pool, Queue *conflicts) if (!s->repo) continue; s->provides = repo_addid_dep(s->repo, s->provides, id, SOLVABLE_FILEMARKER); + if (pool->whatprovides) + add_new_provider(pool, fn, p); + if (pool->whatprovides_rel) + pool->whatprovides_rel[GETRELID(id)] = 0; /* clear cache */ s = pool->solvables + q; if (!s->repo) continue; |