projects
/
platform
/
upstream
/
libsolv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- allow repositories that don't consist of a single block of solvables
[platform/upstream/libsolv.git]
/
src
/
pool.c
diff --git
a/src/pool.c
b/src/pool.c
index
9e72894
..
765010a
100644
(file)
--- a/
src/pool.c
+++ b/
src/pool.c
@@
-1,4
+1,11
@@
/*
/*
+ * Copyright (c) 2007, Novell Inc.
+ *
+ * This program is licensed under the BSD license, read LICENSE.BSD
+ * for further information
+ */
+
+/*
* pool.c
*
* The pool contains information about solvables
* pool.c
*
* The pool contains information about solvables
@@
-96,6
+103,7
@@
pool_create(void)
// pre-alloc space for a Solvable
pool->solvables = (Solvable *)xcalloc(2, sizeof(Solvable));
pool->nsolvables = 2;
// pre-alloc space for a Solvable
pool->solvables = (Solvable *)xcalloc(2, sizeof(Solvable));
pool->nsolvables = 2;
+ queue_init(&pool->vendormap);
s = pool->solvables + SYSTEMSOLVABLE;
s->name = SYSTEM_SYSTEM;
s->arch = ARCH_NOARCH;
s = pool->solvables + SYSTEMSOLVABLE;
s->name = SYSTEM_SYSTEM;
s->arch = ARCH_NOARCH;
@@
-110,23
+118,16
@@
void
pool_free(Pool *pool)
{
int i;
pool_free(Pool *pool)
{
int i;
- Repo *repo;
pool_freewhatprovides(pool);
pool_freeidhashes(pool);
pool_freewhatprovides(pool);
pool_freeidhashes(pool);
- for (i = 0; i < pool->nrepos; i++)
- {
- repo = pool->repos[i];
- xfree(repo->idarraydata);
- xfree(repo->rpmdbid);
- xfree(repo);
- }
+ pool_freeallrepos(pool, 1);
xfree(pool->id2arch);
xfree(pool->solvables);
xfree(pool->id2arch);
xfree(pool->solvables);
- xfree(pool->repos);
xfree(pool->stringspace);
xfree(pool->strings);
xfree(pool->rels);
xfree(pool->stringspace);
xfree(pool->strings);
xfree(pool->rels);
+ queue_free(&pool->vendormap);
for (i = 0; i < DEP2STRBUF; i++)
xfree(pool->dep2strbuf[i]);
xfree(pool);
for (i = 0; i < DEP2STRBUF; i++)
xfree(pool->dep2strbuf[i]);
xfree(pool);