From 4d30b021b6236f0e89a188216c01932a8b6d9697 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 19 Feb 2008 18:42:41 +0000 Subject: [PATCH] - currently, the dirpool code relies on the fact that ID 1 is an empty string. This led to wrong results if a repodata with own pool was used. for now, make ID1 always the empty string. in the future we'll probably just do away the the root node of the directory tree. --- tools/repo_write.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/repo_write.c b/tools/repo_write.c index 5c131c1..cbe35a7 100644 --- a/tools/repo_write.c +++ b/tools/repo_write.c @@ -1202,7 +1202,13 @@ if (cbdata.dirused) needid[i].map = i; cmp_pool = pool; +#if 0 qsort(needid + 1, reloff - 1, sizeof(*needid), needid_cmp_need_s); +#else + /* make first entry '' */ + needid[1].need = 1; + qsort(needid + 2, reloff - 2, sizeof(*needid), needid_cmp_need_s); +#endif qsort(needid + reloff, pool->nrels, sizeof(*needid), needid_cmp_need); sizeid = 0; -- 2.7.4