Imported Upstream version 0.7.27
[platform/upstream/libsolv.git] / ext / repo_testcase.c
index 38676ef..cbdd42a 100644 (file)
@@ -388,7 +388,13 @@ writedeps(Repo *repo, FILE *fp, const char *tag, Id key, Solvable *s, Offset off
          fprintf(fp, "+%s\n", tag);
          tagwritten = 1;
        }
-      fprintf(fp, "%s\n", idstr);
+      if (*idstr == '/' && !ISRELDEP(id)) {
+        fprintf(fp, "%s\n", pool_id2str(pool, id));
+      } else if (*idstr == '/') {
+        fprintf(fp, "\\2f%s\n", idstr + 1);
+      } else {
+        fprintf(fp, "%s\n", idstr);
+      }
     }
   if (tagwritten)
     fprintf(fp, "-%s\n", tag);
@@ -616,7 +622,7 @@ testcase_add_testtags(Repo *repo, FILE *fp, int flags)
          /* join back version and release */
          if (sp[2] && !(sp[2][0] == '-' && !sp[2][1]))
            sp[2][-1] = '-';
-         s->evr = makeevr(pool, sp[1]);
+         s->evr = pool_str2id(pool, sp[1], 1);
          s->arch = strcmp(sp[3], "-") ? pool_str2id(pool, sp[3], 1) : 0;
          continue;
        default: