summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-02-04 17:34:33 +0100
committerMichael Schroeder <mls@suse.de>2013-02-04 17:34:33 +0100
commit2bd102f701f4f018a2971c9e058538280785f24d (patch)
treefb1e60af2d8bf616473dc1dd45341ae34d67fd3f /src
parente06b8055a9168b7a7a24bff0ee8265a4df8124c2 (diff)
downloadlibsolv-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.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/pool.c b/src/pool.c
index 67f9d48..b65a1c2 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -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;