small cleanup in id2str
authorMichael Schroeder <mls@suse.de>
Mon, 22 Apr 2013 09:18:35 +0000 (11:18 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 22 Apr 2013 09:18:35 +0000 (11:18 +0200)
ext/repo_rpmmd.c
src/poolid.c

index 603b27b..b545df5 100644 (file)
@@ -518,7 +518,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, const char **atts
   else
     id = name;
 #if 0
-  fprintf(stderr, "new dep %s%s%s\n", pool_id2str(pool, d), id2rel(pool, d), id2evr(pool, d));
+  fprintf(stderr, "new dep %s\n", pool_dep2str(pool, id));
 #endif
   return repo_addid_dep(pd->repo, olddeps, id, marker);
 }
index bd24e35..cc1b6f5 100644 (file)
@@ -121,12 +121,10 @@ pool_rel2id(Pool *pool, Id name, Id evr, int flags, int create)
 const char *
 pool_id2str(const Pool *pool, Id id)
 {
-  if (ISRELDEP(id))
+  while (ISRELDEP(id))
     {
       Reldep *rd = GETRELDEP(pool, id);
-      if (ISRELDEP(rd->name))
-       return "REL";
-      return pool->ss.stringspace + pool->ss.strings[rd->name];
+      id = rd->name;
     }
   return pool->ss.stringspace + pool->ss.strings[id];
 }