]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- currently, the dirpool code relies on the fact that ID 1 is
authorMichael Schroeder <mls@suse.de>
Tue, 19 Feb 2008 18:42:41 +0000 (18:42 +0000)
committerMichael Schroeder <mls@suse.de>
Tue, 19 Feb 2008 18:42:41 +0000 (18:42 +0000)
  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

index 5c131c1047abc1946773605bd6928b758c8cc940..cbe35a74a4a96873b145eddd4d2443b06ed1f28e 100644 (file)
@@ -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;